Skip to content

Commit

Permalink
[SCSI] qlogicpti: add missing parentheses
Browse files Browse the repository at this point in the history
`+' 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>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Roel Kluin authored and James Bottomley committed Dec 4, 2009
1 parent b94f895 commit cd7560c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/qlogicpti.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd7560c

Please sign in to comment.