From: Matthew Wilcox <matthew@wil.cx>
To: David Miller <davem@davemloft.net>
Cc: linux-scsi@vger.kernel.org,
James.Bottomley@HansenPartnership.com, joe@perches.com,
sfr@canb.auug.org.au
Subject: Re: [PATCH] scsi: Remove warnings after vsprintf %pV introducation.
Date: Tue, 31 Aug 2010 15:07:46 -0600 [thread overview]
Message-ID: <20100831210746.GJ3521@parisc-linux.org> (raw)
In-Reply-To: <20100831.133531.186321637.davem@davemloft.net>
On Tue, Aug 31, 2010 at 01:35:31PM -0700, David Miller wrote:
> diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
> index a7bc8b7..d740a5b 100644
> --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
> +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
> @@ -72,10 +72,7 @@ static void sym_printl_hex(u_char *p, int n)
>
> static void sym_print_msg(struct sym_ccb *cp, char *label, u_char *msg)
> {
> - if (label)
> - sym_print_addr(cp->cmd, "%s: ", label);
> - else
> - sym_print_addr(cp->cmd, "");
> + sym_print_addr(cp->cmd, "%s: ", label);
>
> spi_print_msg(msg);
> printf("\n");
> @@ -4558,7 +4555,8 @@ static void sym_int_sir(struct sym_hcb *np)
> switch (np->msgin [2]) {
> case M_X_MODIFY_DP:
> if (DEBUG_FLAGS & DEBUG_POINTER)
> - sym_print_msg(cp, NULL, np->msgin);
> + sym_print_msg(cp, "extended msg ",
> + np->msgin);
> tmp = (np->msgin[3]<<24) + (np->msgin[4]<<16) +
> (np->msgin[5]<<8) + (np->msgin[6]);
> sym_modify_dp(np, tp, cp, tmp);
The extra space before the colon looks a little weird.
> @@ -4585,7 +4583,7 @@ static void sym_int_sir(struct sym_hcb *np)
> */
> case M_IGN_RESIDUE:
> if (DEBUG_FLAGS & DEBUG_POINTER)
> - sym_print_msg(cp, NULL, np->msgin);
> + sym_print_msg(cp, "half byte ", np->msgin);
> if (cp->host_flags & HF_SENSE)
> OUTL_DSP(np, SCRIPTA_BA(np, clrack));
> else
Um, half byte? Oh, I see ...
/*
* We received a 1/2 byte message not handled from SCRIPTS.
That's a 'one or two byte message', not an 0.5 byte message :-) There's
really nothing good to print here. Print a space if you absolutely must,
but why the hell is GCC warning about this?
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
prev parent reply other threads:[~2010-08-31 21:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 20:35 [PATCH] scsi: Remove warnings after vsprintf %pV introducation David Miller
2010-08-31 20:50 ` Joe Perches
2010-08-31 21:07 ` Matthew Wilcox [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=20100831210746.GJ3521@parisc-linux.org \
--to=matthew@wil.cx \
--cc=James.Bottomley@HansenPartnership.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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.