linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: libsas: allow libsas include scsi header files directly
@ 2021-07-16  7:45 Jason Yan
  2021-07-19  8:10 ` John Garry
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jason Yan @ 2021-07-16  7:45 UTC (permalink / raw)
  To: jejb, martin.petersen, linux-scsi; +Cc: Jason Yan, John Garry

libsas needs to include some header files in the scsi directory. However
they are now hardcoded with the path "../" in the C files. Let's do this
in the Makefile to avoid the hardcode.

Cc: John Garry <john.garry@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/libsas/Makefile        | 2 +-
 drivers/scsi/libsas/sas_ata.c       | 4 ++--
 drivers/scsi/libsas/sas_discover.c  | 2 +-
 drivers/scsi/libsas/sas_expander.c  | 2 +-
 drivers/scsi/libsas/sas_host_smp.c  | 2 +-
 drivers/scsi/libsas/sas_init.c      | 2 +-
 drivers/scsi/libsas/sas_phy.c       | 2 +-
 drivers/scsi/libsas/sas_port.c      | 2 +-
 drivers/scsi/libsas/sas_scsi_host.c | 6 +++---
 9 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/libsas/Makefile b/drivers/scsi/libsas/Makefile
index e63a54f5ab8c..9dc32736cf21 100644
--- a/drivers/scsi/libsas/Makefile
+++ b/drivers/scsi/libsas/Makefile
@@ -18,4 +18,4 @@ libsas-y +=  sas_init.o     \
 libsas-$(CONFIG_SCSI_SAS_ATA) +=	sas_ata.o
 libsas-$(CONFIG_SCSI_SAS_HOST_SMP) +=	sas_host_smp.o
 
-ccflags-y := -DDEBUG
+ccflags-y := -DDEBUG -I$(srctree)/drivers/scsi
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 4aa1fda95f35..1e0df6b17227 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -20,8 +20,8 @@
 #include <scsi/scsi.h>
 #include <scsi/scsi_transport.h>
 #include <scsi/scsi_transport_sas.h>
-#include "../scsi_sas_internal.h"
-#include "../scsi_transport_api.h"
+#include "scsi_sas_internal.h"
+#include "scsi_transport_api.h"
 #include <scsi/scsi_eh.h>
 
 static enum ata_completion_errors sas_to_ata_err(struct task_status_struct *ts)
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
index dd205414e505..12e1e36d7c04 100644
--- a/drivers/scsi/libsas/sas_discover.c
+++ b/drivers/scsi/libsas/sas_discover.c
@@ -16,7 +16,7 @@
 #include <scsi/scsi_transport.h>
 #include <scsi/scsi_transport_sas.h>
 #include <scsi/sas_ata.h>
-#include "../scsi_sas_internal.h"
+#include "scsi_sas_internal.h"
 
 /* ---------- Basic task processing for discovery purposes ---------- */
 
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index e00688540219..c2150a818423 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -18,7 +18,7 @@
 #include <scsi/sas_ata.h>
 #include <scsi/scsi_transport.h>
 #include <scsi/scsi_transport_sas.h>
-#include "../scsi_sas_internal.h"
+#include "scsi_sas_internal.h"
 
 static int sas_discover_expander(struct domain_device *dev);
 static int sas_configure_routing(struct domain_device *dev, u8 *sas_addr);
diff --git a/drivers/scsi/libsas/sas_host_smp.c b/drivers/scsi/libsas/sas_host_smp.c
index eca2a6bf3601..32cdc969b736 100644
--- a/drivers/scsi/libsas/sas_host_smp.c
+++ b/drivers/scsi/libsas/sas_host_smp.c
@@ -14,7 +14,7 @@
 
 #include <scsi/scsi_transport.h>
 #include <scsi/scsi_transport_sas.h>
-#include "../scsi_sas_internal.h"
+#include "scsi_sas_internal.h"
 
 static void sas_host_smp_discover(struct sas_ha_struct *sas_ha, u8 *resp_data,
 				  u8 phy_id)
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c
index 2b0f98ca6ec3..80592f53017a 100644
--- a/drivers/scsi/libsas/sas_init.c
+++ b/drivers/scsi/libsas/sas_init.c
@@ -19,7 +19,7 @@
 
 #include "sas_internal.h"
 
-#include "../scsi_sas_internal.h"
+#include "scsi_sas_internal.h"
 
 static struct kmem_cache *sas_task_cache;
 static struct kmem_cache *sas_event_cache;
diff --git a/drivers/scsi/libsas/sas_phy.c b/drivers/scsi/libsas/sas_phy.c
index 4ca4b1f30bd0..a0d592d11dfb 100644
--- a/drivers/scsi/libsas/sas_phy.c
+++ b/drivers/scsi/libsas/sas_phy.c
@@ -10,7 +10,7 @@
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_transport.h>
 #include <scsi/scsi_transport_sas.h>
-#include "../scsi_sas_internal.h"
+#include "scsi_sas_internal.h"
 
 /* ---------- Phy events ---------- */
 
diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c
index e3d03d744713..67b429dcf1ff 100644
--- a/drivers/scsi/libsas/sas_port.c
+++ b/drivers/scsi/libsas/sas_port.c
@@ -10,7 +10,7 @@
 
 #include <scsi/scsi_transport.h>
 #include <scsi/scsi_transport_sas.h>
-#include "../scsi_sas_internal.h"
+#include "scsi_sas_internal.h"
 
 static bool phy_is_wideport_member(struct asd_sas_port *port, struct asd_sas_phy *phy)
 {
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index ee44a0d7730b..5db10248f187 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -22,9 +22,9 @@
 #include <scsi/scsi_transport.h>
 #include <scsi/scsi_transport_sas.h>
 #include <scsi/sas_ata.h>
-#include "../scsi_sas_internal.h"
-#include "../scsi_transport_api.h"
-#include "../scsi_priv.h"
+#include "scsi_sas_internal.h"
+#include "scsi_transport_api.h"
+#include "scsi_priv.h"
 
 #include <linux/err.h>
 #include <linux/blkdev.h>
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: libsas: allow libsas include scsi header files directly
  2021-07-16  7:45 [PATCH] scsi: libsas: allow libsas include scsi header files directly Jason Yan
@ 2021-07-19  8:10 ` John Garry
  2021-07-21  3:12 ` Martin K. Petersen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: John Garry @ 2021-07-19  8:10 UTC (permalink / raw)
  To: yanaijie, jejb, martin.petersen, linux-scsi

On 16/07/2021 08:45, yanaijie wrote:
> libsas needs to include some header files in the scsi directory. However
> they are now hardcoded with the path "../" in the C files. Let's do this
> in the Makefile to avoid the hardcode.
> 
> Cc: John Garry<john.garry@huawei.com>
> Signed-off-by: Jason Yan<yanaijie@huawei.com>
> ---
>   drivers/scsi/libsas/Makefile        | 2 +-
>   drivers/scsi/libsas/sas_ata.c       | 4 ++--
>   drivers/scsi/libsas/sas_discover.c  | 2 +-
>   drivers/scsi/libsas/sas_expander.c  | 2 +-
>   drivers/scsi/libsas/sas_host_smp.c  | 2 +-
>   drivers/scsi/libsas/sas_init.c      | 2 +-
>   drivers/scsi/libsas/sas_phy.c       | 2 +-
>   drivers/scsi/libsas/sas_port.c      | 2 +-
>   drivers/scsi/libsas/sas_scsi_host.c | 6 +++---
>   9 files changed, 12 insertions(+), 12 deletions(-)

Reviewed-by: John Garry <john.garry@huawei.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: libsas: allow libsas include scsi header files directly
  2021-07-16  7:45 [PATCH] scsi: libsas: allow libsas include scsi header files directly Jason Yan
  2021-07-19  8:10 ` John Garry
@ 2021-07-21  3:12 ` Martin K. Petersen
  2021-07-24  2:13 ` Martin K. Petersen
  2021-07-27  4:14 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-07-21  3:12 UTC (permalink / raw)
  To: Jason Yan; +Cc: jejb, martin.petersen, linux-scsi, John Garry


Jason,

> libsas needs to include some header files in the scsi
> directory. However they are now hardcoded with the path "../" in the C
> files. Let's do this in the Makefile to avoid the hardcode.

Applied to 5.15/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: libsas: allow libsas include scsi header files directly
  2021-07-16  7:45 [PATCH] scsi: libsas: allow libsas include scsi header files directly Jason Yan
  2021-07-19  8:10 ` John Garry
  2021-07-21  3:12 ` Martin K. Petersen
@ 2021-07-24  2:13 ` Martin K. Petersen
  2021-07-27  4:14 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-07-24  2:13 UTC (permalink / raw)
  To: linux-scsi, jejb, Jason Yan; +Cc: Martin K . Petersen, John Garry

On Fri, 16 Jul 2021 15:45:51 +0800, Jason Yan wrote:

> libsas needs to include some header files in the scsi directory. However
> they are now hardcoded with the path "../" in the C files. Let's do this
> in the Makefile to avoid the hardcode.

Applied to 5.15/scsi-queue, thanks!

[1/1] scsi: libsas: allow libsas include scsi header files directly
      https://git.kernel.org/mkp/scsi/c/e15f669cd996

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: libsas: allow libsas include scsi header files directly
  2021-07-16  7:45 [PATCH] scsi: libsas: allow libsas include scsi header files directly Jason Yan
                   ` (2 preceding siblings ...)
  2021-07-24  2:13 ` Martin K. Petersen
@ 2021-07-27  4:14 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-07-27  4:14 UTC (permalink / raw)
  To: Jason Yan, linux-scsi, jejb; +Cc: Martin K . Petersen, John Garry

On Fri, 16 Jul 2021 15:45:51 +0800, Jason Yan wrote:

> libsas needs to include some header files in the scsi directory. However
> they are now hardcoded with the path "../" in the C files. Let's do this
> in the Makefile to avoid the hardcode.

Applied to 5.15/scsi-queue, thanks!

[1/1] scsi: libsas: allow libsas include scsi header files directly
      https://git.kernel.org/mkp/scsi/c/e15f669cd996

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-27  4:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16  7:45 [PATCH] scsi: libsas: allow libsas include scsi header files directly Jason Yan
2021-07-19  8:10 ` John Garry
2021-07-21  3:12 ` Martin K. Petersen
2021-07-24  2:13 ` Martin K. Petersen
2021-07-27  4:14 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).