Skip to contentSkip to conversation

Scsi not compiling without /proc support

PATCH In review Paul Rolland 2 participants 2 messages Jan 12, 2003 – Jan 13, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Scsi not compiling without /proc support

Hello,

This quick patch is used to remove calls to functions in charge of registering/unregistering within /proc when /proc support is not enabled.

Paul Rolland, [email protected]

diff -uN linux-2.5.56/drivers/scsi/hosts.c
linux-2.5.56-work/drivers/scsi/hosts.c
--- linux-2.5.56/drivers/scsi/hosts.c 2003-01-10 21:11:20.000000000
+0100
+++ linux-2.5.56-work/drivers/scsi/hosts.c 2003-01-12
12:42:59.000000000 +0100
@@ -345,7 +345,9 @@

        shost->hostt->present--;
 
        /* Cleanup proc */
+#ifdef CONFIG_PROC_FS
        scsi_proc_host_rm(shost);

+#endif

        kfree(shost);
 }
@@ -456,7 +458,9 @@
 found:
        spin_unlock(&scsi_host_list_lock);

+#ifdef CONFIG_PROC_FS

        scsi_proc_host_add(shost);

+#endif

        shost->eh_notify = &sem;
        kernel_thread((int (*)(void *)) scsi_error_handler, (void *)

shost, 0);

#1 lore raw
Quoted 34 lines · Paul Rolland

Hello,

This quick patch is used to remove calls to functions in charge of registering/unregistering within /proc when /proc support is not enabled.

Paul Rolland, [email protected]

diff -uN linux-2.5.56/drivers/scsi/hosts.c
linux-2.5.56-work/drivers/scsi/hosts.c
--- linux-2.5.56/drivers/scsi/hosts.c 2003-01-10 21:11:20.000000000
+0100
+++ linux-2.5.56-work/drivers/scsi/hosts.c 2003-01-12
12:42:59.000000000 +0100

(quoted diff) +4 -0
@@ -345,7 +345,9 @@
        shost->hostt->present--;
 
        /* Cleanup proc */
+#ifdef CONFIG_PROC_FS
        scsi_proc_host_rm(shost);
+#endif
 
        kfree(shost);
 }
@@ -456,7 +458,9 @@
 found:
        spin_unlock(&scsi_host_list_lock);
 
+#ifdef CONFIG_PROC_FS
        scsi_proc_host_add(shost);
+#endif
 
        shost->eh_notify = &sem;
        kernel_thread((int (*)(void *)) scsi_error_handler, (void *)
Quoted 2 lines

shost, 0);

Paul -

This should really be:

drivers/scsi/scsi.h +2 -2
@@ -502,8 +502,8 @@
 static inline void scsi_exit_procfs(void) { ; }
 static inline void proc_print_scsidevice(Scsi_Device * sdev, char *buffer, int *size, int len) { ; }
 
-static inline void scsi_proc_host_add(struct Scsi_Host *);
-static inline void scsi_proc_host_rm(struct Scsi_Host *);
+static inline void scsi_proc_host_add(struct Scsi_Host *shost) { ; }
+static inline void scsi_proc_host_rm(struct Scsi_Host *shost) { ; }
 #endif /* CONFIG_PROC_FS */
 
 /*

-- Patrick Mansfield