From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, Rodolfo Giometti <giometti@enneenne.com>
Subject: Re: [PATCH v1 1/1] pps: generators: pps_gen_parport: Switch to use module_parport_driver()
Date: Wed, 16 Jun 2021 16:44:38 +0200 [thread overview]
Message-ID: <YMoOVrJ1ETVhRr4F@kroah.com> (raw)
In-Reply-To: <20210616143121.46059-1-andriy.shevchenko@linux.intel.com>
On Wed, Jun 16, 2021 at 05:31:21PM +0300, 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/generators/pps_gen_parport.c | 44 +++++-------------------
> 1 file changed, 9 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/pps/generators/pps_gen_parport.c b/drivers/pps/generators/pps_gen_parport.c
> index 6a1af7664f3b..565f99782402 100644
> --- a/drivers/pps/generators/pps_gen_parport.c
> +++ b/drivers/pps/generators/pps_gen_parport.c
> @@ -20,8 +20,6 @@
> #include <linux/hrtimer.h>
> #include <linux/parport.h>
>
> -#define DRVDESC "parallel port PPS signal generator"
> -
> #define SIGNAL 0
> #define NO_SIGNAL PARPORT_CONTROL_STROBE
>
> @@ -180,6 +178,11 @@ static void parport_attach(struct parport *port)
> {
> struct pardev_cb pps_cb;
>
> + if (send_delay > SEND_DELAY_MAX) {
> + pr_err("delay value should be not greater then %d\n", SEND_DELAY_MAX);
> + return -EINVAL;
Note this is at a later point in time than before, are you sure this is
ok?
> + }
> +
> if (attached) {
> /* we already have a port */
> return;
> @@ -223,6 +226,8 @@ static void parport_detach(struct parport *port)
> hrtimer_cancel(&device.timer);
> parport_release(device.pardev);
> parport_unregister_device(device.pardev);
> +
> + pr_info("hrtimer avg error is %ldns\n", hrtimer_error);
Why is this line needed? When drivers work properly, they are quiet.
I know the existing code has it, no reason it needs to stay here, that's
why we created these macros, to remove the ability for drivers to be
printing junk like this that they do not need to be printing.
thanks,
greg k-h
next prev parent reply other threads:[~2021-06-16 14:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-16 14:31 [PATCH v1 1/1] pps: generators: pps_gen_parport: Switch to use module_parport_driver() Andy Shevchenko
2021-06-16 14:44 ` Greg Kroah-Hartman [this message]
2021-06-16 14:57 ` Andy Shevchenko
2021-06-18 15:40 ` Alexander Gordeev
2021-07-12 13:57 ` 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=YMoOVrJ1ETVhRr4F@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=giometti@enneenne.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox