From: Rodolfo Giometti <giometti@enneenne.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
Alexander Gordeev <lasaine@lvk.cs.msu.su>
Subject: Re: [PATCH v1 1/1] pps: clients: parport: Switch to use module_parport_driver()
Date: Tue, 11 May 2021 09:26:36 +0200 [thread overview]
Message-ID: <55aeec09-63c7-7d1a-13c9-cd8f4b7dc1f9@enneenne.com> (raw)
In-Reply-To: <YJovqMqJj3mBeRE8@smile.fi.intel.com>
On 11/05/21 09:18, Andy Shevchenko wrote:
> 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@linux.intel.com>
>>> ---
>>> 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)?
Mmm... these functions can be called at different times, so I don't know if we
can just move the code safely.
Maybe Alexander (in CC) can help us? :)
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
next prev parent reply other threads:[~2021-05-11 7:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 14:13 [PATCH v1 1/1] pps: clients: parport: Switch to use module_parport_driver() Andy Shevchenko
2021-05-11 7:05 ` Rodolfo Giometti
2021-05-11 7:18 ` Andy Shevchenko
2021-05-11 7:26 ` Rodolfo Giometti [this message]
2021-05-11 7:50 ` Andy Shevchenko
2021-05-11 8:46 ` Rodolfo Giometti
2021-05-11 14:11 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55aeec09-63c7-7d1a-13c9-cd8f4b7dc1f9@enneenne.com \
--to=giometti@enneenne.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=lasaine@lvk.cs.msu.su \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.