mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Remove dead code in 53c7xx driver
@ 2003-05-26  5:07 Ben Collins
  0 siblings, 0 replies; only message in thread
From: Ben Collins @ 2003-05-26  5:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

While doing my strncpy duty, I came across some dead code in
53c7xx.c. Removed.


Index: linux-2.5/drivers/scsi/53c7xx.c
===================================================================
--- linux-2.5/drivers/scsi/53c7xx.c	(revision 10182)
+++ linux-2.5/drivers/scsi/53c7xx.c	(working copy)
@@ -360,41 +360,8 @@
 	{"","","","","","","",""};
 
 #define MAX_SETUP_STRINGS (sizeof(setup_strings) / sizeof(char *))
-#define SETUP_BUFFER_SIZE 200
-static char setup_buffer[SETUP_BUFFER_SIZE];
 static char setup_used[MAX_SETUP_STRINGS];
 
-void ncr53c7xx_setup (char *str, int *ints)
-{
-   int i;
-   char *p1, *p2;
-
-   p1 = setup_buffer;
-   *p1 = '\0';
-   if (str)
-      strncpy(p1, str, SETUP_BUFFER_SIZE - strlen(setup_buffer));
-   setup_buffer[SETUP_BUFFER_SIZE - 1] = '\0';
-   p1 = setup_buffer;
-   i = 0;
-   while (*p1 && (i < MAX_SETUP_STRINGS)) {
-      p2 = strchr(p1, ',');
-      if (p2) {
-         *p2 = '\0';
-         if (p1 != p2)
-            setup_strings[i] = p1;
-         p1 = p2 + 1;
-         i++;
-         }
-      else {
-         setup_strings[i] = p1;
-         break;
-         }
-      }
-   for (i=0; i<MAX_SETUP_STRINGS; i++)
-      setup_used[i] = 0;
-}
-
-
 /* check_setup_strings() returns index if key found, 0 if not
  */
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-26  5:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-26  5:07 [PATCH] Remove dead code in 53c7xx driver Ben Collins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®