mirror of https://gitee.com/openkylin/linux.git
scsi: aacraid: Fix logical bug when !DBG
When DBG is not enabled FIB_COUNTER_INCREMENT() results in an empty statement, leaving the contents of if() and else() empty. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c: In function ‘aac_response_normal’: drivers/scsi/aacraid/dpcsup.c:105:50: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 105 | FIB_COUNTER_INCREMENT(aac_config.AsyncRecved); | ^ drivers/scsi/aacraid/dpcsup.c: In function ‘aac_intr_normal’: drivers/scsi/aacraid/dpcsup.c:411:30: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 411 | aac_config.AsyncRecved); | ^ Link: https://lore.kernel.org/r/20200713080001.128044-4-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com> Cc: "PMC-Sierra, Inc" <aacraid@pmc-sierra.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
cf93fffac2
commit
2fee77e5b8
|
@ -99,10 +99,11 @@ unsigned int aac_response_normal(struct aac_queue * q)
|
||||||
}
|
}
|
||||||
if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected | Async))
|
if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected | Async))
|
||||||
{
|
{
|
||||||
if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected))
|
if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected)) {
|
||||||
FIB_COUNTER_INCREMENT(aac_config.NoResponseRecved);
|
FIB_COUNTER_INCREMENT(aac_config.NoResponseRecved);
|
||||||
else
|
} else {
|
||||||
FIB_COUNTER_INCREMENT(aac_config.AsyncRecved);
|
FIB_COUNTER_INCREMENT(aac_config.AsyncRecved);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* NOTE: we cannot touch the fib after this
|
* NOTE: we cannot touch the fib after this
|
||||||
* call, because it may have been deallocated.
|
* call, because it may have been deallocated.
|
||||||
|
@ -403,12 +404,13 @@ unsigned int aac_intr_normal(struct aac_dev *dev, u32 index, int isAif,
|
||||||
if (hwfib->header.XferState &
|
if (hwfib->header.XferState &
|
||||||
cpu_to_le32(NoResponseExpected | Async)) {
|
cpu_to_le32(NoResponseExpected | Async)) {
|
||||||
if (hwfib->header.XferState & cpu_to_le32(
|
if (hwfib->header.XferState & cpu_to_le32(
|
||||||
NoResponseExpected))
|
NoResponseExpected)) {
|
||||||
FIB_COUNTER_INCREMENT(
|
FIB_COUNTER_INCREMENT(
|
||||||
aac_config.NoResponseRecved);
|
aac_config.NoResponseRecved);
|
||||||
else
|
} else {
|
||||||
FIB_COUNTER_INCREMENT(
|
FIB_COUNTER_INCREMENT(
|
||||||
aac_config.AsyncRecved);
|
aac_config.AsyncRecved);
|
||||||
|
}
|
||||||
start_callback = 1;
|
start_callback = 1;
|
||||||
} else {
|
} else {
|
||||||
unsigned long flagv;
|
unsigned long flagv;
|
||||||
|
|
Loading…
Reference in New Issue