* re: [SCSI] lpfc 8.2.7 : Rework the worker thread
@ 2015-05-15 9:49 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-05-15 9:49 UTC (permalink / raw)
To: James.Smart; +Cc: linux-scsi
Hello James Smart,
The patch 5e9d9b827698: "[SCSI] lpfc 8.2.7 : Rework the worker
thread" from Jun 14, 2008, leads to the following static checker
warning:
drivers/scsi/lpfc/lpfc_sli.c:9365 lpfc_sli_host_down()
warn: test_bit() takes a bit number
drivers/scsi/lpfc/lpfc_sli.c
9357 spin_lock_irqsave(&phba->hbalock, flags);
9358 for (i = 0; i < psli->num_rings; i++) {
9359 pring = &psli->ring[i];
9360 prev_pring_flag = pring->flag;
9361 /* Only slow rings */
9362 if (pring->ringno == LPFC_ELS_RING) {
9363 pring->flag |= LPFC_DEFERRED_RING_EVENT;
9364 /* Set the lpfc data pending flag */
9365 set_bit(LPFC_DATA_READY, &phba->data_flags);
LPFC_DATA_READY is defined as:
#define LPFC_DATA_READY (1<<0)
The intention seems to be that we use BIT(0) but because set_bit() has
a shift built in it is using BIT(1). In other words:
Good: set_bit(0, &phba->data_flags);
Bad: set_bit(BIT(0), &phba->data_flags);
This seems to be used consistently so I think it's fine, but static
checkers will complain. I think this is the only ->data_flag that we
use so it doesn't matter (I haven't looked very hard at this code).
9366 }
9367 /*
9368 * Error everything on the txq since these iocbs have not been
9369 * given to the FW yet.
9370 */
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-15 9:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 9:49 [SCSI] lpfc 8.2.7 : Rework the worker thread Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox