From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5C418BE0 for ; Tue, 28 Mar 2023 15:00:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22D58C433D2; Tue, 28 Mar 2023 15:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680015640; bh=4JbvwgLsdez8/IaGYiQmqfm5rp3xYPNMDHGBv9/YG58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y0YkjCdLsRSfBqmUOmA2PKlNhEelx3kv7Fn/43m3aMEK0jLY4X0J2PSXhZP4O6yXq K18dKERv0zPm6b5cIYpGK19Ay8m2i0rhQMgrlmnbCPKlPthFwTEExQ4ZbDJlHr2fhx r+VNa5ZqDmDbhU3+x5K6bvZMC7+fF6igQp1Lgam4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sanju Mehta , Mario Limonciello , Mika Westerberg Subject: [PATCH 6.1 114/224] thunderbolt: Use const qualifier for `ring_interrupt_index` Date: Tue, 28 Mar 2023 16:41:50 +0200 Message-Id: <20230328142622.103452410@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230328142617.205414124@linuxfoundation.org> References: <20230328142617.205414124@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Mario Limonciello 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 --- drivers/thunderbolt/nhi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -46,7 +46,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)