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 B5493C433EF for ; Wed, 24 Nov 2021 12:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344558AbhKXMvs (ORCPT ); Wed, 24 Nov 2021 07:51:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:55978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245041AbhKXMtx (ORCPT ); Wed, 24 Nov 2021 07:49:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E48D760E08; Wed, 24 Nov 2021 12:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637756933; bh=SChXYOXFDadWXM1Eqexk7TQnESs5DthwIXoZDiPRerg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KEp1WuIXhUpYV8E1/pzrvxiNyVjWF5ur2opcnfo8Rd+dLB53O/dymTdL9/8gmWg7F 5X3FEo5+MYcVFWWrGWbm34CVg+1OzlvdEC2pakSW5bGie+D+yd9FgDhKOMFGbxdB6B 83AuOIf4AGGsuquotI+zbQZwK9wO7g+7Jn+LSReI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Leon Romanovsky , Jason Gunthorpe Subject: [PATCH 4.14 248/251] RDMA/netlink: Add __maybe_unused to static inline in C file Date: Wed, 24 Nov 2021 12:58:10 +0100 Message-Id: <20211124115718.958807908@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115710.214900256@linuxfoundation.org> References: <20211124115710.214900256@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky commit 83dde7498fefeb920b1def317421262317d178e5 upstream. Like other commits in the tree add __maybe_unused to a static inline in a C file because some clang compilers will complain about unused code: >> drivers/infiniband/core/nldev.c:2543:1: warning: unused function '__chk_RDMA_NL_NLDEV' MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_NLDEV, 5); ^ Fixes: e3bf14bdc17a ("rdma: Autoload netlink client modules") Link: https://lore.kernel.org/r/4a8101919b765e01d7fde6f27fd572c958deeb4a.1636267207.git.leonro@nvidia.com Reported-by: kernel test robot Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- include/rdma/rdma_netlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/rdma/rdma_netlink.h +++ b/include/rdma/rdma_netlink.h @@ -24,7 +24,7 @@ enum rdma_nl_flags { * constant as well and the compiler checks they are the same. */ #define MODULE_ALIAS_RDMA_NETLINK(_index, _val) \ - static inline void __chk_##_index(void) \ + static inline void __maybe_unused __chk_##_index(void) \ { \ BUILD_BUG_ON(_index != _val); \ } \