Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1ECAC352A3 for ; Sat, 15 Feb 2020 23:57:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC0F2206D9 for ; Sat, 15 Feb 2020 23:57:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="POMR2FnP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbgBOX5m (ORCPT ); Sat, 15 Feb 2020 18:57:42 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:39422 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbgBOX5m (ORCPT ); Sat, 15 Feb 2020 18:57:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iYplRL1e0BdAzh9cQ4tz1FdbBmVjVIbiXIdm8jfOejE=; b=POMR2FnPewzH33ljrEqobxrjWy cD6iK3tHhTgwgfT/HeUVSDetjLHNiglDD8+J4J+9BcQLXI788mFbqRv2cWxXZTgRBraEUQRFcAx8i lccQWJ4b2C+q7XMKWkUkxn3/DYugoEF8MmKu2SivWi19BQIg1zwl0NhQr5NCOMEbIBr37VGTwQ1Rk CP61CSNWB+Io9y3ZgNwT2Vc0Rc3wVNs4scGbVCNtNBg88xBvFYhxcHiDGJ4eIkAeWrptGdxYmXEnx Nv9+8c3KqU0rtIiYlO2FVfGKDbr14Cy/vXQQW+kH3EbMunaFKI9uPmKkD/+JnxaQpOy8g8uL0CAwr RqODrnTQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([2001:4d48:ad52:3201:222:68ff:fe15:37dd]:34534 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1j37JY-0007te-Ru; Sat, 15 Feb 2020 23:57:36 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1j37JY-0005a8-Al; Sat, 15 Feb 2020 23:57:36 +0000 In-Reply-To: <20200215154839.GR25745@shell.armlinux.org.uk> References: <20200215154839.GR25745@shell.armlinux.org.uk> From: Russell King To: Andrew Lunn , Florian Fainelli , Heiner Kallweit Cc: "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH net-next 01/10] net: linkmode: make linkmode_test_bit() take const pointer MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Date: Sat, 15 Feb 2020 23:57:36 +0000 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org linkmode_test_bit() does not modify the address; test_bit() is also declared const volatile for the same reason. There's no need for linkmode_test_bit() to be any different, and allows implementation of helpers that take a const linkmode pointer. Reviewed-by: Andrew Lunn Signed-off-by: Russell King --- include/linux/linkmode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/linkmode.h b/include/linux/linkmode.h index fe740031339d..8e5b352e44f2 100644 --- a/include/linux/linkmode.h +++ b/include/linux/linkmode.h @@ -71,7 +71,7 @@ static inline void linkmode_change_bit(int nr, volatile unsigned long *addr) __change_bit(nr, addr); } -static inline int linkmode_test_bit(int nr, volatile unsigned long *addr) +static inline int linkmode_test_bit(int nr, const volatile unsigned long *addr) { return test_bit(nr, addr); } -- 2.20.1