> -----Original Message-----
> From: Yuval Mintz [mailto:yuv...@mellanox.com]
> Sent: Monday, October 2, 2017 1:51 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirs...@intel.com>; da...@davemloft.net
> Cc: Brady, Alan <alan.br...@intel.com>; netdev@vger.kernel.org;
> nhor...@redhat.com; sassm...@redhat.com; jogre...@redhat.com
> Subject: RE: [net-next 11/15] i40evf: Enable VF to request an alternate queue
> allocation
> 
> > +   case VIRTCHNL_OP_REQUEST_QUEUES: {
> > +           struct virtchnl_vf_res_request *vfres =
> > +                   (struct virtchnl_vf_res_request *)msg;
> > +           if (vfres->num_queue_pairs == adapter->num_req_queues)
> > {
> > +                   adapter->flags |=
> > I40EVF_FLAG_REINIT_ITR_NEEDED;
> > +                   i40evf_schedule_reset(adapter);
> > +           } else {
> > +                   dev_info(&adapter->pdev->dev,
> > +                            "Requested %d queues, PF can support
> > %d\n",
> > +                            adapter->num_req_queues,
> > +                            vfres->num_queue_pairs);
> > +                   adapter->num_req_queues = 0;
> > +           }
> > +           }
> > +           break;
> 
> Something is odd about your parenthesis.
> 
> >     default:
> >             if (adapter->current_op && (v_opcode != adapter-
> > >current_op))
> >                     dev_warn(&adapter->pdev->dev, "Expected
> response %d from PF,
> > received %d\n",
> > --
> > 2.14.2

I'm not sure which parentheses you are referring to.  Perhaps you mean the 
double curly braces?  The outer set of braces are creating a block in the case 
statement so we can declare a variable specific to the case statement.  The 
inner brace is an if/else statement block.  They are both consistent with brace 
usage/alignment in the rest of the file and adding a new line between them 
generates a GCC warning.

-Alan

Reply via email to