* [bug report] drivers: net: use flow action infrastructure
@ 2019-02-08 8:34 Dan Carpenter
2019-02-08 16:44 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-02-08 8:34 UTC (permalink / raw)
To: kernel-janitors
Hello Pablo Neira Ayuso,
The patch 738678817573: "drivers: net: use flow action
infrastructure" from Feb 2, 2019, leads to the following static
checker warning:
drivers/net/ethernet/netronome/nfp/flower/action.c:618 nfp_fl_pedit()
error: uninitialized symbol 'idx'.
drivers/net/ethernet/netronome/nfp/flower/action.c
587 static int
588 nfp_fl_pedit(const struct flow_action_entry *act,
589 struct tc_cls_flower_offload *flow,
590 char *nfp_action, int *a_len, u32 *csum_updated)
591 {
592 struct flow_rule *rule = tc_cls_flower_offload_flow_rule(flow);
593 struct nfp_fl_set_ipv6_addr set_ip6_dst, set_ip6_src;
594 struct nfp_fl_set_ipv6_tc_hl_fl set_ip6_tc_hl_fl;
595 struct nfp_fl_set_ip4_ttl_tos set_ip_ttl_tos;
596 struct nfp_fl_set_ip4_addrs set_ip_addr;
597 enum flow_action_mangle_base htype;
598 struct nfp_fl_set_tport set_tport;
599 struct nfp_fl_set_eth set_eth;
600 size_t act_size = 0;
601 u8 ip_proto = 0;
602 int idx, err;
^^^^^^^
603 u32 offset;
604
605 memset(&set_ip6_tc_hl_fl, 0, sizeof(set_ip6_tc_hl_fl));
606 memset(&set_ip_ttl_tos, 0, sizeof(set_ip_ttl_tos));
607 memset(&set_ip6_dst, 0, sizeof(set_ip6_dst));
608 memset(&set_ip6_src, 0, sizeof(set_ip6_src));
609 memset(&set_ip_addr, 0, sizeof(set_ip_addr));
610 memset(&set_tport, 0, sizeof(set_tport));
611 memset(&set_eth, 0, sizeof(set_eth));
612
613 htype = act->mangle.htype;
614 offset = act->mangle.offset;
615
616 switch (htype) {
617 case TCA_PEDIT_KEY_EX_HDR_TYPE_ETH:
--> 618 err = nfp_fl_set_eth(act, idx, offset, &set_eth);
^^^
Uninitialized.
619 break;
620 case TCA_PEDIT_KEY_EX_HDR_TYPE_IP4:
621 err = nfp_fl_set_ip4(act, idx, offset, &set_ip_addr,
622 &set_ip_ttl_tos);
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [bug report] drivers: net: use flow action infrastructure
2019-02-08 8:34 [bug report] drivers: net: use flow action infrastructure Dan Carpenter
@ 2019-02-08 16:44 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2019-02-08 16:44 UTC (permalink / raw)
To: kernel-janitors
On Fri, Feb 08, 2019 at 11:34:08AM +0300, Dan Carpenter wrote:
> Hello Pablo Neira Ayuso,
>
> The patch 738678817573: "drivers: net: use flow action
> infrastructure" from Feb 2, 2019, leads to the following static
> checker warning:
>
> drivers/net/ethernet/netronome/nfp/flower/action.c:618 nfp_fl_pedit()
> error: uninitialized symbol 'idx'.
>
> drivers/net/ethernet/netronome/nfp/flower/action.c
> 587 static int
> 588 nfp_fl_pedit(const struct flow_action_entry *act,
> 589 struct tc_cls_flower_offload *flow,
> 590 char *nfp_action, int *a_len, u32 *csum_updated)
> 591 {
> 592 struct flow_rule *rule = tc_cls_flower_offload_flow_rule(flow);
> 593 struct nfp_fl_set_ipv6_addr set_ip6_dst, set_ip6_src;
> 594 struct nfp_fl_set_ipv6_tc_hl_fl set_ip6_tc_hl_fl;
> 595 struct nfp_fl_set_ip4_ttl_tos set_ip_ttl_tos;
> 596 struct nfp_fl_set_ip4_addrs set_ip_addr;
> 597 enum flow_action_mangle_base htype;
> 598 struct nfp_fl_set_tport set_tport;
> 599 struct nfp_fl_set_eth set_eth;
> 600 size_t act_size = 0;
> 601 u8 ip_proto = 0;
> 602 int idx, err;
> ^^^^^^^
https://patchwork.ozlabs.org/patch/1038751/
I forgot to Cc you, sorry Dan.
Thanks for reporting.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-08 16:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-08 8:34 [bug report] drivers: net: use flow action infrastructure Dan Carpenter
2019-02-08 16:44 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox