]> Gentwo Git Trees - linux/.git/commitdiff
RDMA/bng_re: Remove prefetch instruction
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 26 Nov 2025 07:57:37 +0000 (09:57 +0200)
committerLeon Romanovsky <leon@kernel.org>
Thu, 27 Nov 2025 08:41:27 +0000 (03:41 -0500)
The prefetch instruction is meant to speed up access to memory referenced
by its address argument. In the bng_re code path, it has no effect,
because the pointer refers to a function that is executed immediately
afterward.

The issue was identified due to the following kbuild compilation error:

  drivers/infiniband/hw/bng_re/bng_fw.c: In function 'bng_re_creq_irq':
    drivers/infiniband/hw/bng_re/bng_fw.c:278:9: error: implicit
    declaration of function 'prefetch' [-Wimplicit-function-declaration]
      278 |     prefetch(bng_re_get_qe(hwq, sw_cons, NULL));
          |     ^~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511260607.Kuxn4NnN-lkp@intel.com/
Fixes: 4f830cd8d7fe ("RDMA/bng_re: Add infrastructure for enabling Firmware channel")
Link: https://patch.msgid.link/20251126-remove-prefetch-v1-1-fcac22007ea7@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/infiniband/hw/bng_re/bng_fw.c

index 803610fb9c58b858ae9ea26624a34e39d73291f9..7d9539113cf5c28d00dd2a83dab0546d50b29146 100644 (file)
@@ -525,7 +525,7 @@ static irqreturn_t bng_re_creq_irq(int irq, void *dev_instance)
        hwq = &creq->hwq;
        /* Prefetch the CREQ element */
        sw_cons = HWQ_CMP(hwq->cons, hwq);
-       prefetch(bng_re_get_qe(hwq, sw_cons, NULL));
+       bng_re_get_qe(hwq, sw_cons, NULL);
 
        tasklet_schedule(&creq->creq_tasklet);
        return IRQ_HANDLED;