From: Roel Kluin <roel.kluin@gmail.com>
To: "James E.J. Bottomley" <James.Bottomley@suse.de>,
linux-scsi@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] qlogicpti: add missing parentheses
Date: Wed, 04 Nov 2009 00:38:44 +0100 [thread overview]
Message-ID: <4AF0BF04.9030203@gmail.com> (raw)
`+' has a higher precedence than `?' so the condition always
evaluates to true and this is preprocessed to `7*((ql) - 1)'
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
drivers/scsi/qlogicpti.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
This one must be right, I think.
QLOGICPTI_MAX_SG is used here:
drivers/scsi/qlogicpti.c:964: host->sg_tablesize = QLOGICPTI_MAX_SG(num_free);
drivers/scsi/qlogicpti.c:1288: .sg_tablesize = QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN),
Thanks, Roel
diff --git a/drivers/scsi/qlogicpti.h b/drivers/scsi/qlogicpti.h
index 9c053bb..e3c74d1 100644
--- a/drivers/scsi/qlogicpti.h
+++ b/drivers/scsi/qlogicpti.h
@@ -43,7 +43,7 @@
* determined for each queue request anew.
*/
#define QLOGICPTI_REQ_QUEUE_LEN 255 /* must be power of two - 1 */
-#define QLOGICPTI_MAX_SG(ql) (4 + ((ql) > 0) ? 7*((ql) - 1) : 0)
+#define QLOGICPTI_MAX_SG(ql) (4 + (((ql) > 0) ? 7*((ql) - 1) : 0))
/* mailbox command complete status codes */
#define MBOX_COMMAND_COMPLETE 0x4000
next reply other threads:[~2009-11-03 23:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 23:38 Roel Kluin [this message]
2009-11-03 23:51 ` [PATCH] qlogicpti: add missing parentheses James Bottomley
2009-11-04 0:19 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2009-02-18 12:48 [PATCH] qlogicpti: Add " Roel Kluin
2009-02-18 22:39 ` David Miller
2009-02-19 21:01 ` Andrew Morton
2009-02-20 8:51 ` 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=4AF0BF04.9030203@gmail.com \
--to=roel.kluin@gmail.com \
--cc=James.Bottomley@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--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.