[bug report] scsi: qla2xxx: Setup debugfs entries for remote ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Arun Easi,

The patch 1e98fb0f9208: "scsi: qla2xxx: Setup debugfs entries for
remote ports" from Sep 3, 2020, leads to the following static checker
warning:

	drivers/scsi/qla2xxx/qla_dfs.c:119 qla2x00_dfs_create_rport()
	warn: 'fp->dfs_rport_dir' is an error pointer or valid

drivers/scsi/qla2xxx/qla_dfs.c
   106  qla2x00_dfs_create_rport(scsi_qla_host_t *vha, struct fc_port *fp)
   107  {
   108          char wwn[32];
   109  
   110  #define QLA_CREATE_RPORT_FIELD_ATTR(_attr)                      \
   111          debugfs_create_file(#_attr, 0400, fp->dfs_rport_dir,    \
   112                  fp, &qla_dfs_rport_field_##_attr##_fops)
   113  
   114          if (!vha->dfs_rport_root || fp->dfs_rport_dir)
   115                  return;
   116  
   117          sprintf(wwn, "pn-%016llx", wwn_to_u64(fp->port_name));
   118          fp->dfs_rport_dir = debugfs_create_dir(wwn, vha->dfs_rport_root);
   119          if (!fp->dfs_rport_dir)

Just delete this test.  Debugfs functions are not supposed to be checked
in the normal case.

   120                  return;
   121          if (NVME_TARGET(vha->hw, fp))
   122                  debugfs_create_file("dev_loss_tmo", 0600, fp->dfs_rport_dir,

The debugfs_create_file() function has it's own checks built in so no
need to check.

   123                                      fp, &qla_dfs_rport_dev_loss_tmo_fops);
   124  
   125          QLA_CREATE_RPORT_FIELD_ATTR(disc_state);
   126          QLA_CREATE_RPORT_FIELD_ATTR(scan_state);
   127          QLA_CREATE_RPORT_FIELD_ATTR(fw_login_state);

regards,
dan carpenter



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux