From: Borislav Petkov <petkovbb@googlemail.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] IDE: Silent compiler warning in ide_pio_bytes()
Date: Mon, 22 Jun 2009 22:55:08 +0200 [thread overview]
Message-ID: <20090622205508.GA25045@liondog.tnic> (raw)
In-Reply-To: <20090622211052.45b3cfc5@hyperion.delvare>
On Mon, Jun 22, 2009 at 09:10:52PM +0200, Jean Delvare wrote:
> PageHighMem() isn't cheap so avoid calling it several times on the
> same page. I had the hope that this would silent the following
> compilation warning:
>
> drivers/ide/ide-taskfile.c: In function 'ide_pio_bytes':
> drivers/ide/ide-taskfile.c:229: warning: 'flags' may be used uninitialized in this function
>
> which is a false positive, but it did not. So let's just initialize the
> flags and be done with it, so that other developers don't waste their
> time looking at it.
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
> drivers/ide/ide-taskfile.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> --- linux-2.6.31-pre.orig/drivers/ide/ide-taskfile.c 2009-06-21 09:37:02.000000000 +0200
> +++ linux-2.6.31-pre/drivers/ide/ide-taskfile.c 2009-06-21 12:18:47.000000000 +0200
> @@ -226,7 +226,7 @@ void ide_pio_bytes(ide_drive_t *drive, s
> struct scatterlist *sg = hwif->sg_table;
> struct scatterlist *cursg = cmd->cursg;
> struct page *page;
> - unsigned long flags;
> + unsigned long flags = 0; /* Silent compiler warning */
or maybe
unsigned long uninitialized_var(flags);
> unsigned int offset;
> u8 *buf;
[..]
--
Regards/Gruss,
Boris.
next prev parent reply other threads:[~2009-06-22 20:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 19:10 [PATCH] IDE: Silent compiler warning in ide_pio_bytes() Jean Delvare
2009-06-22 20:55 ` Borislav Petkov [this message]
2009-06-22 23:10 ` David Miller
2009-06-23 6:53 ` Jean Delvare
2009-06-23 9:32 ` David Miller
2009-06-23 9:52 ` Jean Delvare
2009-06-23 10:05 ` David Miller
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=20090622205508.GA25045@liondog.tnic \
--to=petkovbb@googlemail.com \
--cc=bzolnier@gmail.com \
--cc=khali@linux-fr.org \
--cc=linux-ide@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