]> git.baikalelectronics.ru Git - kernel.git/commitdiff
thunderbolt: Use const qualifier for `ring_interrupt_index`
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 10 Mar 2023 17:20:49 +0000 (11:20 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Apr 2023 09:16:39 +0000 (11:16 +0200)
commit 1716efdb07938bd6510e1127d02012799112c433 upstream.

`ring_interrupt_index` doesn't change the data for `ring` so mark it as
const. This is needed by the following patch that disables interrupt
auto clear for rings.

Cc: Sanju Mehta <Sanju.Mehta@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/nhi.c

index 73a698eec7430bfb75f5be31711c38ecab2d0222..8a117d1c8888d93d7edcda0bc02691269419b2b6 100644 (file)
@@ -40,7 +40,7 @@
 
 #define NHI_MAILBOX_TIMEOUT    500 /* ms */
 
-static int ring_interrupt_index(struct tb_ring *ring)
+static int ring_interrupt_index(const struct tb_ring *ring)
 {
        int bit = ring->hop;
        if (!ring->is_tx)