All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH 08/14] mpt3sas: Update hba_port objects after host reset
Date: Sat, 10 Oct 2020 07:49:00 +0800	[thread overview]
Message-ID: <202010100744.qSBn87Oe-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20201009171440.4949-9-sreekanth.reddy@broadcom.com>
References: <20201009171440.4949-9-sreekanth.reddy@broadcom.com>
TO: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
TO: martin.petersen(a)oracle.com
CC: linux-scsi(a)vger.kernel.org
CC: sathya.prakash(a)broadcom.com
CC: suganath-prabu.subramani(a)broadcom.com
CC: Sreekanth Reddy <sreekanth.reddy@broadcom.com>

Hi Sreekanth,

I love your patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on mkp-scsi/for-next v5.9-rc8 next-20201009]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sreekanth-Reddy/mpt3sas-Add-support-for-multi-port-path-topology/20201010-011607
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
config: s390-randconfig-m031-20201009 (attached as .config)
compiler: s390-linux-gcc (GCC) 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/mpt3sas/mpt3sas_scsih.c:5940 _scsih_look_and_get_matched_port_entry() error: uninitialized symbol 'matched_code'.

Old smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_scsih.c:5949 _scsih_look_and_get_matched_port_entry() error: uninitialized symbol 'matched_code'.
drivers/scsi/mpt3sas/mpt3sas_scsih.c:5961 _scsih_look_and_get_matched_port_entry() error: uninitialized symbol 'matched_code'.
drivers/scsi/mpt3sas/mpt3sas_scsih.c:6472 _scsih_expander_add() warn: returning -1 instead of -ENOMEM is sloppy
drivers/scsi/mpt3sas/mpt3sas_scsih.c:10234 _mpt3sas_fw_work() warn: inconsistent indenting

vim +/matched_code +5940 drivers/scsi/mpt3sas/mpt3sas_scsih.c

2756bd46f6fdde Sreekanth Reddy 2020-10-09  5897  
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5898  /**
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5899   * _scsih_look_and_get_matched_port_entry - Get matched hba port entry
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5900   *					from HBA port table
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5901   * @ioc: per adapter object
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5902   * @port_entry - hba port entry from temporary port table which needs to be
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5903   *		searched for matched entry in the HBA port table
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5904   * @matched_port_entry - save matched hba port entry here
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5905   * @count - count of matched entries
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5906   *
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5907   * return type of matched entry found.
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5908   */
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5909  static enum hba_port_matched_codes
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5910  _scsih_look_and_get_matched_port_entry(struct MPT3SAS_ADAPTER *ioc,
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5911  	struct hba_port *port_entry,
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5912  	struct hba_port **matched_port_entry, int *count)
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5913  {
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5914  	struct hba_port *port_table_entry, *matched_port = NULL;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5915  	enum hba_port_matched_codes matched_code;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5916  	int lcount = 0;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5917  	*matched_port_entry = NULL;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5918  
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5919  	list_for_each_entry(port_table_entry, &ioc->port_table_list, list) {
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5920  		if (!(port_table_entry->flags & HBA_PORT_FLAG_DIRTY_PORT))
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5921  			continue;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5922  
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5923  		if ((port_table_entry->sas_address == port_entry->sas_address)
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5924  		    && (port_table_entry->phy_mask == port_entry->phy_mask)) {
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5925  			matched_code = MATCHED_WITH_ADDR_AND_PHYMASK;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5926  			matched_port = port_table_entry;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5927  			break;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5928  		}
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5929  
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5930  		if ((port_table_entry->sas_address == port_entry->sas_address)
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5931  		    && (port_table_entry->phy_mask & port_entry->phy_mask)
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5932  		    && (port_table_entry->port_id == port_entry->port_id)) {
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5933  			matched_code = MATCHED_WITH_ADDR_SUBPHYMASK_AND_PORT;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5934  			matched_port = port_table_entry;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5935  			continue;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5936  		}
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5937  
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5938  		if ((port_table_entry->sas_address == port_entry->sas_address)
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5939  		    && (port_table_entry->phy_mask & port_entry->phy_mask)) {
2756bd46f6fdde Sreekanth Reddy 2020-10-09 @5940  			if (matched_code ==
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5941  			    MATCHED_WITH_ADDR_SUBPHYMASK_AND_PORT)
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5942  				continue;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5943  			matched_code = MATCHED_WITH_ADDR_AND_SUBPHYMASK;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5944  			matched_port = port_table_entry;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5945  			continue;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5946  		}
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5947  
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5948  		if (port_table_entry->sas_address == port_entry->sas_address) {
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5949  			if (matched_code ==
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5950  			    MATCHED_WITH_ADDR_SUBPHYMASK_AND_PORT)
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5951  				continue;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5952  			if (matched_code == MATCHED_WITH_ADDR_AND_SUBPHYMASK)
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5953  				continue;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5954  			matched_code = MATCHED_WITH_ADDR;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5955  			matched_port = port_table_entry;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5956  			lcount++;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5957  		}
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5958  	}
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5959  
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5960  	*matched_port_entry = matched_port;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5961  	if (matched_code ==  MATCHED_WITH_ADDR)
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5962  		*count = lcount;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5963  	return matched_code;
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5964  }
2756bd46f6fdde Sreekanth Reddy 2020-10-09  5965  

---
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: 29356 bytes --]

             reply	other threads:[~2020-10-09 23:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 23:49 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-09 17:14 [PATCH 00/14] mpt3sas: Add support for multi-port path topology Sreekanth Reddy
2020-10-09 17:14 ` [PATCH 08/14] mpt3sas: Update hba_port objects after host reset Sreekanth Reddy
2020-10-12 12:22   ` Dan Carpenter
2020-10-12 12:22     ` Dan Carpenter
2020-10-12 12:22     ` 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=202010100744.qSBn87Oe-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.