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: <202009072037.xVBysplL%lkp@intel.com>
Date:   Mon, 7 Sep 2020 20:08:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     Paul Barker <pbarker@...sulko.com>,
        Woojung Huh <woojung.huh@...rochip.com>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S . Miller" <davem@...emloft.net>
Cc:     kbuild-all@...ts.01.org, Paul Barker <pbarker@...sulko.com>,
        netdev@...r.kernel.org
Subject: Re: [PATCH v2 2/4] net: dsa: microchip: Improve phy mode message

Hi Paul,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.9-rc4 next-20200903]
[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/Paul-Barker/ksz9477-dsa-switch-driver-improvements/20200907-181434
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f4d51dffc6c01a9e94650d95ce0104964f8ae822
config: mips-randconfig-s031-20200907 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips 

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


sparse warnings: (new ones prefixed by >>)

>> drivers/net/dsa/microchip/ksz9477.c:1283:43: sparse: sparse: incorrect type in assignment (different modifiers) @@     expected char *prev_mode @@     got char const * @@
>> drivers/net/dsa/microchip/ksz9477.c:1283:43: sparse:     expected char *prev_mode
>> drivers/net/dsa/microchip/ksz9477.c:1283:43: sparse:     got char const *

# https://github.com/0day-ci/linux/commit/1513424eb4a28841a6305ecbbf6a172b4a605014
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Paul-Barker/ksz9477-dsa-switch-driver-improvements/20200907-181434
git checkout 1513424eb4a28841a6305ecbbf6a172b4a605014
vim +1283 drivers/net/dsa/microchip/ksz9477.c

  1256	
  1257	static void ksz9477_config_cpu_port(struct dsa_switch *ds)
  1258	{
  1259		struct ksz_device *dev = ds->priv;
  1260		struct ksz_port *p;
  1261		int i;
  1262	
  1263		ds->num_ports = dev->port_cnt;
  1264	
  1265		for (i = 0; i < dev->port_cnt; i++) {
  1266			if (dsa_is_cpu_port(ds, i) && (dev->cpu_ports & (1 << i))) {
  1267				phy_interface_t interface;
  1268				char *prev_msg, *prev_mode;
  1269	
  1270				dev->cpu_port = i;
  1271				dev->host_mask = (1 << dev->cpu_port);
  1272				dev->port_mask |= dev->host_mask;
  1273	
  1274				/* Read from XMII register to determine host port
  1275				 * interface.  If set specifically in device tree
  1276				 * note the difference to help debugging.
  1277				 */
  1278				interface = ksz9477_get_interface(dev, i);
  1279				if (!dev->interface)
  1280					dev->interface = interface;
  1281				if (interface && interface != dev->interface) {
  1282					prev_msg = " instead of ";
> 1283					prev_mode = phy_modes(interface);
  1284				} else {
  1285					prev_msg = "";
  1286					prev_mode = "";
  1287				}
  1288				dev_info(dev->dev,
  1289					 "Port%d: using phy mode %s%s%s\n",
  1290					 i,
  1291					 phy_modes(dev->interface),
  1292					 prev_msg,
  1293					 prev_mode);
  1294	
  1295				/* enable cpu port */
  1296				ksz9477_port_setup(dev, i, true);
  1297				p = &dev->ports[dev->cpu_port];
  1298				p->vid_member = dev->port_mask;
  1299				p->on = 1;
  1300			}
  1301		}
  1302	
  1303		dev->member = dev->host_mask;
  1304	
  1305		for (i = 0; i < dev->mib_port_cnt; i++) {
  1306			if (i == dev->cpu_port)
  1307				continue;
  1308			p = &dev->ports[i];
  1309	
  1310			/* Initialize to non-zero so that ksz_cfg_port_member() will
  1311			 * be called.
  1312			 */
  1313			p->vid_member = (1 << i);
  1314			p->member = dev->port_mask;
  1315			ksz9477_port_stp_state_set(ds, i, BR_STATE_DISABLED);
  1316			p->on = 1;
  1317			if (i < dev->phy_port_cnt)
  1318				p->phy = 1;
  1319			if (dev->chip_id == 0x00947700 && i == 6) {
  1320				p->sgmii = 1;
  1321	
  1322				/* SGMII PHY detection code is not implemented yet. */
  1323				p->phy = 0;
  1324			}
  1325		}
  1326	}
  1327	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ