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-next>] [day] [month] [year] [list]
Date: Thu,  4 Apr 2024 22:21:11 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "Martin K. Petersen" <martin.petersen@...cle.com>,
	Damien Le Moal <dlemoal@...nel.org>,
	Hannes Reinecke <hare@...e.de>,
	linux-ide@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Niklas Cassel <cassel@...nel.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v1 1/1] ata: libata: Move inclusion to where it belongs

Replace rather heavy acpi.h inclusion by a simple forward declaration
in the public header. Update the local one to include acpi.h as some
of the code requires it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
 drivers/ata/libata.h   | 3 +++
 include/linux/libata.h | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 5c685bb1939e..29e9387eb249 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -90,6 +90,9 @@ extern unsigned int ata_read_log_page(struct ata_device *dev, u8 log,
 #define to_ata_port(d) container_of(d, struct ata_port, tdev)
 
 /* libata-acpi.c */
+
+#include <linux/acpi.h>
+
 #ifdef CONFIG_ATA_ACPI
 extern unsigned int ata_acpi_gtf_filter;
 extern void ata_acpi_dissociate(struct ata_host *host);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 66937b787cca..68b969de410f 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -19,7 +19,6 @@
 #include <linux/ata.h>
 #include <linux/workqueue.h>
 #include <scsi/scsi_host.h>
-#include <linux/acpi.h>
 #include <linux/cdrom.h>
 #include <linux/sched.h>
 #include <linux/async.h>
@@ -660,6 +659,10 @@ struct ata_cpr_log {
 	struct ata_cpr		cpr[] __counted_by(nr_cpr);
 };
 
+#ifdef CONFIG_ATA_ACPI
+union acpi_object;
+#endif
+
 struct ata_device {
 	struct ata_link		*link;
 	unsigned int		devno;		/* 0 or 1 */
-- 
2.43.0.rc1.1.gbec44491f096


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ