Re: [PATCH net-next v1 2/2] net: dsa: microchip: Add partial ACL support for ksz9477 switches

From: kernel test robot
Date: Mon Apr 17 2023 - 10:19:24 EST


Hi Oleksij,

kernel test robot noticed the following build warnings:

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

url: https://github.com/intel-lab-lkp/linux/commits/Oleksij-Rempel/net-dsa-microchip-rework-ksz_prmw8/20230412-012709
patch link: https://lore.kernel.org/r/20230411172456.3003003-3-o.rempel%40pengutronix.de
patch subject: [PATCH net-next v1 2/2] net: dsa: microchip: Add partial ACL support for ksz9477 switches
config: x86_64-randconfig-a011-20230417 (https://download.01.org/0day-ci/archive/20230417/202304172250.WOCLE8lZ-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/intel-lab-lkp/linux/commit/a25d395c637a31cbf5c2188bf8f8475d4bdeeee8
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Oleksij-Rempel/net-dsa-microchip-rework-ksz_prmw8/20230412-012709
git checkout a25d395c637a31cbf5c2188bf8f8475d4bdeeee8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/dsa/microchip/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304172250.WOCLE8lZ-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/net/dsa/microchip/ksz9477_acl.c:622:27: warning: no previous prototype for function 'ksz9477_acl_get_init_entry' [-Wmissing-prototypes]
struct ksz9477_acl_entry *ksz9477_acl_get_init_entry(struct ksz_device *dev,
^
drivers/net/dsa/microchip/ksz9477_acl.c:622:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct ksz9477_acl_entry *ksz9477_acl_get_init_entry(struct ksz_device *dev,
^
static
>> drivers/net/dsa/microchip/ksz9477_acl.c:887:28: warning: variable 'entry' set but not used [-Wunused-but-set-variable]
struct ksz9477_acl_entry *entry;
^
2 warnings generated.


vim +/ksz9477_acl_get_init_entry +622 drivers/net/dsa/microchip/ksz9477_acl.c

609
610 /**
611 * ksz9477_acl_get_init_entry - Get a new uninitialized entry for a specified
612 * port on a ksz_device.
613 * @dev: The ksz_device instance.
614 * @port: The port number to get the uninitialized entry for.
615 *
616 * This function retrieves the next available ACL entry for the specified port,
617 * clears all access flags, and associates it with the current cookie.
618 *
619 * Returns: A pointer to the new uninitialized ACL entry.
620 */
621
> 622 struct ksz9477_acl_entry *ksz9477_acl_get_init_entry(struct ksz_device *dev,
623 int port)
624 {
625 struct ksz9477_acl_priv *acl = dev->ports[port].acl_priv;
626 struct ksz9477_acl_entries *acles = &acl->acles;
627 struct ksz9477_acl_entry *entry;
628
629 entry = &acles->entries[acles->entries_count];
630 entry->cookie = acl->current_cookie;
631
632 /* clear all access flags */
633 entry->entry[KSZ9477_ACL_PORT_ACCESS_10] = 0;
634 entry->entry[KSZ9477_ACL_PORT_ACCESS_11] = 0;
635
636 return entry;
637 }
638

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests