Re: [PATCH] - Remove current defines and uses of pr_err, add pr_emerg, pr_alert, pr_crit, pr_err, pr_warn, pr_notice to include/linux/kernel.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joe,

Joe Perches wrote:
> Remove current #define and uses of pr_err
> Add pr_emerg, pr_alert, pr_crit, pr_err, pr_warn, pr_notice
> 	to include/linux/kernel.h
> 
> Signed-off-by:  Joe Perches <[email protected]>
> 
> diff --git a/drivers/i2c/chips/menelaus.c b/drivers/i2c/chips/menelaus.c
> index 48a7e2f..3ee323a 100644
> --- a/drivers/i2c/chips/menelaus.c
> +++ b/drivers/i2c/chips/menelaus.c
> @@ -49,8 +49,7 @@
>  #include <asm/arch/menelaus.h>
>  
>  #define DRIVER_NAME			"menelaus"
> -
> -#define pr_err(fmt, arg...)	printk(KERN_ERR DRIVER_NAME ": ", ## arg);

Makes sense to remove the duplicated pr_* functions, and have it declared in
include/linux/kernel.h.

> +#define PFX                             DRIVER_NAME ": "
>  
>  #define MENELAUS_I2C_ADDRESS		0x72
>  
> @@ -156,7 +155,7 @@ static int menelaus_write_reg(int reg, u8 value)
>  	int val = i2c_smbus_write_byte_data(the_menelaus->client, reg, value);
>  
>  	if (val < 0) {
> -		pr_err("write error");
> +		printk(KERN_ERR PFX "write error\n");
>  		return val;
>  	}
[...]

But why are you replacing the existing pr_*() with printk(KERN_*?

Eugene
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux