All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: drivers/net/ethernet/intel/ice/ice_devlink.c:447:8-49: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD
Date: Thu, 7 Dec 2023 20:21:58 +0800	[thread overview]
Message-ID: <202312072049.R5nMAfYw-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
CC: Tony Nguyen <anthony.l.nguyen@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
commit: 31c8db2c4fa799f5981451a6ce2b38320069d8ef ice: implement devlink reinit action
date:   10 months ago
:::::: branch date: 3 days ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-102-20231207 (https://download.01.org/0day-ci/archive/20231207/202312072049.R5nMAfYw-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231207/202312072049.R5nMAfYw-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202312072049.R5nMAfYw-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/intel/ice/ice_devlink.c:447:8-49: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD
   drivers/net/ethernet/intel/ice/ice_devlink.c:457:8-46: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD
   drivers/net/ethernet/intel/ice/ice_devlink.c:452:8-44: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD

vim +447 drivers/net/ethernet/intel/ice/ice_devlink.c

399e27dbbd9e94 Jacob Keller       2021-10-27  426  
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  427  /**
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  428   * ice_devlink_reload_down - prepare for reload
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  429   * @devlink: pointer to the devlink instance to reload
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  430   * @netns_change: if true, the network namespace is changing
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  431   * @action: the action to perform
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  432   * @limit: limits on what reload should do, such as not resetting
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  433   * @extack: netlink extended ACK structure
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  434   */
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  435  static int
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  436  ice_devlink_reload_down(struct devlink *devlink, bool netns_change,
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  437  			enum devlink_reload_action action,
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  438  			enum devlink_reload_limit limit,
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  439  			struct netlink_ext_ack *extack)
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  440  {
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  441  	struct ice_pf *pf = devlink_priv(devlink);
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  442  
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  443  	switch (action) {
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  444  	case DEVLINK_RELOAD_ACTION_DRIVER_REINIT:
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  445  		if (ice_is_eswitch_mode_switchdev(pf)) {
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  446  			NL_SET_ERR_MSG_MOD(extack,
31c8db2c4fa799 Michal Swiatkowski 2022-12-21 @447  					   "Go to legacy mode before doing reinit\n");
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  448  			return -EOPNOTSUPP;
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  449  		}
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  450  		if (ice_is_adq_active(pf)) {
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  451  			NL_SET_ERR_MSG_MOD(extack,
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  452  					   "Turn off ADQ before doing reinit\n");
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  453  			return -EOPNOTSUPP;
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  454  		}
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  455  		if (ice_has_vfs(pf)) {
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  456  			NL_SET_ERR_MSG_MOD(extack,
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  457  					   "Remove all VFs before doing reinit\n");
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  458  			return -EOPNOTSUPP;
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  459  		}
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  460  		ice_unload(pf);
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  461  		return 0;
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  462  	case DEVLINK_RELOAD_ACTION_FW_ACTIVATE:
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  463  		return ice_devlink_reload_empr_start(pf, extack);
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  464  	default:
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  465  		WARN_ON(1);
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  466  		return -EOPNOTSUPP;
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  467  	}
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  468  }
31c8db2c4fa799 Michal Swiatkowski 2022-12-21  469  

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

                 reply	other threads:[~2023-12-07 12:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202312072049.R5nMAfYw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=oe-kbuild@lists.linux.dev \
    /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.