Re: [PATCH v1 1/1] pps: clients: parport: Switch to use module_parport_driver()

From: Andy Shevchenko
Date: Tue May 11 2021 - 03:18:10 EST


On Tue, May 11, 2021 at 09:05:00AM +0200, Rodolfo Giometti wrote:
> On 10/05/21 16:13, Andy Shevchenko wrote:
> > Switch to use module_parport_driver() to reduce boilerplate code.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > ---
> > drivers/pps/clients/pps_parport.c | 42 ++++++-------------------------
> > 1 file changed, 8 insertions(+), 34 deletions(-)
> >
> > diff --git a/drivers/pps/clients/pps_parport.c b/drivers/pps/clients/pps_parport.c
> > index 7a41fb7b0dec..42f93d4c6ee3 100644
> > --- a/drivers/pps/clients/pps_parport.c
> > +++ b/drivers/pps/clients/pps_parport.c
> > @@ -22,8 +22,6 @@
> > #include <linux/parport.h>
> > #include <linux/pps_kernel.h>
> >
> > -#define DRVDESC "parallel port PPS client"
> > -
> > /* module parameters */
> >
> > #define CLEAR_WAIT_MAX 100
> > @@ -138,6 +136,12 @@ static void parport_attach(struct parport *port)
> > .dev = NULL
> > };
> >
> > + if (clear_wait > CLEAR_WAIT_MAX) {
> > + pr_err("clear_wait value should be not greater then %d\n",
> > + CLEAR_WAIT_MAX);
> > + return;
> > + }
> > +
>
> Why do you need to do so? Maybe a comment would be welcomed.

It's in original code, I just moved it to ->probe().

What comment do you want to have here, because original code has no comment (I
think in any case it's out of scope of this change, but may be prepended or
appended to the series)?

--
With Best Regards,
Andy Shevchenko