From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3C9DC6FD18 for ; Tue, 28 Mar 2023 15:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229756AbjC1PLY (ORCPT ); Tue, 28 Mar 2023 11:11:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230191AbjC1PLX (ORCPT ); Tue, 28 Mar 2023 11:11:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3E04185 for ; Tue, 28 Mar 2023 08:10:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DF433B81D92 for ; Tue, 28 Mar 2023 15:09:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47FAFC433EF; Tue, 28 Mar 2023 15:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680016139; bh=qWRGDmfbPs28OVtHfW3UTe1fCgfTnPkZXGJBNFDL9PE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tFfcACXGSVjPsW+/Kk9dyo/YqFyX0BAgWfVoHkS9/TyAWgCaid6oK4Ytf7/4hJVou +NULhoOUr+Eq+x/bl4TPRNOoz6xtVK6XFRtD7p7lNHNANgs/rXnn2KOcGZMZKgNJja Y0fUJDFkIaNysTir0TWBuL8NKcMioXKzQLl70kjo= 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 5.15 080/146] thunderbolt: Use const qualifier for `ring_interrupt_index` Date: Tue, 28 Mar 2023 16:42:49 +0200 Message-Id: <20230328142606.043962433@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230328142602.660084725@linuxfoundation.org> References: <20230328142602.660084725@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 @@ -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)