Skip to contentSkip to conversation

drivers_scsi_gvp11.c: kill duplicate #include

TRIVIAL Rusty Russell 2 participants 2 messages May 20, 2004 SCSI

lore
Share & tools
lore
#0 lore raw

From: [email protected] (Arthur Othieno)

---
Hi,

Quoted 1 line

From scripts/checkincludes.pl:

./drivers/scsi/gvp11.c: gvp11.h is included more than once.

Output from `grep' shows:

    $ grep -n gvp11.h drivers/scsi/gvp11.c
    21:#include "gvp11.h"
    355:#include "gvp11.h"

Against 2.6.5. Thanks.

drivers/scsi/gvp11.c renamed from drivers/scsi/gvp11.c.orig +0 -2
@@ -352,8 +352,6 @@
 
 #define HOSTS_C
 
-#include "gvp11.h"
-
 static Scsi_Host_Template driver_template = {
 	.proc_name		= "GVP11",
 	.name			= "GVP Series II SCSI",
Signature · 3 lines
  What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
  Don't blame me: the Monkey is driving
  File: [email protected] (Arthur Othieno): [TRIVIAL 2.6] drivers_scsi_gvp11.c: kill duplicate #include
#1 lore raw

drivers/scsi/gvp11.c line 357

Quoted 7 lines · Rusty Russell

#define HOSTS_C

drivers/scsi/gvp11.c renamed from drivers/scsi/gvp11.c.orig +0 -2
-#include "gvp11.h"
-
 static Scsi_Host_Template driver_template = {
 	.proc_name		= "GVP11",
 	.name			= "GVP Series II SCSI",

This is definitely wrong. I don't agree with the usage, but gvp11.h is designed to be included twice. The define of HOST_C above alters the behaviour of the second include.

If you'd like to fix it correctly....

James