From: Julia Lawall <julia.lawall@lip6.fr>
To: Aishwarya Pant <aishpant@gmail.com>
Cc: Lidza Louina <lidza.louina@gmail.com>,
Mark Hounschell <markh@compro.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: dgnc: replace udelay with usleep_range
Date: Sun, 26 Feb 2017 20:02:56 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1702262000560.2056@hadrien> (raw)
In-Reply-To: <20170226183806.GA3498@aishwarya>
On Mon, 27 Feb 2017, Aishwarya Pant wrote:
> Adding first patch for checkpatch warning on dgnc_cls.c -
What do you mean by "Adding first patch"?
Actually, commit messages should be written in the imperative (as you have
for the subject line), and should describe what you do and why.
> CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt
Also commit messages should be limited to around 70 characters or so per
line.
How did you choose 20 as the upper bound?
julia
>
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> ---
> drivers/staging/dgnc/dgnc_cls.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
> index c20ffdd..2cf146e 100644
> --- a/drivers/staging/dgnc/dgnc_cls.c
> +++ b/drivers/staging/dgnc/dgnc_cls.c
> @@ -16,7 +16,7 @@
> #include <linux/kernel.h>
> #include <linux/sched.h> /* For jiffies, task states */
> #include <linux/interrupt.h> /* For tasklet and interrupt structs/defines */
> -#include <linux/delay.h> /* For udelay */
> +#include <linux/delay.h> /* For usleep_range */
> #include <linux/io.h> /* For read[bwl]/write[bwl] */
> #include <linux/serial.h> /* For struct async_serial */
> #include <linux/serial_reg.h> /* For the various UART offsets */
> @@ -409,7 +409,7 @@ static void cls_assert_modem_signals(struct channel_t *ch)
> writeb(out, &ch->ch_cls_uart->mcr);
>
> /* Give time for the UART to actually drop the signals */
> - udelay(10);
> + usleep_range(10, 20);
> }
>
> static void cls_copy_data_from_queue_to_uart(struct channel_t *ch)
> @@ -631,7 +631,7 @@ static void cls_flush_uart_read(struct channel_t *ch)
> * Presumably, this is a bug in this UART.
> */
>
> - udelay(10);
> + usleep_range(10, 20);
> }
>
> /*
> @@ -1096,7 +1096,7 @@ static void cls_uart_init(struct channel_t *ch)
>
> writeb(UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT,
> &ch->ch_cls_uart->isr_fcr);
> - udelay(10);
> + usleep_range(10, 20);
>
> ch->ch_flags |= (CH_FIFO_ENABLED | CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
>
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170226183806.GA3498%40aishwarya.
> For more options, visit https://groups.google.com/d/optout.
>
next prev parent reply other threads:[~2017-02-26 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-26 18:38 [PATCH] staging: dgnc: replace udelay with usleep_range Aishwarya Pant
2017-02-26 19:02 ` Julia Lawall [this message]
2017-02-27 11:46 ` [Outreachy kernel] " Aishwarya Pant
2017-02-27 13:55 ` Julia Lawall
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=alpine.DEB.2.20.1702262000560.2056@hadrien \
--to=julia.lawall@lip6.fr \
--cc=aishpant@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=lidza.louina@gmail.com \
--cc=markh@compro.net \
--cc=outreachy-kernel@googlegroups.com \
/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.