* [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided.
@ 2017-08-19 22:31 Srishti Sharma
2017-08-20 0:07 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Srishti Sharma @ 2017-08-19 22:31 UTC (permalink / raw)
To: gregkh; +Cc: ruxandra.radulescu, linux-kernel, devel, Srishti Sharma
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided.
2017-08-19 22:31 [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided Srishti Sharma
@ 2017-08-20 0:07 ` Greg KH
2017-08-20 1:06 ` Srishti Sharma
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2017-08-20 0:07 UTC (permalink / raw)
To: Srishti Sharma; +Cc: ruxandra.radulescu, linux-kernel, devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided.
2017-08-20 0:07 ` Greg KH
@ 2017-08-20 1:06 ` Srishti Sharma
0 siblings, 0 replies; 3+ messages in thread
From: Srishti Sharma @ 2017-08-20 1:06 UTC (permalink / raw)
To: Greg KH; +Cc: ruxandra.radulescu, linux-kernel, devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-20 1:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-19 22:31 [PATCH] Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Multiple assignments should be avoided Srishti Sharma
2017-08-20 0:07 ` Greg KH
2017-08-20 1:06 ` Srishti Sharma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox