[PATCH] net/cpfl: fix a compiler issue about virtchnl opcode

Liu, Mingxia mingxia.liu at intel.com
Thu Mar 9 04:03:25 CET 2023



> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Thursday, March 9, 2023 10:42 AM
> To: Liu, Mingxia <mingxia.liu at intel.com>
> Cc: dev at dpdk.org; Xing, Beilei <beilei.xing at intel.com>; Zhang, Yuying
> <yuying.zhang at intel.com>
> Subject: Re: [PATCH] net/cpfl: fix a compiler issue about virtchnl opcode
> 
> On Thu,  9 Mar 2023 10:31:42 +0000
> Mingxia Liu <mingxia.liu at intel.com> wrote:
> 
> > iff --git a/drivers/net/idpf/idpf_ethdev.c
> > b/drivers/net/idpf/idpf_ethdev.c index db58157ba3..59883af8a8 100644
> > --- a/drivers/net/idpf/idpf_ethdev.c
> > +++ b/drivers/net/idpf/idpf_ethdev.c
> > @@ -1058,8 +1058,8 @@ idpf_handle_virtchnl_msg(struct idpf_adapter_ext
> *adapter_ex)
> >  	struct idpf_ctlq_msg ctlq_msg;
> >  	enum idpf_mbx_opc mbx_op;
> >  	struct idpf_vport *vport;
> > -	enum virtchnl_ops vc_op;
> >  	uint16_t pending = 1;
> > +	enum virtchnl_ops vc_op;
> >  	int ret;
> >
> >  	while (pending) {
> 
> 
> Why does order of declarations matter here?
> Compilers are free to reorder this.
[Liu, Mingxia] Unused changes, v2 was sent.


More information about the dev mailing list