Skip to content

Commit d3383aa

Browse files
Colin Ian Kingmpe
authored andcommitted
cxl: remove redundant increment of hwirq
hwirq has not been initialized, however it is being incremented and also not being referenced in a loop. This error was detected with cppcheck: [drivers/misc/cxl/irq.c:439]: (error) Uninitialized variable: hwirq Commit 80fa93f ("cxl: Name interrupts in /proc/interrupt") introduced this error. This is a simple fix that removes the redundant increment. Signed-off-by: Colin Ian King <[email protected]> Acked-By: Ian Munsie <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent d83fb87 commit d3383aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/misc/cxl/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ int afu_register_irqs(struct cxl_context *ctx, u32 count)
436436
*/
437437
INIT_LIST_HEAD(&ctx->irq_names);
438438
for (r = 1; r < CXL_IRQ_RANGES; r++) {
439-
for (i = 0; i < ctx->irqs.range[r]; hwirq++, i++) {
439+
for (i = 0; i < ctx->irqs.range[r]; i++) {
440440
irq_name = kmalloc(sizeof(struct cxl_irq_name),
441441
GFP_KERNEL);
442442
if (!irq_name)

0 commit comments

Comments
 (0)