scsi: ncr5380: Resolve various static checker warnings
Avoid various warnings from "make C=1" by annotating a couple of unlock-then-lock sequences, replacing a zero with NULL and correcting some type casts. Also avoid a warning from "make W=1" by adding braces. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Tested-by: Ondrej Zary <linux@rainbow-software.org> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
14d739f640
commit
4ab2a7878f
@@ -591,8 +591,9 @@ static inline void maybe_release_dma_irq(struct Scsi_Host *instance)
|
||||
list_empty(&hostdata->unissued) &&
|
||||
list_empty(&hostdata->autosense) &&
|
||||
!hostdata->connected &&
|
||||
!hostdata->selecting)
|
||||
!hostdata->selecting) {
|
||||
NCR5380_release_dma_irq(instance);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -931,6 +932,7 @@ static irqreturn_t __maybe_unused NCR5380_intr(int irq, void *dev_id)
|
||||
|
||||
static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
|
||||
struct scsi_cmnd *cmd)
|
||||
__releases(&hostdata->lock) __acquires(&hostdata->lock)
|
||||
{
|
||||
struct NCR5380_hostdata *hostdata = shost_priv(instance);
|
||||
unsigned char tmp[3], phase;
|
||||
@@ -1623,6 +1625,7 @@ static int NCR5380_transfer_dma(struct Scsi_Host *instance,
|
||||
*/
|
||||
|
||||
static void NCR5380_information_transfer(struct Scsi_Host *instance)
|
||||
__releases(&hostdata->lock) __acquires(&hostdata->lock)
|
||||
{
|
||||
struct NCR5380_hostdata *hostdata = shost_priv(instance);
|
||||
unsigned char msgout = NOP;
|
||||
|
Reference in New Issue
Block a user