Return-Path: Received: from mx2.suse.de ([195.135.220.15]:43384 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755807AbdABMpu (ORCPT ); Mon, 2 Jan 2017 07:45:50 -0500 From: Jiri Slaby To: stable@vger.kernel.org Cc: Boris Brezillon , Geert Uytterhoeven , Jiri Slaby Subject: [patch added to 3.12-stable] m68k: Fix ndelay() macro Date: Mon, 2 Jan 2017 13:45:40 +0100 Message-Id: <20170102124541.18653-6-jslaby@suse.cz> In-Reply-To: <20170102124541.18653-1-jslaby@suse.cz> References: <20170102124541.18653-1-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org List-ID: From: Boris Brezillon This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. =============== commit 7e251bb21ae08ca2e4fb28cc0981fac2685a8efa upstream. The current ndelay() macro definition has an extra semi-colon at the end of the line thus leading to a compilation error when ndelay is used in a conditional block without curly braces like this one: if (cond) ndelay(t); else ... which, after the preprocessor pass gives: if (cond) m68k_ndelay(t);; else ... thus leading to the following gcc error: error: 'else' without a previous 'if' Remove this extra semi-colon. Signed-off-by: Boris Brezillon Fixes: c8ee038bd1488 ("m68k: Implement ndelay() based on the existing udelay() logic") Signed-off-by: Geert Uytterhoeven Signed-off-by: Jiri Slaby --- arch/m68k/include/asm/delay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/include/asm/delay.h b/arch/m68k/include/asm/delay.h index d28fa8fe26fe..c598d847d56b 100644 --- a/arch/m68k/include/asm/delay.h +++ b/arch/m68k/include/asm/delay.h @@ -114,6 +114,6 @@ static inline void __udelay(unsigned long usecs) */ #define HZSCALE (268435456 / (1000000 / HZ)) -#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000)); +#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000)) #endif /* defined(_M68K_DELAY_H) */ -- 2.11.0