Skip to contentSkip to conversation

mpt fusion: Add support for ATTO 4LD: Rebranded LSI 53C1030

SCSI Dan Carpenter 1 participant 1 message Feb 19, 2014 SCSI

lore
Share & tools
lore
#0 lore raw

Hello Eric Moore,

The patch 232f08fc82b1: "[SCSI] mpt fusion: Add support for ATTO 4LD:
Rebranded LSI 53C1030" from Aug 14, 2007, leads to the following static checker warning:

drivers/message/fusion/mptbase.c:5527 mpt_GetScsiPortSettings()
warn: was hexadecimal intended '10'

drivers/message/fusion/mptbase.c
5522 if (ATTOFlags & ATTOFLAG_TAGGED)
5523 data |= (MPI_SCSIPORTPAGE2_DEVICE_TAG_QUEUE_ENABLE);
5524 if (!(ATTOFlags & ATTOFLAG_WIDE_ENB))

  5525                                      data |= (MPI_SCSIPORTPAGE2_DEVICE_WIDE_DISABLE);
                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

MPI_SCSIPORTPAGE2_DEVICE_WIDE_DISABLE is 0x10.

  5526  
  5527                                    data = (data << 16) | (pdevice->Period << 8) | 10;
                                                                                         ^^

"data" is is a bit field except for the last "10" here. Maybe it should be 0x10 instead of 10. But then we already set 0x10 on the line before so this code is not clear.

  5528                                    ioc->spi_data.nvram[ii] = data;
  5529                                  }

regards,
dan carpenter