2017-11-08 15:00:29

by Joshua Abraham

[permalink] [raw]
Subject: Re: [PATCH] staging: fsl-dpaa2: Fix multiple assignments should be avoided

On Wed, Nov 08, 2017 at 10:20:48AM +0100, Greg KH wrote:
> On Tue, Nov 07, 2017 at 07:45:03PM -0500, Joshua Abraham wrote:
> > This patch fixes the checkpatch.pl warning:
> > "CHECK: multiple assignments should be avoided"
> >
> > Signed-off-by: Joshua Abraham <[email protected]>
> > ---
> > drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> > index 0d8ed002adcb..384218946108 100644
> > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> > @@ -1661,7 +1661,8 @@ static void set_fq_affinity(struct dpaa2_eth_priv *priv)
> > * This may well change at runtime, either through irqbalance or
> > * through direct user intervention.
> > */
> > - rx_cpu = txc_cpu = cpumask_first(&priv->dpio_cpumask);
> > + rx_cpu = cpumask_first(&priv->dpio_cpumask);
> > + txc_cpu = rx_cpu;
>
> The original code here makes much more sense, doesn't it?
>
> Sometimes checkpatch is wrong :)
>
> thanks,
>
> greg k-h

It does make a lot more sense.

I will trust checkpatch less, and my eyes more :)

-Josh

From 1583497854592704504@xxx Wed Nov 08 11:40:34 +0000 2017
X-GM-THRID: 1583467621433963499
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread