Re: [PATCH] kernel/irq/matrix.c: remove redundant assignment to variable 'end'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxx>
---
  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@xxxxxxxxxx>
  	struct cpumap *cm;
if (cpumask_empty(msk))




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux