Hi Heng,

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/Heng-Qi/linux-dim-move-useful-macros-to-h-file/20240411-221400
base:   net-next/main
patch link:    
https://lore.kernel.org/r/1712844751-53514-3-git-send-email-hengqi%40linux.alibaba.com
patch subject: [PATCH net-next v6 2/4] ethtool: provide customized dim profile 
management
config: riscv-defconfig 
(https://download.01.org/0day-ci/archive/20240412/202404121112.lymscqm1-...@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 
8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240412/202404121112.lymscqm1-...@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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202404121112.lymscqm1-...@intel.com/

All warnings (new ones prefixed by >>):

>> net/ethtool/coalesce.c:373: warning: Function parameter or struct member 
>> 'dev' not described in 'ethnl_update_profile'
>> net/ethtool/coalesce.c:373: warning: Excess function parameter 'mod' 
>> description in 'ethnl_update_profile'


vim +373 net/ethtool/coalesce.c

   347  
   348  /**
   349   * ethnl_update_profile - get a nla nest with four child nla nests from 
userspace.
   350   * @dst: data get from the driver and modified by ethnl_update_profile.
   351   * @nests: nest attr ETHTOOL_A_COALESCE_*X_*QE_PROFILE to set driver's 
profile.
   352   * @mod: whether the data is modified
   353   * @extack: Netlink extended ack
   354   *
   355   * Layout of nests:
   356   *   Nested ETHTOOL_A_COALESCE_*X_*QE_PROFILE attr
   357   *     Nested ETHTOOL_A_MODERATIONS_MODERATION attr
   358   *       ETHTOOL_A_MODERATION_USEC attr
   359   *       ETHTOOL_A_MODERATION_PKTS attr
   360   *       ETHTOOL_A_MODERATION_COMPS attr
   361   *     ...
   362   *     Nested ETHTOOL_A_MODERATIONS_MODERATION attr
   363   *       ETHTOOL_A_MODERATION_USEC attr
   364   *       ETHTOOL_A_MODERATION_PKTS attr
   365   *       ETHTOOL_A_MODERATION_COMPS attr
   366   *
   367   * Returns 0 on success or a negative error code.
   368   */
   369  static inline int ethnl_update_profile(struct net_device *dev,
   370                                         struct dim_cq_moder *dst,
   371                                         const struct nlattr *nests,
   372                                         struct netlink_ext_ack *extack)
 > 373  {
   374          struct nlattr 
*tb_moder[ARRAY_SIZE(coalesce_set_profile_policy)];
   375          struct dim_cq_moder profile[NET_DIM_PARAMS_NUM_PROFILES];
   376          struct nlattr *nest;
   377          int ret, rem, i = 0;
   378  
   379          if (!nests)
   380                  return 0;
   381  
   382          if (!dst)
   383                  return -EOPNOTSUPP;
   384  
   385          nla_for_each_nested_type(nest, 
ETHTOOL_A_MODERATIONS_MODERATION, nests, rem) {
   386                  ret = nla_parse_nested(tb_moder,
   387                                         
ARRAY_SIZE(coalesce_set_profile_policy) - 1,
   388                                         nest, 
coalesce_set_profile_policy,
   389                                         extack);
   390                  if (ret)
   391                          return ret;
   392  
   393                  if (NL_REQ_ATTR_CHECK(extack, nest, tb_moder, 
ETHTOOL_A_MODERATION_USEC) ||
   394                      NL_REQ_ATTR_CHECK(extack, nest, tb_moder, 
ETHTOOL_A_MODERATION_PKTS) ||
   395                      NL_REQ_ATTR_CHECK(extack, nest, tb_moder, 
ETHTOOL_A_MODERATION_COMPS))
   396                          return -EINVAL;
   397  
   398                  profile[i].usec = 
nla_get_u16(tb_moder[ETHTOOL_A_MODERATION_USEC]);
   399                  profile[i].pkts = 
nla_get_u16(tb_moder[ETHTOOL_A_MODERATION_PKTS]);
   400                  profile[i].comps = 
nla_get_u16(tb_moder[ETHTOOL_A_MODERATION_COMPS]);
   401  
   402                  if ((dst[i].usec != profile[i].usec && 
!(dev->priv_flags & IFF_PROFILE_USEC)) ||
   403                      (dst[i].pkts != profile[i].pkts && 
!(dev->priv_flags & IFF_PROFILE_PKTS)) ||
   404                      (dst[i].comps != profile[i].comps && 
!(dev->priv_flags & IFF_PROFILE_COMPS)))
   405                          return -EOPNOTSUPP;
   406  
   407                  i++;
   408          }
   409  
   410          memcpy(dst, profile, sizeof(profile));
   411  
   412          return 0;
   413  }
   414  

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

Reply via email to