All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: [lee-linaro:tb-fix-w1-warnings 215/226] drivers/scsi/bfa/bfa_fcs_lport.c:1912 bfa_fcs_lport_fdmi_build_rhba_pyld() warn: signedness bug returning '(-12)'
Date: Sat, 27 Feb 2021 12:32:45 +0300	[thread overview]
Message-ID: <20210227093245.GF2087@kadam> (raw)

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

Hi Lee,

First bad commit (maybe != root cause):

tree:   https://git.linaro.org/people/lee.jones/linux.git tb-fix-w1-warnings
head:   49fe493a5f7cebaec70944df919df3350d4cb520
commit: ffdcc79844033bab9aae2f65246b91334831ee11 [215/226] fixup! scsi: bfa: bfa_fcs_lport: Move a large struct from the stack onto the heap
config: xtensa-randconfig-m031-20210227 (attached as .config)
compiler: xtensa-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>

smatch warnings:
drivers/scsi/bfa/bfa_fcs_lport.c:1912 bfa_fcs_lport_fdmi_build_rhba_pyld() warn: signedness bug returning '(-12)'

vim +1912 drivers/scsi/bfa/bfa_fcs_lport.c

a36c61f9025b8924 Krishna Gudipati   2010-09-15  1899  static          u16
                                                                      ^^^

a36c61f9025b8924 Krishna Gudipati   2010-09-15  1900  bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1901  {
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1902  	struct bfa_fcs_lport_s *port = fdmi->ms->port;
ffdcc79844033bab Lee Jones          2021-02-26  1903  	struct bfa_fcs_fdmi_hba_attr_s *fcs_hba_attr;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1904  	struct fdmi_rhba_s *rhba = (struct fdmi_rhba_s *) pyld;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1905  	struct fdmi_attr_s *attr;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1906  	u8        *curr_ptr;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1907  	u16        len, count;
50444a340028119c Maggie             2010-11-29  1908  	u16	templen;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1909  
ffdcc79844033bab Lee Jones          2021-02-26  1910  	fcs_hba_attr = kzalloc(sizeof(*fcs_hba_attr), GFP_KERNEL);
ffdcc79844033bab Lee Jones          2021-02-26  1911  	if (!fcs_hba_attr)
7ba45b2cf0939bf6 Lee Jones          2021-02-25 @1912  		return -ENOMEM;
                                                                ^^^^^^^^^^^^^^^
-ENOMEM gets truncated to u16

7ba45b2cf0939bf6 Lee Jones          2021-02-25  1913  
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1914  	/*
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1915  	 * get hba attributes
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1916  	 */
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1917  	bfa_fcs_fdmi_get_hbaattr(fdmi, fcs_hba_attr);
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1918  
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1919  	rhba->hba_id = bfa_fcs_lport_get_pwwn(port);

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

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [lee-linaro:tb-fix-w1-warnings 215/226] drivers/scsi/bfa/bfa_fcs_lport.c:1912 bfa_fcs_lport_fdmi_build_rhba_pyld() warn: signedness bug returning '(-12)'
Date: Sat, 27 Feb 2021 12:32:45 +0300	[thread overview]
Message-ID: <20210227093245.GF2087@kadam> (raw)

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

Hi Lee,

First bad commit (maybe != root cause):

tree:   https://git.linaro.org/people/lee.jones/linux.git tb-fix-w1-warnings
head:   49fe493a5f7cebaec70944df919df3350d4cb520
commit: ffdcc79844033bab9aae2f65246b91334831ee11 [215/226] fixup! scsi: bfa: bfa_fcs_lport: Move a large struct from the stack onto the heap
config: xtensa-randconfig-m031-20210227 (attached as .config)
compiler: xtensa-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>

smatch warnings:
drivers/scsi/bfa/bfa_fcs_lport.c:1912 bfa_fcs_lport_fdmi_build_rhba_pyld() warn: signedness bug returning '(-12)'

vim +1912 drivers/scsi/bfa/bfa_fcs_lport.c

a36c61f9025b8924 Krishna Gudipati   2010-09-15  1899  static          u16
                                                                      ^^^

a36c61f9025b8924 Krishna Gudipati   2010-09-15  1900  bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1901  {
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1902  	struct bfa_fcs_lport_s *port = fdmi->ms->port;
ffdcc79844033bab Lee Jones          2021-02-26  1903  	struct bfa_fcs_fdmi_hba_attr_s *fcs_hba_attr;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1904  	struct fdmi_rhba_s *rhba = (struct fdmi_rhba_s *) pyld;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1905  	struct fdmi_attr_s *attr;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1906  	u8        *curr_ptr;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1907  	u16        len, count;
50444a340028119c Maggie             2010-11-29  1908  	u16	templen;
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1909  
ffdcc79844033bab Lee Jones          2021-02-26  1910  	fcs_hba_attr = kzalloc(sizeof(*fcs_hba_attr), GFP_KERNEL);
ffdcc79844033bab Lee Jones          2021-02-26  1911  	if (!fcs_hba_attr)
7ba45b2cf0939bf6 Lee Jones          2021-02-25 @1912  		return -ENOMEM;
                                                                ^^^^^^^^^^^^^^^
-ENOMEM gets truncated to u16

7ba45b2cf0939bf6 Lee Jones          2021-02-25  1913  
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1914  	/*
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1915  	 * get hba attributes
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1916  	 */
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1917  	bfa_fcs_fdmi_get_hbaattr(fdmi, fcs_hba_attr);
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1918  
a36c61f9025b8924 Krishna Gudipati   2010-09-15  1919  	rhba->hba_id = bfa_fcs_lport_get_pwwn(port);

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

             reply	other threads:[~2021-02-27  9:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-27  9:32 Dan Carpenter [this message]
2021-02-27  9:32 ` [lee-linaro:tb-fix-w1-warnings 215/226] drivers/scsi/bfa/bfa_fcs_lport.c:1912 bfa_fcs_lport_fdmi_build_rhba_pyld() warn: signedness bug returning '(-12)' Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2021-02-27  0:30 kernel test robot

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=20210227093245.GF2087@kadam \
    --to=dan.carpenter@oracle.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.