From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: akpm@linux-foundation.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: ch.c fix sparse shadowed variable warnings
Date: Tue, 01 Apr 2008 09:51:37 -0500 [thread overview]
Message-ID: <1207061497.3100.14.camel@localhost.localdomain> (raw)
In-Reply-To: <1207026330.12466.12.camel@brick>
On Mon, 2008-03-31 at 22:05 -0700, Harvey Harrison wrote:
> Replace the global err array with ch_err.
> drivers/scsi/ch.c:271:6: warning: symbol 'err' shadows an earlier one
> drivers/scsi/ch.c:116:3: originally declared here
>
> Replace the temporary cmd buffer with ch_err to avoid shadowing the cmd
> function parameter.
> drivers/scsi/ch.c:724:11: warning: symbol 'cmd' shadows an earlier one
> drivers/scsi/ch.c:596:20: originally declared here
>
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
> James, incorporated your comments.
Yes, that looks fine, thanks.
I have a challenge for you: It looks like this driver has three
incorrect unconditional uses of GFP_DMA. It gets a 512 byte bufer and
then only uses 256 bytes of it on several occasions and the routine with
the shadowed cmd variable looks like it should be calling
ch_read_element_status() rather than duplicating it.
James
next prev parent reply other threads:[~2008-04-01 14:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 21:48 [patch 11/17] scsi: ch.c fix shadowed variable warnings akpm
2008-03-30 17:21 ` James Bottomley
2008-03-30 18:43 ` Harvey Harrison
2008-03-30 18:55 ` James Bottomley
2008-03-30 18:59 ` Harvey Harrison
2008-04-01 3:10 ` James Bottomley
2008-04-01 5:05 ` [PATCH] scsi: ch.c fix sparse " Harvey Harrison
2008-04-01 14:51 ` James Bottomley [this message]
2008-04-01 15:16 ` Boaz Harrosh
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=1207061497.3100.14.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=harvey.harrison@gmail.com \
--cc=linux-scsi@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.