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: <20240604090845.2182265-4-max.kellermann@ionos.com>
Date: Tue,  4 Jun 2024 11:08:33 +0200
From: Max Kellermann <max.kellermann@...os.com>
To: akpm@...ux-foundation.org,
	linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Cc: willy@...radead.org,
	sfr@...b.auug.org.au,
	david@...hat.com,
	Max Kellermann <max.kellermann@...os.com>
Subject: [PATCH v6 03/15] include/scsi/scsicam.h: forward-declare struct block_device

After eliminating includes of linux/mm.h, the following build failure
occurred:

 In file included from drivers/scsi/fdomain.c:87:
 ./include/scsi/scsicam.h:16:31: error: 'struct block_device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
    16 | int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip);
       |                               ^~~~~~~~~~~~
 ./include/scsi/scsicam.h:17:27: error: 'struct block_device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
    17 | bool scsi_partsize(struct block_device *bdev, sector_t capacity, int geom[3]);
       |                           ^~~~~~~~~~~~
 ./include/scsi/scsicam.h:18:40: error: 'struct block_device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
    18 | unsigned char *scsi_bios_ptable(struct block_device *bdev);
       |                                        ^~~~~~~~~~~~
 drivers/scsi/fdomain.c: In function 'fdomain_biosparam':
 drivers/scsi/fdomain.c:475:45: error: passing argument 1 of 'scsi_bios_ptable' from incompatible pointer type [-Werror=incompatible-pointer-types]
   475 |         unsigned char *p = scsi_bios_ptable(bdev);
       |                                             ^~~~
       |                                             |
       |                                             struct block_device *
 ./include/scsi/scsicam.h:18:54: note: expected 'struct block_device *' but argument is of type 'struct block_device *'
    18 | unsigned char *scsi_bios_ptable(struct block_device *bdev);
       |                                 ~~~~~~~~~~~~~~~~~~~~~^~~~

Signed-off-by: Max Kellermann <max.kellermann@...os.com>
---
 include/scsi/scsicam.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/scsi/scsicam.h b/include/scsi/scsicam.h
index 6eb9fb7a57d0..c0de038b76b5 100644
--- a/include/scsi/scsicam.h
+++ b/include/scsi/scsicam.h
@@ -16,6 +16,8 @@
 
 #include <linux/types.h> // for sector_t
 
+struct block_device;
+
 int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip);
 bool scsi_partsize(struct block_device *bdev, sector_t capacity, int geom[3]);
 unsigned char *scsi_bios_ptable(struct block_device *bdev);
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ