All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [mkp-scsi:for-next 304/324] drivers/scsi/smartpqi/smartpqi_sas_transport.c:97 pqi_sas_port_add_rphy() warn: variable dereferenced before check 'pqi_sas_port->device' (see line 95)
Date: Tue, 06 Apr 2021 17:59:04 +0800	[thread overview]
Message-ID: <202104061753.gY5nqVn4-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
TO: Murthy Bhat <Murthy.Bhat@microchip.com>
CC: "Martin K. Petersen" <martin.petersen@oracle.com>
CC: Scott Benesh <scott.benesh@microchip.com>
CC: Mike McGowen <mike.mcgowen@microchip.com>
CC: Scott Teel <scott.teel@microchip.com>
CC: Kevin Barnett <kevin.barnett@microchip.com>
CC: Martin Wilck <mwilck@suse.com>
CC: Don Brace <don.brace@microchip.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
head:   857a80bbd7321161f986588160d97815d1b1206a
commit: ec504b23df9d33260602affc50389cf070707c9b [304/324] scsi: smartpqi: Add phy ID support for the physical drives
:::::: branch date: 5 hours ago
:::::: commit date: 7 hours ago
config: i386-randconfig-m021-20210406 (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>

smatch warnings:
drivers/scsi/smartpqi/smartpqi_sas_transport.c:97 pqi_sas_port_add_rphy() warn: variable dereferenced before check 'pqi_sas_port->device' (see line 95)

vim +97 drivers/scsi/smartpqi/smartpqi_sas_transport.c

6c223761eb5482 Kevin Barnett 2016-06-27   87  
6c223761eb5482 Kevin Barnett 2016-06-27   88  static int pqi_sas_port_add_rphy(struct pqi_sas_port *pqi_sas_port,
6c223761eb5482 Kevin Barnett 2016-06-27   89  	struct sas_rphy *rphy)
6c223761eb5482 Kevin Barnett 2016-06-27   90  {
6c223761eb5482 Kevin Barnett 2016-06-27   91  	struct sas_identify *identify;
6c223761eb5482 Kevin Barnett 2016-06-27   92  
6c223761eb5482 Kevin Barnett 2016-06-27   93  	identify = &rphy->identify;
6c223761eb5482 Kevin Barnett 2016-06-27   94  	identify->sas_address = pqi_sas_port->sas_address;
ec504b23df9d33 Murthy Bhat   2021-03-11  @95  	identify->phy_identifier = pqi_sas_port->device->phy_id;
3d46a59a191e81 Don Brace     2018-12-07   96  
3d46a59a191e81 Don Brace     2018-12-07  @97  	if (pqi_sas_port->device &&
3d46a59a191e81 Don Brace     2018-12-07   98  		pqi_sas_port->device->is_expander_smp_device) {
3d46a59a191e81 Don Brace     2018-12-07   99  		identify->initiator_port_protocols = SAS_PROTOCOL_SMP;
3d46a59a191e81 Don Brace     2018-12-07  100  		identify->target_port_protocols = SAS_PROTOCOL_SMP;
3d46a59a191e81 Don Brace     2018-12-07  101  	} else {
6c223761eb5482 Kevin Barnett 2016-06-27  102  		identify->initiator_port_protocols = SAS_PROTOCOL_STP;
6c223761eb5482 Kevin Barnett 2016-06-27  103  		identify->target_port_protocols = SAS_PROTOCOL_STP;
3d46a59a191e81 Don Brace     2018-12-07  104  	}
6c223761eb5482 Kevin Barnett 2016-06-27  105  
6c223761eb5482 Kevin Barnett 2016-06-27  106  	return sas_rphy_add(rphy);
6c223761eb5482 Kevin Barnett 2016-06-27  107  }
6c223761eb5482 Kevin Barnett 2016-06-27  108  

:::::: The code at line 97 was first introduced by commit
:::::: 3d46a59a191e81f7ada771b8db71553916b851da scsi: smartpqi: add smp_utils support

:::::: TO: Don Brace <don.brace@microsemi.com>
:::::: CC: Martin K. Petersen <martin.petersen@oracle.com>

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

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

             reply	other threads:[~2021-04-06  9:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  9:59 kernel test robot [this message]
2021-04-09 10:16 [mkp-scsi:for-next 304/324] drivers/scsi/smartpqi/smartpqi_sas_transport.c:97 pqi_sas_port_add_rphy() warn: variable dereferenced before check 'pqi_sas_port->device' (see line 95) Dan Carpenter
2021-04-13 13:09 Dan Carpenter
2021-04-13 13:09 ` Dan Carpenter
2021-04-14  2:33 ` Martin K. Petersen
2021-04-14  5:24   ` Dan Carpenter
2021-04-14  5:24     ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202104061753.gY5nqVn4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.