Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1715771 > unrolled thread
| Started by | Srishti Sharma <srishtishar@gmail.com> |
|---|---|
| First post | 2017-08-20 00:40 +0200 |
| Last post | 2017-08-20 03:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided. Srishti Sharma <srishtishar@gmail.com> - 2017-08-20 00:40 +0200
Re: [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided. Greg KH <gregkh@linuxfoundation.org> - 2017-08-20 02:10 +0200
Re: [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided. Srishti Sharma <srishtishar@gmail.com> - 2017-08-20 03:10 +0200
| From | Srishti Sharma <srishtishar@gmail.com> |
|---|---|
| Date | 2017-08-20 00:40 +0200 |
| Subject | [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided. |
| Message-ID | <ugkzo-74v-17@gated-at.bofh.it> |
Fixed a check reported by checkpatch.pl to avoid multiple assignments in a single statement.
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
---
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 26017fe..75e3366 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
@@ -1636,7 +1636,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 = cpumask_first(&priv->dpio_cpumask);
for (i = 0; i < priv->num_fqs; i++) {
fq = &priv->fq[i];
--
2.7.4
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-08-20 02:10 +0200 |
| Subject | Re: [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided. |
| Message-ID | <uglYt-82l-1@gated-at.bofh.it> |
| In reply to | #1715771 |
On Sun, Aug 20, 2017 at 04:01:25AM +0530, Srishti Sharma wrote: > Fixed a check reported by checkpatch.pl to avoid multiple assignments in a single statement. Always wrap your changelog text at 72 columns please. > > Signed-off-by: Srishti Sharma <srishtishar@gmail.com> > --- > 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 26017fe..75e3366 100644 > --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c > @@ -1636,7 +1636,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 = cpumask_first(&priv->dpio_cpumask); The original code is nicer, as you don't have to do the computation twice. thanks, greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Srishti Sharma <srishtishar@gmail.com> |
|---|---|
| Date | 2017-08-20 03:10 +0200 |
| Subject | Re: [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided. |
| Message-ID | <ugmUx-bq-3@gated-at.bofh.it> |
| In reply to | #1715775 |
On Sun, Aug 20, 2017 at 5:37 AM, Greg KH <gregkh@linuxfoundation.org> wrote: > On Sun, Aug 20, 2017 at 04:01:25AM +0530, Srishti Sharma wrote: >> Fixed a check reported by checkpatch.pl to avoid multiple assignments in a single statement. > > Always wrap your changelog text at 72 columns please. > >> >> Signed-off-by: Srishti Sharma <srishtishar@gmail.com> >> --- >> 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 26017fe..75e3366 100644 >> --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c >> +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c >> @@ -1636,7 +1636,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 = cpumask_first(&priv->dpio_cpumask); > > The original code is nicer, as you don't have to do the computation > twice. > > thanks, > > greg k-h Okay, Thanks :) Regards, Srishti
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web