lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202101072035.p3B0IIfz-lkp@intel.com>
Date:   Thu, 7 Jan 2021 21:01:03 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vladimir Oltean <olteanv@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Eric Dumazet <edumazet@...gle.com>,
        George McCollister <george.mccollister@...il.com>,
        Oleksij Rempel <o.rempel@...gutronix.de>
Subject: Re: [PATCH v3 net-next 08/12] net: make dev_get_stats return void

Hi Vladimir,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Vladimir-Oltean/Make-ndo_get_stats64-sleepable/20210107-175746
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 3db1a3fa98808aa90f95ec3e0fa2fc7abf28f5c9
config: x86_64-randconfig-a005-20210107 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/5d1dbcbfc55bf64381ca2bf9833e95f2256a7b3f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vladimir-Oltean/Make-ndo_get_stats64-sleepable/20210107-175746
        git checkout 5d1dbcbfc55bf64381ca2bf9833e95f2256a7b3f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/scsi/fcoe/fcoe_transport.c:176:19: error: redefinition of 'stats' with a different type: 'struct fc_stats *' vs 'struct rtnl_link_stats64'
           struct fc_stats *stats;
                            ^
   drivers/scsi/fcoe/fcoe_transport.c:173:27: note: previous definition is here
           struct rtnl_link_stats64 stats;
                                    ^
>> drivers/scsi/fcoe/fcoe_transport.c:185:9: error: assigning to 'struct rtnl_link_stats64' from incompatible type 'typeof ((typeof (*((lport->stats))) *)((lport->stats)))' (aka 'struct fc_stats *')
                   stats = per_cpu_ptr(lport->stats, cpu);
                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/fcoe/fcoe_transport.c:186:15: error: member reference type 'struct rtnl_link_stats64' is not a pointer; did you mean to use '.'?
                   lfc += stats->LinkFailureCount;
                          ~~~~~^~
                               .
   drivers/scsi/fcoe/fcoe_transport.c:186:17: error: no member named 'LinkFailureCount' in 'struct rtnl_link_stats64'
                   lfc += stats->LinkFailureCount;
                          ~~~~~  ^
   drivers/scsi/fcoe/fcoe_transport.c:187:16: error: member reference type 'struct rtnl_link_stats64' is not a pointer; did you mean to use '.'?
                   vlfc += stats->VLinkFailureCount;
                           ~~~~~^~
                                .
   drivers/scsi/fcoe/fcoe_transport.c:187:18: error: no member named 'VLinkFailureCount' in 'struct rtnl_link_stats64'
                   vlfc += stats->VLinkFailureCount;
                           ~~~~~  ^
   drivers/scsi/fcoe/fcoe_transport.c:188:16: error: member reference type 'struct rtnl_link_stats64' is not a pointer; did you mean to use '.'?
                   mdac += stats->MissDiscAdvCount;
                           ~~~~~^~
                                .
   drivers/scsi/fcoe/fcoe_transport.c:188:18: error: no member named 'MissDiscAdvCount' in 'struct rtnl_link_stats64'
                   mdac += stats->MissDiscAdvCount;
                           ~~~~~  ^
   drivers/scsi/fcoe/fcoe_transport.c:866:27: warning: cast to smaller integer type 'enum fip_mode' from 'void *' [-Wvoid-pointer-to-enum-cast]
           enum fip_mode fip_mode = (enum fip_mode)kp->arg;
                                    ^~~~~~~~~~~~~~~~~~~~~~
   1 warning and 8 errors generated.


vim +185 drivers/scsi/fcoe/fcoe_transport.c

03702689fcc985e Yi Zou                  2012-12-06  159  
57c2728fa806aff Yi Zou                  2012-12-06  160  /**
57c2728fa806aff Yi Zou                  2012-12-06  161   * __fcoe_get_lesb() - Get the Link Error Status Block (LESB) for a given lport
57c2728fa806aff Yi Zou                  2012-12-06  162   * @lport: The local port to update speeds for
57c2728fa806aff Yi Zou                  2012-12-06  163   * @fc_lesb: Pointer to the LESB to be filled up
57c2728fa806aff Yi Zou                  2012-12-06  164   * @netdev: Pointer to the netdev that is associated with the lport
57c2728fa806aff Yi Zou                  2012-12-06  165   *
57c2728fa806aff Yi Zou                  2012-12-06  166   * Note, the Link Error Status Block (LESB) for FCoE is defined in FC-BB-6
57c2728fa806aff Yi Zou                  2012-12-06  167   * Clause 7.11 in v1.04.
57c2728fa806aff Yi Zou                  2012-12-06  168   */
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  169  void __fcoe_get_lesb(struct fc_lport *lport,
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  170  		     struct fc_els_lesb *fc_lesb,
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  171  		     struct net_device *netdev)
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  172  {
5d1dbcbfc55bf64 Vladimir Oltean         2021-01-07  173  	struct rtnl_link_stats64 stats;
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  174  	unsigned int cpu;
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  175  	u32 lfc, vlfc, mdac;
1bd49b482077e23 Vasu Dev                2012-05-25  176  	struct fc_stats *stats;
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  177  	struct fcoe_fc_els_lesb *lesb;
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  178  
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  179  	lfc = 0;
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  180  	vlfc = 0;
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  181  	mdac = 0;
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  182  	lesb = (struct fcoe_fc_els_lesb *)fc_lesb;
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  183  	memset(lesb, 0, sizeof(*lesb));
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  184  	for_each_possible_cpu(cpu) {
1bd49b482077e23 Vasu Dev                2012-05-25 @185  		stats = per_cpu_ptr(lport->stats, cpu);
1bd49b482077e23 Vasu Dev                2012-05-25  186  		lfc += stats->LinkFailureCount;
1bd49b482077e23 Vasu Dev                2012-05-25  187  		vlfc += stats->VLinkFailureCount;
1bd49b482077e23 Vasu Dev                2012-05-25  188  		mdac += stats->MissDiscAdvCount;
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  189  	}
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  190  	lesb->lesb_link_fail = htonl(lfc);
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  191  	lesb->lesb_vlink_fail = htonl(vlfc);
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  192  	lesb->lesb_miss_fka = htonl(mdac);
5d1dbcbfc55bf64 Vladimir Oltean         2021-01-07  193  	dev_get_stats(netdev, &stats);
5d1dbcbfc55bf64 Vladimir Oltean         2021-01-07  194  	lesb->lesb_fcs_error = htonl(stats.rx_crc_errors);
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  195  }
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  196  EXPORT_SYMBOL_GPL(__fcoe_get_lesb);
814740d5f67ae5f Bhanu Prakash Gollapudi 2011-10-03  197  

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

Download attachment ".config.gz" of type "application/gzip" (47100 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ