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  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]
Date:   Sun, 22 Nov 2020 17:42:31 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christian Eggers <ceggers@...i.de>,
        Richard Cochran <richardcochran@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     kbuild-all@...ts.01.org, Vladimir Oltean <olteanv@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Christian Eggers <ceggers@...i.de>
Subject: Re: [PATCH net-next 3/3] net: phy: mscc: use new PTP_MSGTYPE_*
 defines

Hi Christian,

I love your patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Christian-Eggers/net-ptp-use-common-defines-for-PTP-message-types-in-further-drivers/20201122-163319
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git f9e425e99b0756c1479042afe761073779df2a30
config: sparc-randconfig-r012-20201122 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
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
        # https://github.com/0day-ci/linux/commit/78cc4b0e1739511ed9712c9466a48ddc6885d153
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Christian-Eggers/net-ptp-use-common-defines-for-PTP-message-types-in-further-drivers/20201122-163319
        git checkout 78cc4b0e1739511ed9712c9466a48ddc6885d153
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc 

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

All warnings (new ones prefixed by >>):

   drivers/net/phy/mscc/mscc_ptp.c: In function 'vsc85xx_ptp_cmp_init':
   drivers/net/phy/mscc/mscc_ptp.c:510:3: error: 'PTP_MSGTYPE_SYNC' undeclared (first use in this function); did you mean 'CSD_TYPE_SYNC'?
     510 |   PTP_MSGTYPE_SYNC,
         |   ^~~~~~~~~~~~~~~~
         |   CSD_TYPE_SYNC
   drivers/net/phy/mscc/mscc_ptp.c:510:3: note: each undeclared identifier is reported only once for each function it appears in
   drivers/net/phy/mscc/mscc_ptp.c:511:3: error: 'PTP_MSGTYPE_DELAY_REQ' undeclared (first use in this function)
     511 |   PTP_MSGTYPE_DELAY_REQ
         |   ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/phy/mscc/mscc_ptp.c: In function 'vsc85xx_ptp_conf':
   drivers/net/phy/mscc/mscc_ptp.c:851:3: error: 'PTP_MSGTYPE_SYNC' undeclared (first use in this function); did you mean 'CSD_TYPE_SYNC'?
     851 |   PTP_MSGTYPE_SYNC,
         |   ^~~~~~~~~~~~~~~~
         |   CSD_TYPE_SYNC
>> drivers/net/phy/mscc/mscc_ptp.c:851:3: warning: initialization of 'unsigned char' from 'u8 *' {aka 'unsigned char *'} makes integer from pointer without a cast [-Wint-conversion]
   drivers/net/phy/mscc/mscc_ptp.c:851:3: note: (near initialization for 'msgs[0]')
   drivers/net/phy/mscc/mscc_ptp.c:852:3: error: 'PTP_MSGTYPE_DELAY_REQ' undeclared (first use in this function)
     852 |   PTP_MSGTYPE_DELAY_REQ
         |   ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/phy/mscc/mscc_ptp.c:852:3: warning: initialization of 'unsigned char' from 'u8 *' {aka 'unsigned char *'} makes integer from pointer without a cast [-Wint-conversion]
   drivers/net/phy/mscc/mscc_ptp.c:852:3: note: (near initialization for 'msgs[1]')
>> drivers/net/phy/mscc/mscc_ptp.c:861:20: warning: comparison between pointer and integer
     861 |   else if (msgs[i] == PTP_MSGTYPE_SYNC && one_step)
         |                    ^~

vim +851 drivers/net/phy/mscc/mscc_ptp.c

   846	
   847	static int vsc85xx_ptp_conf(struct phy_device *phydev, enum ts_blk blk,
   848				    bool one_step, bool enable)
   849	{
   850		u8 msgs[] = {
 > 851			PTP_MSGTYPE_SYNC,
   852			PTP_MSGTYPE_DELAY_REQ
   853		};
   854		u32 val;
   855		u8 i;
   856	
   857		for (i = 0; i < ARRAY_SIZE(msgs); i++) {
   858			if (blk == INGRESS)
   859				vsc85xx_ts_ptp_action_flow(phydev, blk, msgs[i],
   860							   PTP_WRITE_NS);
 > 861			else if (msgs[i] == PTP_MSGTYPE_SYNC && one_step)
   862				/* no need to know Sync t when sending in one_step */
   863				vsc85xx_ts_ptp_action_flow(phydev, blk, msgs[i],
   864							   PTP_WRITE_1588);
   865			else
   866				vsc85xx_ts_ptp_action_flow(phydev, blk, msgs[i],
   867							   PTP_SAVE_IN_TS_FIFO);
   868	
   869			val = vsc85xx_ts_read_csr(phydev, blk,
   870						  MSCC_ANA_PTP_FLOW_ENA(i));
   871			val &= ~PTP_FLOW_ENA;
   872			if (enable)
   873				val |= PTP_FLOW_ENA;
   874			vsc85xx_ts_write_csr(phydev, blk, MSCC_ANA_PTP_FLOW_ENA(i),
   875					     val);
   876		}
   877	
   878		return 0;
   879	}
   880	

---
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" (29585 bytes)

Powered by blists - more mailing lists