From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761114AbcIXIg6 (ORCPT ); Sat, 24 Sep 2016 04:36:58 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:55803 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760032AbcIXIgT (ORCPT ); Sat, 24 Sep 2016 04:36:19 -0400 From: Arnd Bergmann To: Baoyou Xie Cc: lee.jones@linaro.org, linux-kernel@vger.kernel.org, xie.baoyou@zte.com.cn Subject: Re: [PATCH 1/2] mfd: ab8500-debugfs: add function declaration Date: Sat, 24 Sep 2016 10:30:39 +0200 Message-ID: <5669860.khWdu6PIDc@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <1474695290-21619-1-git-send-email-baoyou.xie@linaro.org> References: <1474695290-21619-1-git-send-email-baoyou.xie@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:eqm31HuDS9vOgV0vOsJEpjzBHuCCCSn/r9RfhfG8sNZ4C8KI6h9 lu7w9tBCmgM+VRv27SM06C7xnas55TKMc3zZ/t1ZhxXJI9NFPj/aTBUHKoAyM1HLjiBjL6K HwkpXsXBH23K27GkeoJTkJSrVkxXpzYG0pmUGPMOsCCVGYCCOq1I208Yf9syL/81lYnXrxe TCGKNpq6OPq05UT32bMOQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:OdcAiYLhd2E=:9Cbo8WMNBu1mMRbGtI6cP/ uuypO/o1cHZ1fUp8xerS+HTrSW3qf1WPTbm3AcUO45qtXw6De//NPzYabT664stGF+PMuGX2T sROW9q3HZesF8L670gL+lgAxAwwmFVqUUBjd2f+KmrtP9jqkoC0JdT0/mmusJVeX9sbPmKH0O Ph3l8wJXQN3CgvaGISmH4jlMdXVluG5SMgbvyIOPO8SgdBQFI5ZVkYLV08SbfqRyHOWm3T9JY Vyk3Ga33xlV2BvXAsj2aFvUBOEXXbYljCI5BkXs3bgDoZp9AkL7Bae0f6b3R0KRCOvSGkBVu0 qbl+/2BenszhKdlX3jJoz0d2xmsqLgMpAffp2EBjXgXfNK5CPSlNwKm5NgL7jciCWbIUWOgVT +gJxJb3kyxoXSN9OLXV01UbPZOXTGpQy/M2vtgMSmDUyKuqgiROdJ82OAtW2432AVRy7VKahP lyntgtoG19cYM2j2NUH/VSi6EKYccxKnLXPhCWrrDhWLqeB8WPun+TG6CL6T//UMZAPFDpez2 JXUqEXM+sA631qBZ6plW4WSwnkHn33Y8Y5Rq9TO7E8BJyz2fJvXL8pxcENUHkzitQH9Mum7Yk sYpcK33gIJnAWEsDDq646Br87/WnYQqhxXpQj/srRoKvW0aszjvk61L8vZG9JAyBYSBg2bIhT 9GehNAiRK6x+Ltisco93WmdpRkzkYhFulvmGhQS5Nu9BvvMSwE9oAX6ypyiG2bnHgRGJuxQ3M jBHQUIn/QfBE4+2G Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, September 24, 2016 1:34:50 PM CEST Baoyou Xie wrote: > We get 1 warning when building kernel with W=1: > drivers/mfd/ab8500-debugfs.c:1587:28: warning: no previous prototype for 'suspend_test_wake_cause_interrupt_is_mine' [-Wmissing-prototypes] > > In fact, this function need be declared in a header files. > > So this patch adds function declaration in > include/linux/mfd/abx500/ab8500.h. > > Signed-off-by: Baoyou Xie > --- > include/linux/mfd/abx500/ab8500.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h > index 9475fee..a496120 100644 > --- a/include/linux/mfd/abx500/ab8500.h > +++ b/include/linux/mfd/abx500/ab8500.h > @@ -508,6 +508,7 @@ void ab8500_override_turn_on_stat(u8 mask, u8 set); > extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); > void ab8500_dump_all_banks(struct device *dev); > void ab8500_debug_register_interrupt(int line); > +bool suspend_test_wake_cause_interrupt_is_mine(u32 my_int); > #else > static inline void ab8500_dump_all_banks(struct device *dev) {} > static inline void ab8500_debug_register_interrupt(int line) {} > This can't be right for two reasons: - the suspend_test_wake_cause_interrupt_is_mine function again is only used in the file it is defined in - the name of the function does not have a prefix with the name of the driver I think the right fix is to make the function 'static inline' and add a comment about the intent. Arnd