public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [RFC net-next PATCH 2/3] mv88e6xxx: Implement remote management support (RMU)
       [not found] <20220818102924.287719-3-mattias.forsblad@gmail.com>
@ 2022-08-18 12:40 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-18 12:40 UTC (permalink / raw)
  To: Mattias Forsblad; +Cc: llvm, kbuild-all

Hi Mattias,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Mattias-Forsblad/net-dsa-mv88e6xxx-Add-RMU-support/20220818-183122
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git e34cfee65ec891a319ce79797dda18083af33a76
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220818/202208182008.s00O6DMN-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project aed5e3bea138ce581d682158eb61c27b3cfdd6ec)
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/8543f260de6b37602bb98a7c6646b97e2b94fba6
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Mattias-Forsblad/net-dsa-mv88e6xxx-Add-RMU-support/20220818-183122
        git checkout 8543f260de6b37602bb98a7c6646b97e2b94fba6
        # 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=i386 SHELL=/bin/bash drivers/net/dsa/mv88e6xxx/

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

All warnings (new ones prefixed by >>):

   drivers/net/dsa/mv88e6xxx/rmu.c:147:21: warning: variable 'master' set but not used [-Wunused-but-set-variable]
           struct net_device *master;
                              ^
>> drivers/net/dsa/mv88e6xxx/rmu.c:211:5: warning: no previous prototype for function 'mv88e6xxx_rmu_stats_get' [-Wmissing-prototypes]
   int mv88e6xxx_rmu_stats_get(struct mv88e6xxx_chip *chip, int port, uint64_t *data)
       ^
   drivers/net/dsa/mv88e6xxx/rmu.c:211:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int mv88e6xxx_rmu_stats_get(struct mv88e6xxx_chip *chip, int port, uint64_t *data)
   ^
   static 
   2 warnings generated.


vim +/mv88e6xxx_rmu_stats_get +211 drivers/net/dsa/mv88e6xxx/rmu.c

   142	
   143	static int mv88e6xxx_rmu_send_wait(struct mv88e6xxx_chip *chip, int port,
   144					   int request, const char *msg, int len)
   145	{
   146		const struct dsa_port *dp;
 > 147		struct net_device *master;
   148		int ret = 0;
   149	
   150		dp = dsa_to_port(chip->ds, port);
   151		if (!dp)
   152			return 0;
   153	
   154		master = dp->master;
   155	
   156		mutex_lock(&chip->rmu.mutex);
   157	
   158		chip->rmu.request_cmd = request;
   159	
   160		ret = mv88e6xxx_rmu_tx(chip, port, msg, len);
   161		if (ret == -ENODEV) {
   162			/* Device not ready yet? Try again later */
   163			ret = 0;
   164			goto out;
   165		}
   166	
   167		if (ret) {
   168			dev_err(chip->dev, "RMU: error transmitting request (%d)", ret);
   169			goto out;
   170		}
   171	
   172		ret = wait_for_completion_timeout(&chip->rmu.completion,
   173						  msecs_to_jiffies(MV88E6XXX_WAIT_POLL_TIME_MS));
   174		if (ret == 0) {
   175			dev_err(chip->dev,
   176				"RMU: timeout waiting for request %d (%d) on dev:port %d:%d\n",
   177				request, ret, chip->ds->index, port);
   178			ret = -ETIMEDOUT;
   179		}
   180	
   181	out:
   182		mutex_unlock(&chip->rmu.mutex);
   183	
   184		return ret > 0 ? 0 : ret;
   185	}
   186	
   187	static int mv88e6xxx_rmu_get_id(struct mv88e6xxx_chip *chip, int port)
   188	{
   189		const u8 get_id[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
   190		int ret = -1;
   191	
   192		if (chip->rmu.got_id)
   193			return 0;
   194	
   195		chip->rmu.netdev = dev_get_by_name(&init_net, "chan0");
   196		if (!chip->rmu.netdev) {
   197			dev_err(chip->dev, "RMU: unable to get interface");
   198			return -ENODEV;
   199		}
   200	
   201		ret = mv88e6xxx_rmu_send_wait(chip, port, RMU_REQ_GET_ID, get_id, 8);
   202		if (ret) {
   203			dev_err(chip->dev, "RMU: error for command GET_ID %d index %d\n", ret,
   204				chip->ds->index);
   205			return ret;
   206		}
   207	
   208		return 0;
   209	}
   210	
 > 211	int mv88e6xxx_rmu_stats_get(struct mv88e6xxx_chip *chip, int port, uint64_t *data)
   212	{
   213		u8 dump_mib[8] = { 0x00, 0x01, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00 };
   214		int ret;
   215	
   216		if (!chip)
   217			return 0;
   218	
   219		ret = mv88e6xxx_rmu_get_id(chip, port);
   220		if (ret)
   221			return ret;
   222	
   223		/* Send a GET_MIB command */
   224		dump_mib[7] = port;
   225		ret = mv88e6xxx_rmu_send_wait(chip, port, RMU_REQ_DUMP_MIB, dump_mib, 8);
   226		if (ret) {
   227			dev_err(chip->dev, "RMU: error for command DUMP_MIB %d dev %d:%d\n", ret,
   228				chip->ds->index, port);
   229			return ret;
   230		}
   231	
   232		/* Update MIB for port */
   233		if (chip->info->ops->stats_get_stats)
   234			return chip->info->ops->stats_get_stats(chip, port, data);
   235	
   236		return 0;
   237	}
   238	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

only message in thread, other threads:[~2022-08-18 12:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220818102924.287719-3-mattias.forsblad@gmail.com>
2022-08-18 12:40 ` [RFC net-next PATCH 2/3] mv88e6xxx: Implement remote management support (RMU) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox