[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240913151228.2b312e9b@SWDEV2.connecttech.local>
Date: Fri, 13 Sep 2024 15:12:28 -0400
From: Parker Newman <parker@...est.io>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Jiri Slaby
<jirislaby@...nel.org>, 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, 13 Sep 2024 20:54:05 +0300
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
> 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__);
>
> First of all, you probably want pr_fmt() to be defined.
Good point, I will add.
> Second, I would replace the entire while loop by the read_poll_timeout() macro
> from iopoll.h (note to use "true" for sleep before check and drop that one from
> before the loop in the driver).
Good idea.
> Naturally the pr_err() change can be combined with read_poll_timeout(), but
> if you go with pr_fmt() perhaps it still makes sense to have separate changes.
> I dunno which one is better, up to you.
>
Sorry if I am miss-reading but do you mean the pr_err() and pr_fmt() can be combined
and the read_poll_timeout() change should be made in a separate patch after?
Or should I be adding the pr_fmt() define in its own patch, followed by the pr_err()
and read_poll_timeout() in a patch?
Thanks,
Parker
Powered by blists - more mailing lists