lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <250970e7-e430-e8fe-2844-5c7f627b0c26@kernel.dk>
Date:   Fri, 1 Oct 2021 13:57:52 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Naresh Kamboju <naresh.kamboju@...aro.org>,
        open list <linux-kernel@...r.kernel.org>,
        linux-block <linux-block@...r.kernel.org>,
        Linux-Next Mailing List <linux-next@...r.kernel.org>,
        lkft-triage@...ts.linaro.org
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: swim3.c:1200:38: error: 'FLOPPY_MAJOR' undeclared (first use in
 this function)

On 10/1/21 4:49 AM, Naresh Kamboju wrote:
> Following build errors noticed while building Linux next 20211001
> with gcc-11 for powerpc architecture.
> 
> kernel/sched/debug.c: In function 'print_cfs_group_stats':
> kernel/sched/debug.c:460:41: warning: unused variable 'stats'
> [-Wunused-variable]
>   460 |                struct sched_statistics *stats =
> __schedstats_from_se(se);
>       |                                         ^~~~~
> In file included from include/linux/blkdev.h:6,
>                  from include/linux/blk-mq.h:5,
>                  from drivers/block/swim3.c:24:
> drivers/block/swim3.c: In function 'swim3_attach':
> drivers/block/swim3.c:1200:38: error: 'FLOPPY_MAJOR' undeclared (first
> use in this function)
>  1200 |                 rc = register_blkdev(FLOPPY_MAJOR, "fd");
>       |                                      ^~~~~~~~~~~~
> include/linux/genhd.h:276:27: note: in definition of macro 'register_blkdev'
>   276 |         __register_blkdev(major, name, NULL)
>       |                           ^~~~~
> drivers/block/swim3.c:1200:38: note: each undeclared identifier is
> reported only once for each function it appears in
>  1200 |                 rc = register_blkdev(FLOPPY_MAJOR, "fd");
>       |                                      ^~~~~~~~~~~~
> include/linux/genhd.h:276:27: note: in definition of macro 'register_blkdev'
>   276 |         __register_blkdev(major, name, NULL)
>       |                           ^~~~~
> make[3]: *** [scripts/Makefile.build:288: drivers/block/swim3.o] Error 1
> make[3]: Target '__build' not remade because of errors.
> make[2]: *** [scripts/Makefile.build:571: drivers/block] Error 2
> make[2]: Target '__build' not remade because of errors.
> make[1]: *** [Makefile:2034: drivers] Error 2
> 
> Build config:
> https://builds.tuxbuild.com/1ytcB62L9I617oV0cveJtUhcpUu/config
> 
> Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> 
> meta data:
> -----------
>     git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
>     git_sha: a25006a77348ba06c7bc96520d331cd9dd370715
>     git_short_log: a25006a77348 (\"Add linux-next specific files for 20211001\")
>     kconfig:  ppc6xx_defconfig
>     kernel_version: 5.15.0-rc3
>     target_arch: powerpc
>     toolchain: gcc-11
> 
> steps to reproduce:
> https://builds.tuxbuild.com/1ytcB62L9I617oV0cveJtUhcpUu/tuxmake_reproducer.sh

Does this fix it?


diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index f7e3482e846b..4b91c9aa5892 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -27,6 +27,7 @@
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/wait.h>
+#include <linux/major.h>
 #include <asm/io.h>
 #include <asm/dbdma.h>
 #include <asm/prom.h>

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ