Clang warns when multiple pairs of parentheses are used for a single
conditional statement.
In file included from drivers/scsi/BusLogic.c:57:
drivers/scsi/FlashPoint.c:2947:34: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) {
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
drivers/scsi/FlashPoint.c:2947:34: note: remove extraneous parentheses around the comparison to silence this warning
if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) {
~ ^ ~
drivers/scsi/FlashPoint.c:2947:34: note: use '=' to turn this equality comparison into an assignment
if ((currSCCB->Sccb_scsistat == SELECT_SN_ST)) {
^~
=
drivers/scsi/FlashPoint.c:2956:39: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
else if ((currSCCB->Sccb_scsistat ==
~~~~~~~~~~~~~~~~~~~~~~~~^~
drivers/scsi/FlashPoint.c:2956:39: note: remove extraneous parentheses around the comparison to silence this warning
else if ((currSCCB->Sccb_scsistat ==
~ ^
drivers/scsi/FlashPoint.c:2956:39: note: use '=' to turn this equality comparison into an assignment
else if ((currSCCB->Sccb_scsistat ==
^~
=
2 warnings generated.
Link: https://github.com/ClangBuiltLinux/linux/issues/156
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
We have been getting a warning about non ANSI function.
warning: non-ANSI function declaration of function 'FPT_SccbMgrTableInitAll'
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Acked-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
[jejb: fix up pointer to int cast warning]
Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Fix CamelCase and extra long lines in the buslogic driver.
Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
The check on MAX_SCSI_TAR should be >= instead of > or we could go past the
end of the array.
Joe Eykholt aslo correctly points out that the check on MAX_LUN should be
>= as well. That matches with how it is used in the rest of the file.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This patch fixes off-by-one errors in error checks (the variables are
used as array indexes for arrays with MAX_SCSI_TAR resp. MAX_LUN
elements) spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
We've verified that there are 64 bit and endianness problems in the
flashpoint driver. Reverse the logic of CONFIG_OMIT_FLASHPOINT (make
it CONFIG_SCSI_FLASHPOINT) and make it depend on X86_32 so it can't
appear for any other architectures. Long term, if someone chooses,
they could make FlashPoint 64 bit compliant (it looks like its a
question of fixing up the sizes in some of the packed descriptors)
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
FlashPoint, use BIT instead of BITW
BITW was an ushort variant of BIT, use BIT instead
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
define global BIT macro
move all local BIT defines to the new globally define macro.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
It's much, much more readable now.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
From: Adrian Bunk <bunk@stusta.de>
This patch contains cleanups including the following:
- remove #ifdef'ed code for other OS's
- remove other unused code
- make needlessly global code static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!