All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jiri Pirko <jiri@nvidia.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [jpirko-mlxsw:jiri_devel_linecards 38/39] drivers/net/netdevsim/dev.c:119:57: error: passing argument 4 of 'devlink_linecard_device_create' from incompatible pointer type
Date: Thu, 3 Mar 2022 11:12:18 +0800	[thread overview]
Message-ID: <202203030915.ADVbo5ri-lkp@intel.com> (raw)

tree:   https://github.com/jpirko/linux_mlxsw jiri_devel_linecards
head:   5be7dbceaf8fd4fdc9cdeb10d63edb13dc9e89b5
commit: 41245c30197488da988091379946dd2a9f397308 [38/39] TMP: devlink device type
config: csky-randconfig-r003-20220302 (https://download.01.org/0day-ci/archive/20220303/202203030915.ADVbo5ri-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 11.2.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/jpirko/linux_mlxsw/commit/41245c30197488da988091379946dd2a9f397308
        git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
        git fetch --no-tags jpirko-mlxsw jiri_devel_linecards
        git checkout 41245c30197488da988091379946dd2a9f397308
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=csky SHELL=/bin/bash drivers/net/netdevsim/ fs/notify/fanotify/

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/netdevsim/dev.c: In function 'nsim_dev_linecard_devices_create':
>> drivers/net/netdevsim/dev.c:119:57: error: passing argument 4 of 'devlink_linecard_device_create' from incompatible pointer type [-Werror=incompatible-pointer-types]
     119 |                                                         nsim_dev_linecard);
         |                                                         ^~~~~~~~~~~~~~~~~
         |                                                         |
         |                                                         struct nsim_dev_linecard *
   In file included from drivers/net/netdevsim/dev.c:29:
   include/net/devlink.h:1580:44: note: expected 'const char *' but argument is of type 'struct nsim_dev_linecard *'
    1580 |                                const char *type, void *priv);
         |                                ~~~~~~~~~~~~^~~~
>> drivers/net/netdevsim/dev.c:117:26: error: too few arguments to function 'devlink_linecard_device_create'
     117 |                 device = devlink_linecard_device_create(nsim_dev_linecard->devlink_linecard,
         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/net/netdevsim/dev.c:29:
   include/net/devlink.h:1577:1: note: declared here
    1577 | devlink_linecard_device_create(struct devlink_linecard *linecard,
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/devlink_linecard_device_create +119 drivers/net/netdevsim/dev.c

15527306aace517 Jiri Pirko 2021-05-05  100  
15527306aace517 Jiri Pirko 2021-05-05  101  static int
15527306aace517 Jiri Pirko 2021-05-05  102  nsim_dev_linecard_devices_create(struct nsim_dev_linecard *nsim_dev_linecard)
15527306aace517 Jiri Pirko 2021-05-05  103  {
15527306aace517 Jiri Pirko 2021-05-05  104  	struct devlink_linecard_device *device;
15527306aace517 Jiri Pirko 2021-05-05  105  	char *component_name;
15527306aace517 Jiri Pirko 2021-05-05  106  	int err;
15527306aace517 Jiri Pirko 2021-05-05  107  	int i;
15527306aace517 Jiri Pirko 2021-05-05  108  
15527306aace517 Jiri Pirko 2021-05-05  109  	snprintf(nsim_dev_linecard->device_component_name,
15527306aace517 Jiri Pirko 2021-05-05  110  		 sizeof(nsim_dev_linecard->device_component_name), "lc%u_dev0",
15527306aace517 Jiri Pirko 2021-05-05  111  		 nsim_dev_linecard->linecard_index);
15527306aace517 Jiri Pirko 2021-05-05  112  	component_name = nsim_dev_linecard->device_component_name;
15527306aace517 Jiri Pirko 2021-05-05  113  
15527306aace517 Jiri Pirko 2021-05-05  114  	for (i = 0; i < NSIM_DEV_LINECARD_DEVICE_COUNT; i++) {
15527306aace517 Jiri Pirko 2021-05-05  115  		if (i > 0)
15527306aace517 Jiri Pirko 2021-05-05  116  			component_name = NULL;
15527306aace517 Jiri Pirko 2021-05-05 @117  		device = devlink_linecard_device_create(nsim_dev_linecard->devlink_linecard,
15527306aace517 Jiri Pirko 2021-05-05  118  							i, component_name,
15527306aace517 Jiri Pirko 2021-05-05 @119  							nsim_dev_linecard);
15527306aace517 Jiri Pirko 2021-05-05  120  		if (IS_ERR(device)) {
15527306aace517 Jiri Pirko 2021-05-05  121  			err = PTR_ERR(device);
15527306aace517 Jiri Pirko 2021-05-05  122  			goto rollback;
15527306aace517 Jiri Pirko 2021-05-05  123  		}
15527306aace517 Jiri Pirko 2021-05-05  124  		nsim_dev_linecard->devlink_device[i] = device;
15527306aace517 Jiri Pirko 2021-05-05  125  	}
15527306aace517 Jiri Pirko 2021-05-05  126  	return 0;
15527306aace517 Jiri Pirko 2021-05-05  127  
15527306aace517 Jiri Pirko 2021-05-05  128  rollback:
15527306aace517 Jiri Pirko 2021-05-05  129  	for (i--; i >= 0; i--) {
15527306aace517 Jiri Pirko 2021-05-05  130  		device = nsim_dev_linecard->devlink_device[i];
15527306aace517 Jiri Pirko 2021-05-05  131  		devlink_linecard_device_destroy(nsim_dev_linecard->devlink_linecard,
15527306aace517 Jiri Pirko 2021-05-05  132  						device);
15527306aace517 Jiri Pirko 2021-05-05  133  	}
15527306aace517 Jiri Pirko 2021-05-05  134  	return err;
15527306aace517 Jiri Pirko 2021-05-05  135  }
15527306aace517 Jiri Pirko 2021-05-05  136  

:::::: The code at line 119 was first introduced by commit
:::::: 15527306aace517a53a34b6e207a3ae087fe8566 netdevsim: create couple of devices on each linecard

:::::: TO: Jiri Pirko <jiri@nvidia.com>
:::::: CC: Jiri Pirko <jiri@nvidia.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

             reply	other threads:[~2022-03-03  3:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03  3:12 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-01 21:13 [jpirko-mlxsw:jiri_devel_linecards 38/39] drivers/net/netdevsim/dev.c:119:57: error: passing argument 4 of 'devlink_linecard_device_create' from incompatible pointer type kernel test robot
2022-02-25 23:09 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202203030915.ADVbo5ri-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jiri@nvidia.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.