From patchwork Mon Aug 1 16:39:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 9254779 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DCC9E6089F for ; Mon, 1 Aug 2016 17:55:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D358F284B8 for ; Mon, 1 Aug 2016 17:55:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7C36284BF; Mon, 1 Aug 2016 17:55:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=2.0 tests=BAYES_00,FAKE_REPLY_C, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90A8B284B8 for ; Mon, 1 Aug 2016 17:55:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754609AbcHARyo (ORCPT ); Mon, 1 Aug 2016 13:54:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:51594 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754248AbcHARyU (ORCPT ); Mon, 1 Aug 2016 13:54:20 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B253AACAC; Mon, 1 Aug 2016 16:39:58 +0000 (UTC) Received: by nazgul.tnic (Postfix, from userid 1000) id BE04E5FE51; Mon, 1 Aug 2016 18:39:37 +0200 (CEST) Date: Mon, 1 Aug 2016 18:39:37 +0200 From: Borislav Petkov To: kbuild test robot Cc: kbuild-all@01.org, Andrew Morton , Linux Memory Management List , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org Subject: Re: [linux-next:master 12268/12761] include/linux/ratelimit.h:61:3: error: 'DRIVER_NAME' undeclared Message-ID: <20160801163937.GA28119@nazgul.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201608012050.XZyUj6hM%fengguang.wu@intel.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Aug 01, 2016 at 08:53:52PM +0800, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: c24c1308a5b274bbd90db927cb18efddc95340c7 > commit: f207be0388d86d4ed049fbbec2650a2688b5b0f7 [12268/12761] ratelimit: extend to print suppressed messages on release > config: blackfin-allyesconfig (attached as .config) > compiler: bfin-uclinux-gcc (GCC) 4.6.3 > reproduce: > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > git checkout f207be0388d86d4ed049fbbec2650a2688b5b0f7 > # save the attached .config to linux build tree > make.cross ARCH=blackfin > > All errors (new ones prefixed by >>): > > In file included from include/linux/device.h:27:0, > from include/linux/i2c.h:30, > from include/uapi/linux/fb.h:5, > from include/linux/fb.h:5, > from drivers/video/fbdev/bfin_adv7393fb.c:23: > include/linux/ratelimit.h: In function 'ratelimit_state_exit': > >> include/linux/ratelimit.h:61:3: error: 'DRIVER_NAME' undeclared (first use in this function) > include/linux/ratelimit.h:61:3: note: each undeclared identifier is reported only once for each function it appears in > >> include/linux/ratelimit.h:61:3: error: expected ')' before string constant Hmm, so I get a different build error with this: arch/blackfin/mach-common/arch_checks.c:24:3: error: #error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier" arch/blackfin/mach-common/arch_checks.c:28:3: error: #error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK" arch/blackfin/mach-common/arch_checks.c:51:3: error: #error the MPU will not function safely while Anomaly 05000263 applies make[1]: *** [arch/blackfin/mach-common/arch_checks.o] Error 1 make: *** [arch/blackfin/mach-common] Error 2 make: *** Waiting for unfinished jobs.... If I checkout the next commit: e8a10ce9a9fd ("printk: add kernel parameter to control writes to /dev/kmsg") and build printk.c which is the only user of ratelimit_state_exit(), it builds fine-ish (blackfin compiler can't follow the if (write) thing but that's a different issue): $ ~/bin/make.cross ARCH=blackfin kernel/printk/printk.o make CROSS_COMPILE=/home/boris/opt/gcc-4.6.3-nolibc/bfin-uclinux/bin/bfin-uclinux- --jobs=8 ARCH=blackfin kernel/printk/printk.o CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/timeconst.h CHK include/generated/bounds.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh :1268:2: warning: #warning syscall accept4 not implemented [-Wcpp] :1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp] :1301:2: warning: #warning syscall membarrier not implemented [-Wcpp] :1304:2: warning: #warning syscall mlock2 not implemented [-Wcpp] :1307:2: warning: #warning syscall copy_file_range not implemented [-Wcpp] :1310:2: warning: #warning syscall preadv2 not implemented [-Wcpp] :1313:2: warning: #warning syscall pwritev2 not implemented [-Wcpp] CC kernel/printk/printk.o kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': kernel/printk/printk.c:184:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] Hmm, I can trigger it this way: $ ~/bin/make.cross ARCH=blackfin drivers/video/fbdev/bfin_adv7393fb.o make CROSS_COMPILE=/home/boris/opt/gcc-4.6.3-nolibc/bfin-uclinux/bin/bfin-uclinux- --jobs=8 ARCH=blackfin drivers/video/fbdev/bfin_adv7393fb.o CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/timeconst.h CHK include/generated/bounds.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh :1268:2: warning: #warning syscall accept4 not implemented [-Wcpp] :1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp] :1301:2: warning: #warning syscall membarrier not implemented [-Wcpp] :1304:2: warning: #warning syscall mlock2 not implemented [-Wcpp] :1307:2: warning: #warning syscall copy_file_range not implemented [-Wcpp] :1310:2: warning: #warning syscall preadv2 not implemented [-Wcpp] :1313:2: warning: #warning syscall pwritev2 not implemented [-Wcpp] CC drivers/video/fbdev/bfin_adv7393fb.o In file included from include/linux/device.h:27:0, from include/linux/i2c.h:30, from include/uapi/linux/fb.h:5, from include/linux/fb.h:5, from drivers/video/fbdev/bfin_adv7393fb.c:23: include/linux/ratelimit.h: In function 'ratelimit_state_exit': include/linux/ratelimit.h:61:3: error: 'DRIVER_NAME' undeclared (first use in this function) include/linux/ratelimit.h:61:3: note: each undeclared identifier is reported only once for each function it appears in include/linux/ratelimit.h:61:3: error: expected ')' before string constant drivers/video/fbdev/bfin_adv7393fb.c: At top level: drivers/video/fbdev/bfin_adv7393fb.c:323:12: warning: 'proc_output' defined but not used [-Wunused-function] scripts/Makefile.build:289: recipe for target 'drivers/video/fbdev/bfin_adv7393fb.o' failed make[1]: *** [drivers/video/fbdev/bfin_adv7393fb.o] Error 1 Makefile:1628: recipe for target 'drivers/video/fbdev/bfin_adv7393fb.o' failed make: *** [drivers/video/fbdev/bfin_adv7393fb.o] Error 2 And of course it won't build. Here's a fix. --- From: Borislav Petkov Date: Mon, 1 Aug 2016 18:34:42 +0200 Subject: [PATCH] fbdev/bfin_adv7393fb: Move DRIVER_NAME before its first use Move the DRIVER_NAME macro definition before the first usage site and fix build error. Reported-by: kbuild test robot Signed-off-by: Borislav Petkov Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org --- drivers/video/fbdev/bfin_adv7393fb.c | 2 ++ drivers/video/fbdev/bfin_adv7393fb.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/bfin_adv7393fb.c b/drivers/video/fbdev/bfin_adv7393fb.c index 8fe41caac38e..e2d7d039ce3b 100644 --- a/drivers/video/fbdev/bfin_adv7393fb.c +++ b/drivers/video/fbdev/bfin_adv7393fb.c @@ -10,6 +10,8 @@ * TODO: Code Cleanup */ +#define DRIVER_NAME "bfin-adv7393" + #define pr_fmt(fmt) DRIVER_NAME ": " fmt #include diff --git a/drivers/video/fbdev/bfin_adv7393fb.h b/drivers/video/fbdev/bfin_adv7393fb.h index cd591b5152a5..afd0380e19e1 100644 --- a/drivers/video/fbdev/bfin_adv7393fb.h +++ b/drivers/video/fbdev/bfin_adv7393fb.h @@ -59,8 +59,6 @@ enum { BLANK_OFF, }; -#define DRIVER_NAME "bfin-adv7393" - struct adv7393fb_modes { const s8 name[25]; /* Full name */ u16 xres; /* Active Horizonzal Pixels */