lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 01 Aug 2007 16:24:40 +0800
From:	Eugene Teo <eugeneteo@...nel.sg>
To:	Joe Perches <joe@...ches.com>
CC:	linux-kernel@...r.kernel.org, David Miller <davem@...emloft.net>
Subject: 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

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 <joe@...ches.com>
> 
> 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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ