Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752254AbcDZARJ (ORCPT ); Mon, 25 Apr 2016 20:17:09 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:61599 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751097AbcDZARH (ORCPT ); Mon, 25 Apr 2016 20:17:07 -0400 From: Arnd Bergmann To: Mark Rutland , Lorenzo Pieralisi Cc: Arnd Bergmann , Catalin Marinas , Sudeep Holla , Will Deacon , Jisheng Zhang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers: firmware: psci: make two helper functions inline Date: Tue, 26 Apr 2016 02:16:17 +0200 Message-Id: <1461629793-3856390-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:oCQxS4kXDVHBexfxSrTkLWJJhcB0YjBDk8KrJw6R6aVUziUsbFa gMAqreQsdpAuJ4vc9U/93lbQBFL5JjUNg1T2vKhH7Hh/GNT+mz2gscDV+qTs006pKAVoDwz AcBK6+CvZMv/Ez4lsNWx4acIApPpCdCY2T4qMhF0ZUg/wKHi7xYWByiELpndLkN9Jr9gDQR tk3NvLvv2M11HOrQfGP5w== X-UI-Out-Filterresults: notjunk:1;V01:K0:NXZMgJ1Stfc=:VeHEqeToajrBWuzfwxWQ/T t2/ykTlUKRuefB7iovZJmXE66Oc3jxVs09D8JDGMpk3oddYHTTRx3KVJoblUeba64MfAB+mCf gLdIEpAyX/SYSr5q+9XN4Tepv1u5NuluPPR1m12KCZQeBRY4ShcVzMPy0/D1hnOj2FA5/OFDe Nhc9EFbhQLnlhK2RffgTA2kNX86x6VS3KBOG0p++eEuw+u4WnNNS5+eRyCimYb0cDQB62WN1y YYKUBzeI9n8ZAePvWZgorGVVnI5N7vhYd1pk/SWass3ws90hwg5QjX1pgfyiYQOvFkscmVuW4 S4Lq8tZQORPXZenhAD3w9nrMxT2dQJhn6ZqEtHbJgG+MkYr1E4D/vYGePWaFoV2pSyWeaRjoG iBDMkxQrj9EDAMEYtIqIXeq3hmZo79qTatsLFImwmDjtP29u7AumInnxvpWRY1FPwqvHr/0uv jJcYVaWgNOSQXEIv/pSdBqh4joWsUTHEQgko+WZzpXhpFJDhajwCw14AYUQ4sHhSVvi+yHe1K q1FFyJLqOe9O7MVqVXn/hoJMXm6AsSvESSK+m9poOvLdvnOkWtfwzIT2Lk2oSiUe5qRcZxOUU jX54sQUPqdYGTo2IpWUolPcfG1EeiFhTltdx7P8DPaAvRa7fwlHfBOvQRUa2WfAisfl1baxJL r3fDJ1Kwt88BjJ6X6F5Jsv1GjonsYKZDC7BjLOwKClC63aRXygbcwwwtbHm7pn+k8JO8= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1725 Lines: 43 The previous patch marked these two as 'static' which showed that they are sometimes unused: drivers/firmware/psci.c:103:13: error: 'psci_power_state_is_valid' defined but not used [-Werror=unused-function] static bool psci_power_state_is_valid(u32 state) drivers/firmware/psci.c:94:13: error: 'psci_power_state_loses_context' defined but not used [-Werror=unused-function] static bool psci_power_state_loses_context(u32 state) This also marks the functions 'inline', which has the main effect of silently ignoring them when they are unused. The compiler will typically inline small static functions anyway, so this seems more appropriate than using __maybe_unused, which would have the same result otherwise. Signed-off-by: Arnd Bergmann Fixes: 21e8868 ("drivers: firmware: psci: make two helper functions static") --- drivers/firmware/psci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index 04f2ac5..89fcbdd 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -91,7 +91,7 @@ static inline bool psci_has_ext_power_state(void) PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK; } -static bool psci_power_state_loses_context(u32 state) +static inline bool psci_power_state_loses_context(u32 state) { const u32 mask = psci_has_ext_power_state() ? PSCI_1_0_EXT_POWER_STATE_TYPE_MASK : @@ -100,7 +100,7 @@ static bool psci_power_state_loses_context(u32 state) return state & mask; } -static bool psci_power_state_is_valid(u32 state) +static inline bool psci_power_state_is_valid(u32 state) { const u32 valid_mask = psci_has_ext_power_state() ? PSCI_1_0_EXT_POWER_STATE_MASK : -- 2.7.0