All of lore.kernel.org
 help / color / mirror / Atom feed
* [freescale-fslc:pr/642 2551/30000] drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-ceetm.c:862:35: warning: variable 'priv' set but not used
@ 2023-10-15 16:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-15 16:06 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: oe-kbuild-all

tree:   https://github.com/Freescale/linux-fslc pr/642
head:   c8b7cf62c7fea8456dec789d550b8006d73b8f04
commit: 923d6a315bae4a484f78b73375c7737165c5f518 [2551/30000] dpaa2-eth: Add CEETM qdisc support
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20231016/202310160015.ISbc2F2e-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231016/202310160015.ISbc2F2e-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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310160015.ISbc2F2e-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-ceetm.c: In function 'dpaa2_ceetm_cls_change':
>> drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-ceetm.c:862:35: warning: variable 'priv' set but not used [-Wunused-but-set-variable]
     862 |         struct dpaa2_ceetm_qdisc *priv;
         |                                   ^~~~


vim +/priv +862 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-ceetm.c

   856	
   857	/* Add or configure a ceetm class */
   858	static int dpaa2_ceetm_cls_change(struct Qdisc *sch, u32 classid, u32 parentid,
   859					  struct nlattr **tca, unsigned long *arg,
   860					  struct netlink_ext_ack *extack)
   861	{
 > 862		struct dpaa2_ceetm_qdisc *priv;
   863		struct dpaa2_ceetm_class *cl = (struct dpaa2_ceetm_class *)*arg;
   864		struct nlattr *opt = tca[TCA_OPTIONS];
   865		struct nlattr *tb[DPAA2_CEETM_TCA_MAX];
   866		struct dpaa2_ceetm_tc_copt *copt;
   867		struct net_device *dev = qdisc_dev(sch);
   868		int err;
   869	
   870		pr_debug(KBUILD_BASENAME " : %s : classid %X under qdisc %X\n",
   871			 __func__, classid, sch->handle);
   872	
   873		if (strcmp(sch->ops->id, dpaa2_ceetm_qdisc_ops.id)) {
   874			pr_err("CEETM: a ceetm class can not be attached to other qdisc/class types\n");
   875			return -EINVAL;
   876		}
   877	
   878		priv = qdisc_priv(sch);
   879	
   880		if (!opt) {
   881			pr_err(KBUILD_BASENAME " : %s : tc error NULL opt\n", __func__);
   882			return -EINVAL;
   883		}
   884	
   885		err = nla_parse_nested_deprecated(tb, DPAA2_CEETM_TCA_COPT, opt,
   886						  dpaa2_ceetm_policy, extack);
   887		if (err < 0) {
   888			pr_err(KBUILD_BASENAME " : %s : tc error in %s\n", __func__,
   889			       "nla_parse_nested_deprecated");
   890			return -EINVAL;
   891		}
   892	
   893		if (!tb[DPAA2_CEETM_TCA_COPT]) {
   894			pr_err(KBUILD_BASENAME " : %s : tc error in %s\n", __func__,
   895			       "tb");
   896			return -EINVAL;
   897		}
   898	
   899		copt = nla_data(tb[DPAA2_CEETM_TCA_COPT]);
   900	
   901		/* Configure an existing ceetm class */
   902		if (cl) {
   903			if (copt->type != cl->type) {
   904				pr_err("CEETM: class %X is not of the provided type\n",
   905				       cl->common.classid);
   906				return -EINVAL;
   907			}
   908	
   909			switch (copt->type) {
   910			case CEETM_ROOT:
   911				return dpaa2_ceetm_cls_change_root(cl, copt, dev);
   912			case CEETM_PRIO:
   913				return dpaa2_ceetm_cls_change_prio(cl, copt, dev);
   914	
   915			default:
   916				pr_err(KBUILD_BASENAME " : %s : invalid class\n",
   917				       __func__);
   918				return -EINVAL;
   919			}
   920		}
   921	
   922		return dpaa2_ceetm_cls_add(sch, classid, copt, arg, extack);
   923	}
   924	

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

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

only message in thread, other threads:[~2023-10-15 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-15 16:06 [freescale-fslc:pr/642 2551/30000] drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-ceetm.c:862:35: warning: variable 'priv' set but not used kernel test robot

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.