[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024091438-charity-borough-54b3@gregkh>
Date: Sat, 14 Sep 2024 20:58:50 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Parker Newman <parker@...est.io>
Cc: Jiri Slaby <jirislaby@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org,
Parker Newman <pnewman@...necttech.com>
Subject: Re: [PATCH v1 3/6] misc: eeprom: eeprom_93cx6: Replace
printk(KERN_ERR ...) with pr_err()
On Fri, Sep 13, 2024 at 10:55:40AM -0400, Parker Newman wrote:
> From: Parker Newman <pnewman@...necttech.com>
>
> Replace printk(KERN_ERR ...) with pr_err() to improve readability.
>
> Fixes checkpatch warning:
>
> WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
> dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
> + printk(KERN_ERR "%s: timeout\n", __func__);
>
> Signed-off-by: Parker Newman <pnewman@...necttech.com>
> ---
> drivers/misc/eeprom/eeprom_93cx6.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/eeprom/eeprom_93cx6.c b/drivers/misc/eeprom/eeprom_93cx6.c
> index 64da22edefa4..755be9a4ffd4 100644
> --- a/drivers/misc/eeprom/eeprom_93cx6.c
> +++ b/drivers/misc/eeprom/eeprom_93cx6.c
> @@ -378,7 +378,7 @@ void eeprom_93cx6_write(struct eeprom_93cx6 *eeprom, u8 addr, u16 data)
> usleep_range(1000, 2000);
>
> if (--timeout <= 0) {
> - printk(KERN_ERR "%s: timeout\n", __func__);
> + pr_err("%s: timeout\n", __func__);
It's a device, please use dev_err().
thanks,
greg k-h
Powered by blists - more mailing lists