From: Mario Limonciello Date: Fri, 10 Mar 2023 17:20:49 +0000 (-0600) Subject: thunderbolt: Use const qualifier for `ring_interrupt_index` X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a74a2e124c4888c3c1cc3091aa5f4044bf92fd54;p=linux.git thunderbolt: Use const qualifier for `ring_interrupt_index` 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 Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index b409c2c3b2c43..ee29c803708c4 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -43,7 +43,7 @@ #define QUIRK_AUTO_CLEAR_INT BIT(0) #define QUIRK_E2E BIT(1) -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)