[kbuild] Re: [PATCH v2 1/7] pm80xx: Add sysfs attribute to check mpi state

Dan Carpenter
2021-03-25T07:12:23Z

[-- Attachment #1: Type: text/plain, Size: 2169 bytes --]

Hi Viswas,

url: https://github.com/0day-ci/linux/commits/Viswas-G/pm80xx-updates/20210325-005709
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-m001-20210323 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/scsi/pm8001/pm8001_ctl.c:916 ctl_mpi_state_show() warn: mask and shift to zero

Old smatch warnings:
drivers/scsi/pm8001/pm8001_ctl.c:758 pm8001_update_flash() warn: inconsistent indenting

vim +916 drivers/scsi/pm8001/pm8001_ctl.c

47c563cdbc763e Vishakha Channapattan 2021-03-24 905 static ssize_t ctl_mpi_state_show(struct device *cdev,
47c563cdbc763e Vishakha Channapattan 2021-03-24 906 struct device_attribute *attr, char *buf)
47c563cdbc763e Vishakha Channapattan 2021-03-24 907 {
47c563cdbc763e Vishakha Channapattan 2021-03-24 908 struct Scsi_Host *shost = class_to_shost(cdev);
47c563cdbc763e Vishakha Channapattan 2021-03-24 909 struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost);
47c563cdbc763e Vishakha Channapattan 2021-03-24 910 struct pm8001_hba_info *pm8001_ha = sha->lldd_ha;
47c563cdbc763e Vishakha Channapattan 2021-03-24 911 unsigned int mpidw0;
47c563cdbc763e Vishakha Channapattan 2021-03-24 912 int c;
47c563cdbc763e Vishakha Channapattan 2021-03-24 913
47c563cdbc763e Vishakha Channapattan 2021-03-24 914 mpidw0 = pm8001_mr32(pm8001_ha->general_stat_tbl_addr, 0);
47c563cdbc763e Vishakha Channapattan 2021-03-24 915 c = sysfs_emit(buf, "MPI-S=%s\t HMI_ERR=%x\n", mpiStateText[mpidw0 & 0x0003],
47c563cdbc763e Vishakha Channapattan 2021-03-24 @916 ((mpidw0 & 0xff00) >> 16));
^^^^^^^^^^^^^^^^^^^^^^^
0xff00 >> 16 is zero.

47c563cdbc763e Vishakha Channapattan 2021-03-24 917 return c;
47c563cdbc763e Vishakha Channapattan 2021-03-24 918 }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31712 bytes --]

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org