git: fd9a4a67d053 - main - cam: Minor opt_cam.h cleanup

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 06 Nov 2023 18:56:29 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=fd9a4a67d053a51349ba6eba5ea61a7cd2cf20af

commit fd9a4a67d053a51349ba6eba5ea61a7cd2cf20af
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-11-06 17:47:15 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-11-06 17:47:15 +0000

    cam: Minor opt_cam.h cleanup
    
    sys/cam/cam.h includes opt_cam.h, so none of the clients need to do
    this. cam.h does all the right dancing to conditionally include
    opt_cam.h only when it makes sense. It generally only matters when
    cam_debug.h is included (it must be included before that). Many of the
    stray opt_cam.h includes were after cam_debug.h which would be a problem
    were it not included in cam/cam.h. The other users of CAM options that
    aren't debug all already include cam/cam.h.
    
    Also trim unneeded sys/cdefs.h files from the files touched.
    
    Sponsored by:           Netflix
---
 sys/cam/ata/ata_xpt.c     | 2 --
 sys/cam/cam_compat.c      | 2 --
 sys/cam/cam_iosched.c     | 3 ---
 sys/cam/cam_xpt.c         | 2 --
 sys/cam/mmc/mmc_xpt.c     | 2 --
 sys/cam/nvme/nvme_xpt.c   | 2 --
 sys/cam/scsi/scsi_xpt.c   | 2 --
 sys/dev/nvme/nvme_ctrlr.c | 2 --
 sys/dev/sdio/sdiob.c      | 3 ---
 9 files changed, 20 deletions(-)

diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
index feece601a6a9..1b759f55ee8a 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -26,7 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/bus.h>
 #include <sys/endian.h>
@@ -59,7 +58,6 @@
 #include <cam/scsi/scsi_message.h>
 #include <cam/ata/ata_all.h>
 #include <machine/stdarg.h>	/* for xpt_print below */
-#include "opt_cam.h"
 
 struct ata_quirk_entry {
 	struct scsi_inquiry_pattern inq_pat;
diff --git a/sys/cam/cam_compat.c b/sys/cam/cam_compat.c
index c377763fc7c5..d95a11e80c2e 100644
--- a/sys/cam/cam_compat.c
+++ b/sys/cam/cam_compat.c
@@ -50,8 +50,6 @@
 
 #include <cam/scsi/scsi_pass.h>
 
-#include "opt_cam.h"
-
 static int cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr,
     int flag, struct thread *td, d_ioctl_t *cbfnp);
 static int cam_compat_handle_0x18(struct cdev *dev, u_long cmd, caddr_t addr,
diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c
index 739fe34ef184..b83ab9699425 100644
--- a/sys/cam/cam_iosched.c
+++ b/sys/cam/cam_iosched.c
@@ -27,12 +27,9 @@
  * SUCH DAMAGE.
  */
 
-#include "opt_cam.h"
 #include "opt_ddb.h"
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
-
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/bio.h>
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index a1dec7a8a674..dc423991fd58 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -71,8 +71,6 @@
 
 #include <machine/stdarg.h>	/* for xpt_print below */
 
-#include "opt_cam.h"
-
 /* Wild guess based on not wanting to grow the stack too much */
 #define XPT_PRINT_MAXLEN	512
 #ifdef PRINTF_BUFR_SIZE
diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c
index 41b3f5146530..c8b57c2d8d86 100644
--- a/sys/cam/mmc/mmc_xpt.c
+++ b/sys/cam/mmc/mmc_xpt.c
@@ -26,7 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/bus.h>
 #include <sys/endian.h>
@@ -61,7 +60,6 @@
 
 #include <machine/stdarg.h>	/* for xpt_print below */
 #include <machine/_inttypes.h>  /* for PRIu64 */
-#include "opt_cam.h"
 
 FEATURE(mmccam, "CAM-based MMC/SD/SDIO stack");
 
diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c
index 54dc81cfef7e..8b9fbcd21291 100644
--- a/sys/cam/nvme/nvme_xpt.c
+++ b/sys/cam/nvme/nvme_xpt.c
@@ -27,7 +27,6 @@
  * derived from ata_xpt.c: Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org>
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/bus.h>
 #include <sys/endian.h>
@@ -59,7 +58,6 @@
 #include <cam/scsi/scsi_message.h>
 #include <cam/nvme/nvme_all.h>
 #include <machine/stdarg.h>	/* for xpt_print below */
-#include "opt_cam.h"
 
 struct nvme_quirk_entry {
 	u_int quirks;
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c
index 9e936330fb27..42f290765c53 100644
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -29,7 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/bus.h>
 #include <sys/systm.h>
@@ -61,7 +60,6 @@
 #include <cam/scsi/scsi_message.h>
 #include <cam/scsi/scsi_pass.h>
 #include <machine/stdarg.h>	/* for xpt_print below */
-#include "opt_cam.h"
 
 struct scsi_quirk_entry {
 	struct scsi_inquiry_pattern inq_pat;
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index b72359a061da..5d72f707d3b1 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -26,8 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
-#include "opt_cam.h"
 #include "opt_nvme.h"
 
 #include <sys/param.h>
diff --git a/sys/dev/sdio/sdiob.c b/sys/dev/sdio/sdiob.c
index e60e8759599f..60389c419e35 100644
--- a/sys/dev/sdio/sdiob.c
+++ b/sys/dev/sdio/sdiob.c
@@ -62,9 +62,6 @@
  * messages from MMCCAM to newbus and back.
  */
 
-#include <sys/cdefs.h>
-#include "opt_cam.h"
-
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/types.h>