Skip to contentSkip to conversation

git scsi misc include fix

PATCH In review [email protected] 3 participants 3 messages Oct 16, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 2/7 git scsi misc include fix

From: Paul Jackson <[email protected]>

The added line in scsi_eh.h:

	struct scatterlist sense_sgl;

fails to compile, with the error:
field 'sense_sgl' has incomplete type
unless scatterlist.h happens to be included somehow already ... which it isn't always.

So include scatterlist.h in scsi_eh.h directly.

---

 include/scsi/scsi_eh.h |    1 +
 1 file changed, 1 insertion(+)
include/scsi/scsi_eh.h renamed from include/scsi/scsi_eh.h~git-scsi-misc-include-fix +1 -0
diff -puN include/scsi/scsi_eh.h~git-scsi-misc-include-fix include/scsi/scsi_eh.h
@@ -4,6 +4,7 @@
 #include <linux/scatterlist.h>
 
 #include <scsi/scsi_cmnd.h>
+#include <linux/scatterlist.h>
 struct scsi_device;
 struct Scsi_Host;
 

_

#1 lore raw
Quoted 23 lines · On Tue, 16 Oct 2007 14:28:20 -0700 [email protected] wrote:

From: Paul Jackson <[email protected]>

The added line in scsi_eh.h:

	struct scatterlist sense_sgl;

fails to compile, with the error:
field 'sense_sgl' has incomplete type
unless scatterlist.h happens to be included somehow already ... which it isn't always.

So include scatterlist.h in scsi_eh.h directly.

---

 include/scsi/scsi_eh.h |    1 +
 1 file changed, 1 insertion(+)

diff -puN include/scsi/scsi_eh.h~git-scsi-misc-include-fix include/scsi/scsi_eh.h

include/scsi/scsi_eh.h line 9

Quoted 6 lines
include/scsi/scsi_eh.h renamed from include/scsi/scsi_eh.h~git-scsi-misc-include-fix +1 -0
@@ -4,6 +4,7 @@
 #include <linux/scatterlist.h>
 
 #include <scsi/scsi_cmnd.h>
+#include <linux/scatterlist.h>
 struct scsi_device;
 struct Scsi_Host;

It's 3 lines above the patch line....

---
~Randy

#2 lore raw
Quoted 8 lines · Randy
Quoted 6 lines

#include <linux/scatterlist.h>

#include <scsi/scsi_cmnd.h>
+#include <linux/scatterlist.h>
struct scsi_device;
struct Scsi_Host;

It's 3 lines above the patch line....

Ah - you mean scatterlist.h is now included twice - yup.

First I noticed that scsi_eh.h needed this scatterlist.h include and sent this patch to akpm. Then James noticed that my patch just added scatterlist.h to scsi_eh.h, without removing it from the other .c file where it was no longer needed, so he sent along a patch that did both - removing the one include and adding the other. His patch added the first scatterlist.h include above, and my earlier patch added the second.

Now we have both scatterlist.h includes here.

I guess I'll leave it up to James to send along a third patch someday, that removes one of these includes.

Sharp eyes, Randy - thanks.

Signature · 3 lines
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401