All of lore.kernel.org
 help / color / mirror / Atom feed
* [alaahl:netdev-next 265/280] drivers/net/dsa/mv88e6xxx/chip.c:5431:9: error: implicit declaration of function 'mv88e6xxx_g2_trunk_mapping_write'
@ 2021-01-15  9:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-15  9:39 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/alaahl/linux.git netdev-next
head:   1d9f03c0a15fa01aa14fb295cbc1236403fceb0b
commit: 57e661aae6a823140787dbcc34d92e223e2f71c5 [265/280] net: dsa: mv88e6xxx: Link aggregation support
config: arm-randconfig-r002-20210115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/alaahl/linux/commit/57e661aae6a823140787dbcc34d92e223e2f71c5
        git remote add alaahl https://github.com/alaahl/linux.git
        git fetch --no-tags alaahl netdev-next
        git checkout 57e661aae6a823140787dbcc34d92e223e2f71c5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

>> drivers/net/dsa/mv88e6xxx/chip.c:5431:9: error: implicit declaration of function 'mv88e6xxx_g2_trunk_mapping_write' [-Werror,-Wimplicit-function-declaration]
           return mv88e6xxx_g2_trunk_mapping_write(chip, id, map);
                  ^
   drivers/net/dsa/mv88e6xxx/chip.c:5431:9: note: did you mean 'mv88e6xxx_g2_device_mapping_write'?
   drivers/net/dsa/mv88e6xxx/global2.h:528:19: note: 'mv88e6xxx_g2_device_mapping_write' declared here
   static inline int mv88e6xxx_g2_device_mapping_write(struct mv88e6xxx_chip *chip,
                     ^
>> drivers/net/dsa/mv88e6xxx/chip.c:5524:9: error: implicit declaration of function 'mv88e6xxx_g2_trunk_mask_write' [-Werror,-Wimplicit-function-declaration]
                   err = mv88e6xxx_g2_trunk_mask_write(chip, i, true, mask[i]);
                         ^
   2 errors generated.


vim +/mv88e6xxx_g2_trunk_mapping_write +5431 drivers/net/dsa/mv88e6xxx/chip.c

  5414	
  5415	static int mv88e6xxx_lag_sync_map(struct dsa_switch *ds, struct net_device *lag)
  5416	{
  5417		struct mv88e6xxx_chip *chip = ds->priv;
  5418		struct dsa_port *dp;
  5419		u16 map = 0;
  5420		int id;
  5421	
  5422		id = dsa_lag_id(ds->dst, lag);
  5423	
  5424		/* Build the map of all ports to distribute flows destined for
  5425		 * this LAG. This can be either a local user port, or a DSA
  5426		 * port if the LAG port is on a remote chip.
  5427		 */
  5428		dsa_lag_foreach_port(dp, ds->dst, lag)
  5429			map |= BIT(dsa_towards_port(ds, dp->ds->index, dp->index));
  5430	
> 5431		return mv88e6xxx_g2_trunk_mapping_write(chip, id, map);
  5432	}
  5433	
  5434	static const u8 mv88e6xxx_lag_mask_table[8][8] = {
  5435		/* Row number corresponds to the number of active members in a
  5436		 * LAG. Each column states which of the eight hash buckets are
  5437		 * mapped to the column:th port in the LAG.
  5438		 *
  5439		 * Example: In a LAG with three active ports, the second port
  5440		 * ([2][1]) would be selected for traffic mapped to buckets
  5441		 * 3,4,5 (0x38).
  5442		 */
  5443		{ 0xff,    0,    0,    0,    0,    0,    0,    0 },
  5444		{ 0x0f, 0xf0,    0,    0,    0,    0,    0,    0 },
  5445		{ 0x07, 0x38, 0xc0,    0,    0,    0,    0,    0 },
  5446		{ 0x03, 0x0c, 0x30, 0xc0,    0,    0,    0,    0 },
  5447		{ 0x03, 0x0c, 0x30, 0x40, 0x80,    0,    0,    0 },
  5448		{ 0x03, 0x0c, 0x10, 0x20, 0x40, 0x80,    0,    0 },
  5449		{ 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,    0 },
  5450		{ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 },
  5451	};
  5452	
  5453	static void mv88e6xxx_lag_set_port_mask(u16 *mask, int port,
  5454						int num_tx, int nth)
  5455	{
  5456		u8 active = 0;
  5457		int i;
  5458	
  5459		num_tx = num_tx <= 8 ? num_tx : 8;
  5460		if (nth < num_tx)
  5461			active = mv88e6xxx_lag_mask_table[num_tx - 1][nth];
  5462	
  5463		for (i = 0; i < 8; i++) {
  5464			if (BIT(i) & active)
  5465				mask[i] |= BIT(port);
  5466		}
  5467	}
  5468	
  5469	static int mv88e6xxx_lag_sync_masks(struct dsa_switch *ds)
  5470	{
  5471		struct mv88e6xxx_chip *chip = ds->priv;
  5472		unsigned int id, num_tx;
  5473		struct net_device *lag;
  5474		struct dsa_port *dp;
  5475		int i, err, nth;
  5476		u16 mask[8];
  5477		u16 ivec;
  5478	
  5479		/* Assume no port is a member of any LAG. */
  5480		ivec = BIT(mv88e6xxx_num_ports(chip)) - 1;
  5481	
  5482		/* Disable all masks for ports that _are_ members of a LAG. */
  5483		list_for_each_entry(dp, &ds->dst->ports, list) {
  5484			if (!dp->lag_dev || dp->ds != ds)
  5485				continue;
  5486	
  5487			ivec &= ~BIT(dp->index);
  5488		}
  5489	
  5490		for (i = 0; i < 8; i++)
  5491			mask[i] = ivec;
  5492	
  5493		/* Enable the correct subset of masks for all LAG ports that
  5494		 * are in the Tx set.
  5495		 */
  5496		dsa_lags_foreach_id(id, ds->dst) {
  5497			lag = dsa_lag_dev(ds->dst, id);
  5498			if (!lag)
  5499				continue;
  5500	
  5501			num_tx = 0;
  5502			dsa_lag_foreach_port(dp, ds->dst, lag) {
  5503				if (dp->lag_tx_enabled)
  5504					num_tx++;
  5505			}
  5506	
  5507			if (!num_tx)
  5508				continue;
  5509	
  5510			nth = 0;
  5511			dsa_lag_foreach_port(dp, ds->dst, lag) {
  5512				if (!dp->lag_tx_enabled)
  5513					continue;
  5514	
  5515				if (dp->ds == ds)
  5516					mv88e6xxx_lag_set_port_mask(mask, dp->index,
  5517								    num_tx, nth);
  5518	
  5519				nth++;
  5520			}
  5521		}
  5522	
  5523		for (i = 0; i < 8; i++) {
> 5524			err = mv88e6xxx_g2_trunk_mask_write(chip, i, true, mask[i]);
  5525			if (err)
  5526				return err;
  5527		}
  5528	
  5529		return 0;
  5530	}
  5531	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-15  9:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15  9:39 [alaahl:netdev-next 265/280] drivers/net/dsa/mv88e6xxx/chip.c:5431:9: error: implicit declaration of function 'mv88e6xxx_g2_trunk_mapping_write' kernel test robot

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.