* [bug report] net: mvpp2: cls: Add Classification offload support
@ 2019-05-03 12:44 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-05-03 12:44 UTC (permalink / raw)
To: kernel-janitors
Hello Maxime Chevallier,
The patch 90b509b39ac9: "net: mvpp2: cls: Add Classification offload
support" from Apr 30, 2019, leads to the following static checker
warning:
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c:1036 mvpp2_port_c2_tcam_rule_add()
warn: unsigned 'c2.index' is never less than zero.
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
1026 static int mvpp2_port_c2_tcam_rule_add(struct mvpp2_port *port,
1027 struct mvpp2_rfs_rule *rule)
1028 {
1029 struct flow_action_entry *act;
1030 struct mvpp2_cls_c2_entry c2;
1031 u8 qh, ql, pmap;
1032
1033 memset(&c2, 0, sizeof(c2));
1034
1035 c2.index = mvpp2_cls_c2_port_flow_index(port, rule->loc);
1036 if (c2.index < 0)
^^^^^^^^^^^^
This is unsigned and also mvpp2_cls_c2_port_flow_index() doesn't return
negative error codes.
1037 return -EINVAL;
1038
1039 act = &rule->flow->action.entries[0];
1040
1041 rule->c2_index = c2.index;
1042
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-03 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-03 12:44 [bug report] net: mvpp2: cls: Add Classification offload support Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox