tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc
head:   523c106ad4b186f1f869accf24be35c370f5e611
commit: 523c106ad4b186f1f869accf24be35c370f5e611 [192/192] scsi: tcm_qla2xxx: 
Minimize #include directives
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 523c106ad4b186f1f869accf24be35c370f5e611
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=sparc64 

All error/warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/tcm_qla2xxx.c: In function 'tcm_qla2xxx_init_lport':
>> drivers/scsi/qla2xxx/tcm_qla2xxx.c:1614:3: error: implicit declaration of 
>> function 'vzalloc'; did you mean 'kvzalloc'? 
>> [-Werror=implicit-function-declaration]
      vzalloc(array_size(65536,
      ^~~~~~~
      kvzalloc
>> drivers/scsi/qla2xxx/tcm_qla2xxx.c:1613:26: warning: assignment makes 
>> pointer from integer without a cast [-Wint-conversion]
     lport->lport_loopid_map =
                             ^
   drivers/scsi/qla2xxx/tcm_qla2xxx.c: In function 'tcm_qla2xxx_make_lport':
>> drivers/scsi/qla2xxx/tcm_qla2xxx.c:1677:2: error: implicit declaration of 
>> function 'vfree'; did you mean 'kvfree'? 
>> [-Werror=implicit-function-declaration]
     vfree(lport->lport_loopid_map);
     ^~~~~
     kvfree
   cc1: some warnings being treated as errors

vim +1614 drivers/scsi/qla2xxx/tcm_qla2xxx.c

75f8c1f6 Nicholas Bellinger 2012-05-15  1602  
75f8c1f6 Nicholas Bellinger 2012-05-15  1603  static int 
tcm_qla2xxx_init_lport(struct tcm_qla2xxx_lport *lport)
75f8c1f6 Nicholas Bellinger 2012-05-15  1604  {
75f8c1f6 Nicholas Bellinger 2012-05-15  1605    int rc;
75f8c1f6 Nicholas Bellinger 2012-05-15  1606  
75f8c1f6 Nicholas Bellinger 2012-05-15  1607    rc = 
btree_init32(&lport->lport_fcport_map);
75f8c1f6 Nicholas Bellinger 2012-05-15  1608    if (rc) {
75f8c1f6 Nicholas Bellinger 2012-05-15  1609            pr_err("Unable to 
initialize lport->lport_fcport_map btree\n");
75f8c1f6 Nicholas Bellinger 2012-05-15  1610            return rc;
75f8c1f6 Nicholas Bellinger 2012-05-15  1611    }
75f8c1f6 Nicholas Bellinger 2012-05-15  1612  
fad953ce Kees Cook          2018-06-12 @1613    lport->lport_loopid_map =
fad953ce Kees Cook          2018-06-12 @1614            
vzalloc(array_size(65536,
fad953ce Kees Cook          2018-06-12  1615                               
sizeof(struct tcm_qla2xxx_fc_loopid)));
75f8c1f6 Nicholas Bellinger 2012-05-15  1616    if (!lport->lport_loopid_map) {
75f8c1f6 Nicholas Bellinger 2012-05-15  1617            pr_err("Unable to 
allocate lport->lport_loopid_map of %zu bytes\n",
75f8c1f6 Nicholas Bellinger 2012-05-15  1618                sizeof(struct 
tcm_qla2xxx_fc_loopid) * 65536);
75f8c1f6 Nicholas Bellinger 2012-05-15  1619            
btree_destroy32(&lport->lport_fcport_map);
75f8c1f6 Nicholas Bellinger 2012-05-15  1620            return -ENOMEM;
75f8c1f6 Nicholas Bellinger 2012-05-15  1621    }
75f8c1f6 Nicholas Bellinger 2012-05-15  1622    pr_debug("qla2xxx: Allocated 
lport_loopid_map of %zu bytes\n",
75f8c1f6 Nicholas Bellinger 2012-05-15  1623           sizeof(struct 
tcm_qla2xxx_fc_loopid) * 65536);
75f8c1f6 Nicholas Bellinger 2012-05-15  1624    return 0;
75f8c1f6 Nicholas Bellinger 2012-05-15  1625  }
75f8c1f6 Nicholas Bellinger 2012-05-15  1626  
49a47f2c Nicholas Bellinger 2014-01-14  1627  static int 
tcm_qla2xxx_lport_register_cb(struct scsi_qla_host *vha,
49a47f2c Nicholas Bellinger 2014-01-14  1628                                    
 void *target_lport_ptr,
49a47f2c Nicholas Bellinger 2014-01-14  1629                                    
 u64 npiv_wwpn, u64 npiv_wwnn)
75f8c1f6 Nicholas Bellinger 2012-05-15  1630  {
49a47f2c Nicholas Bellinger 2014-01-14  1631    struct qla_hw_data *ha = 
vha->hw;
49a47f2c Nicholas Bellinger 2014-01-14  1632    struct tcm_qla2xxx_lport *lport 
=
49a47f2c Nicholas Bellinger 2014-01-14  1633                    (struct 
tcm_qla2xxx_lport *)target_lport_ptr;
75f8c1f6 Nicholas Bellinger 2012-05-15  1634    /*
49a47f2c Nicholas Bellinger 2014-01-14  1635     * Setup tgt_ops, local pointer 
to vha and target_lport_ptr
75f8c1f6 Nicholas Bellinger 2012-05-15  1636     */
49a47f2c Nicholas Bellinger 2014-01-14  1637    ha->tgt.tgt_ops = 
&tcm_qla2xxx_template;
49a47f2c Nicholas Bellinger 2014-01-14  1638    vha->vha_tgt.target_lport_ptr = 
target_lport_ptr;
75f8c1f6 Nicholas Bellinger 2012-05-15  1639    lport->qla_vha = vha;
75f8c1f6 Nicholas Bellinger 2012-05-15  1640  
75f8c1f6 Nicholas Bellinger 2012-05-15  1641    return 0;
75f8c1f6 Nicholas Bellinger 2012-05-15  1642  }
75f8c1f6 Nicholas Bellinger 2012-05-15  1643  
75f8c1f6 Nicholas Bellinger 2012-05-15  1644  static struct se_wwn 
*tcm_qla2xxx_make_lport(
75f8c1f6 Nicholas Bellinger 2012-05-15  1645    struct target_fabric_configfs 
*tf,
75f8c1f6 Nicholas Bellinger 2012-05-15  1646    struct config_group *group,
75f8c1f6 Nicholas Bellinger 2012-05-15  1647    const char *name)
75f8c1f6 Nicholas Bellinger 2012-05-15  1648  {
75f8c1f6 Nicholas Bellinger 2012-05-15  1649    struct tcm_qla2xxx_lport *lport;
75f8c1f6 Nicholas Bellinger 2012-05-15  1650    u64 wwpn;
75f8c1f6 Nicholas Bellinger 2012-05-15  1651    int ret = -ENODEV;
75f8c1f6 Nicholas Bellinger 2012-05-15  1652  
75f8c1f6 Nicholas Bellinger 2012-05-15  1653    if (tcm_qla2xxx_parse_wwn(name, 
&wwpn, 1) < 0)
75f8c1f6 Nicholas Bellinger 2012-05-15  1654            return ERR_PTR(-EINVAL);
75f8c1f6 Nicholas Bellinger 2012-05-15  1655  
75f8c1f6 Nicholas Bellinger 2012-05-15  1656    lport = kzalloc(sizeof(struct 
tcm_qla2xxx_lport), GFP_KERNEL);
75f8c1f6 Nicholas Bellinger 2012-05-15  1657    if (!lport) {
75f8c1f6 Nicholas Bellinger 2012-05-15  1658            pr_err("Unable to 
allocate struct tcm_qla2xxx_lport\n");
75f8c1f6 Nicholas Bellinger 2012-05-15  1659            return ERR_PTR(-ENOMEM);
75f8c1f6 Nicholas Bellinger 2012-05-15  1660    }
75f8c1f6 Nicholas Bellinger 2012-05-15  1661    lport->lport_wwpn = wwpn;
75f8c1f6 Nicholas Bellinger 2012-05-15  1662    
tcm_qla2xxx_format_wwn(&lport->lport_name[0], TCM_QLA2XXX_NAMELEN,
75f8c1f6 Nicholas Bellinger 2012-05-15  1663                            wwpn);
c046aa0f Roland Dreier      2012-10-11  1664    sprintf(lport->lport_naa_name, 
"naa.%016llx", (unsigned long long) wwpn);
75f8c1f6 Nicholas Bellinger 2012-05-15  1665  
75f8c1f6 Nicholas Bellinger 2012-05-15  1666    ret = 
tcm_qla2xxx_init_lport(lport);
75f8c1f6 Nicholas Bellinger 2012-05-15  1667    if (ret != 0)
75f8c1f6 Nicholas Bellinger 2012-05-15  1668            goto out;
75f8c1f6 Nicholas Bellinger 2012-05-15  1669  
49a47f2c Nicholas Bellinger 2014-01-14  1670    ret = qlt_lport_register(lport, 
wwpn, 0, 0,
49a47f2c Nicholas Bellinger 2014-01-14  1671                             
tcm_qla2xxx_lport_register_cb);
75f8c1f6 Nicholas Bellinger 2012-05-15  1672    if (ret != 0)
75f8c1f6 Nicholas Bellinger 2012-05-15  1673            goto out_lport;
75f8c1f6 Nicholas Bellinger 2012-05-15  1674  
75f8c1f6 Nicholas Bellinger 2012-05-15  1675    return &lport->lport_wwn;
75f8c1f6 Nicholas Bellinger 2012-05-15  1676  out_lport:
75f8c1f6 Nicholas Bellinger 2012-05-15 @1677    vfree(lport->lport_loopid_map);
75f8c1f6 Nicholas Bellinger 2012-05-15  1678    
btree_destroy32(&lport->lport_fcport_map);
75f8c1f6 Nicholas Bellinger 2012-05-15  1679  out:
75f8c1f6 Nicholas Bellinger 2012-05-15  1680    kfree(lport);
75f8c1f6 Nicholas Bellinger 2012-05-15  1681    return ERR_PTR(ret);
75f8c1f6 Nicholas Bellinger 2012-05-15  1682  }
75f8c1f6 Nicholas Bellinger 2012-05-15  1683  

:::::: The code at line 1614 was first introduced by commit
:::::: fad953ce0b22cfd352a9a90b070c34b8791e6868 treewide: Use array_size() in 
vzalloc()

:::::: TO: Kees Cook <keesc...@chromium.org>
:::::: CC: Kees Cook <keesc...@chromium.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to