* [PATCH] kernel/irq/matrix.c: remove redundant assignment to variable 'end'
@ 2022-04-22 11:04 Colin Ian King
2022-04-22 11:36 ` Tom Rix
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Colin Ian King @ 2022-04-22 11:04 UTC (permalink / raw)
To: Thomas Gleixner, Tom Rix; +Cc: kernel-janitors, linux-kernel, llvm
Variable end is being initialized with a value that is never read, it
is being re-assigned later with the same value. The initialization is
redundant and can be removed.
Cleans up clang scan build warning:
kernel/irq/matrix.c:289:25: warning: Value stored to 'end' during its
initialization is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
kernel/irq/matrix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c
index bbfb26489aa1..1698e77645ac 100644
--- a/kernel/irq/matrix.c
+++ b/kernel/irq/matrix.c
@@ -286,7 +286,7 @@ void irq_matrix_remove_managed(struct irq_matrix *m, const struct cpumask *msk)
int irq_matrix_alloc_managed(struct irq_matrix *m, const struct cpumask *msk,
unsigned int *mapped_cpu)
{
- unsigned int bit, cpu, end = m->alloc_end;
+ unsigned int bit, cpu, end;
struct cpumap *cm;
if (cpumask_empty(msk))
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] kernel/irq/matrix.c: remove redundant assignment to variable 'end'
2022-04-22 11:04 [PATCH] kernel/irq/matrix.c: remove redundant assignment to variable 'end' Colin Ian King
@ 2022-04-22 11:36 ` Tom Rix
2022-04-25 13:02 ` Thomas Gleixner
2022-04-25 13:10 ` [tip: irq/core] genirq/matrix: Remove " tip-bot2 for Colin Ian King
2 siblings, 0 replies; 5+ messages in thread
From: Tom Rix @ 2022-04-22 11:36 UTC (permalink / raw)
To: Colin Ian King, Thomas Gleixner; +Cc: kernel-janitors, linux-kernel, llvm
On 4/22/22 4:04 AM, Colin Ian King wrote:
> Variable end is being initialized with a value that is never read, it
> is being re-assigned later with the same value. The initialization is
> redundant and can be removed.
>
> Cleans up clang scan build warning:
> kernel/irq/matrix.c:289:25: warning: Value stored to 'end' during its
> initialization is never read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> kernel/irq/matrix.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c
> index bbfb26489aa1..1698e77645ac 100644
> --- a/kernel/irq/matrix.c
> +++ b/kernel/irq/matrix.c
> @@ -286,7 +286,7 @@ void irq_matrix_remove_managed(struct irq_matrix *m, const struct cpumask *msk)
> int irq_matrix_alloc_managed(struct irq_matrix *m, const struct cpumask *msk,
> unsigned int *mapped_cpu)
> {
> - unsigned int bit, cpu, end = m->alloc_end;
> + unsigned int bit, cpu, end;
Reviewed-by: Tom Rix <trix@redhat.com>
> struct cpumap *cm;
>
> if (cpumask_empty(msk))
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] kernel/irq/matrix.c: remove redundant assignment to variable 'end'
2022-04-22 11:04 [PATCH] kernel/irq/matrix.c: remove redundant assignment to variable 'end' Colin Ian King
2022-04-22 11:36 ` Tom Rix
@ 2022-04-25 13:02 ` Thomas Gleixner
2022-04-25 13:06 ` Colin King (gmail)
2022-04-25 13:10 ` [tip: irq/core] genirq/matrix: Remove " tip-bot2 for Colin Ian King
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2022-04-25 13:02 UTC (permalink / raw)
To: Colin Ian King, Tom Rix; +Cc: kernel-janitors, linux-kernel, llvm
Colin,
On Fri, Apr 22 2022 at 12:04, Colin Ian King wrote:
can you please stop using file paths as subsystem prefix in the patch
subject?
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-subject
I fixed it up once more, but you can really spare me the effort.
Thanks,
tglx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] kernel/irq/matrix.c: remove redundant assignment to variable 'end'
2022-04-25 13:02 ` Thomas Gleixner
@ 2022-04-25 13:06 ` Colin King (gmail)
0 siblings, 0 replies; 5+ messages in thread
From: Colin King (gmail) @ 2022-04-25 13:06 UTC (permalink / raw)
To: Thomas Gleixner, Tom Rix; +Cc: kernel-janitors, linux-kernel, llvm
On 25/04/2022 14:02, Thomas Gleixner wrote:
> Colin,
>
> On Fri, Apr 22 2022 at 12:04, Colin Ian King wrote:
>
> can you please stop using file paths as subsystem prefix in the patch
> subject?
>
> https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-subject
>
> I fixed it up once more, but you can really spare me the effort.
>
Apologies. Will do next time.
Colin
> Thanks,
>
> tglx
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: irq/core] genirq/matrix: Remove redundant assignment to variable 'end'
2022-04-22 11:04 [PATCH] kernel/irq/matrix.c: remove redundant assignment to variable 'end' Colin Ian King
2022-04-22 11:36 ` Tom Rix
2022-04-25 13:02 ` Thomas Gleixner
@ 2022-04-25 13:10 ` tip-bot2 for Colin Ian King
2 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Colin Ian King @ 2022-04-25 13:10 UTC (permalink / raw)
To: linux-tip-commits
Cc: Colin Ian King, Thomas Gleixner, Tom Rix, x86, linux-kernel, maz
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 1adb4d7ad3a585b451f5cf6b0a90c5917af3eac5
Gitweb: https://git.kernel.org/tip/1adb4d7ad3a585b451f5cf6b0a90c5917af3eac5
Author: Colin Ian King <colin.i.king@gmail.com>
AuthorDate: Fri, 22 Apr 2022 12:04:18 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 25 Apr 2022 15:02:57 +02:00
genirq/matrix: Remove redundant assignment to variable 'end'
Variable end is being initialized with a value that is never read, it
is being re-assigned later with the same value. The initialization is
redundant and can be removed.
Cleans up clang scan build warning:
kernel/irq/matrix.c:289:25: warning: Value stored to 'end' during its
initialization is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20220422110418.1264778-1-colin.i.king@gmail.com
---
kernel/irq/matrix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c
index bbfb264..1698e77 100644
--- a/kernel/irq/matrix.c
+++ b/kernel/irq/matrix.c
@@ -286,7 +286,7 @@ void irq_matrix_remove_managed(struct irq_matrix *m, const struct cpumask *msk)
int irq_matrix_alloc_managed(struct irq_matrix *m, const struct cpumask *msk,
unsigned int *mapped_cpu)
{
- unsigned int bit, cpu, end = m->alloc_end;
+ unsigned int bit, cpu, end;
struct cpumap *cm;
if (cpumask_empty(msk))
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-04-25 13:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-22 11:04 [PATCH] kernel/irq/matrix.c: remove redundant assignment to variable 'end' Colin Ian King
2022-04-22 11:36 ` Tom Rix
2022-04-25 13:02 ` Thomas Gleixner
2022-04-25 13:06 ` Colin King (gmail)
2022-04-25 13:10 ` [tip: irq/core] genirq/matrix: Remove " tip-bot2 for Colin Ian King
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.