From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Petr Sedlák" <hugosedlak@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: vt6655: Fix camel case of variable
Date: Wed, 2 Jan 2019 14:07:45 +0300 [thread overview]
Message-ID: <20190102110745.GJ3781@kadam> (raw)
In-Reply-To: <20181229225952.GA8447@PhilosophyOfMe>
On Sat, Dec 29, 2018 at 11:59:52PM +0100, Petr Sedlák wrote:
> Replace variable uDelayUnit with u_delay_unit. Issue found by
> checkpatch.
>
> Signed-off-by: Petr Sedlák <hugosedlak@gmail.com>
> ---
> drivers/staging/vt6655/upc.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/vt6655/upc.h b/drivers/staging/vt6655/upc.h
> index 61b3e568ff9a..384af225336a 100644
> --- a/drivers/staging/vt6655/upc.h
> +++ b/drivers/staging/vt6655/upc.h
> @@ -42,15 +42,15 @@
> #define VNSvOutPortD(dwIOAddress, dwData) \
> iowrite32((u32)(dwData), dwIOAddress)
>
> -#define PCAvDelayByIO(uDelayUnit) \
> +#define PCAvDelayByIO(u_delay_unit) \
> do { \
> unsigned char byData; \
> unsigned long ii; \
> \
> - if (uDelayUnit <= 50) { \
> - udelay(uDelayUnit); \
> + if (u_delay_unit <= 50) { \
> + udelay(u_delay_unit); \
> } else { \
> - for (ii = 0; ii < (uDelayUnit); ii++) \
> + for (ii = 0; ii < (u_delay_unit); ii++) \
> byData = inb(0x61); \
> } \
> } while (0)
This is a hilariously awful macro. It reads from a register usec number
of times to introduce a delay. :P
Just delete it and fix the callers to use normal delay functions.
regards,
dan carpenter
prev parent reply other threads:[~2019-01-02 11:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-29 22:59 [PATCH] Staging: vt6655: Fix camel case of variable Petr Sedlák
2018-12-29 23:58 ` Joe Perches
2019-01-02 11:07 ` Dan Carpenter [this message]
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=20190102110745.GJ3781@kadam \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=gregkh@linuxfoundation.org \
--cc=hugosedlak@gmail.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;
as well as URLs for NNTP newsgroup(s).