devscsi: don't compile in unused data structures when not needed
authorAlan Cox <alan@linux.intel.com>
Sat, 21 Jul 2018 12:01:59 +0000 (13:01 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 21 Jul 2018 12:01:59 +0000 (13:01 +0100)
Kernel/dev/devscsi.c

index af4cda3..d3ffc60 100644 (file)
@@ -15,6 +15,8 @@
 #include <devscsi.h>
 #include <blkdev.h>
 
+#ifdef CONFIG_SCSI
+
 /* The live command block */
 struct Sidcmd si_dcb;
 uint8_t si_user;
@@ -23,15 +25,14 @@ uint8_t si_user;
 static struct Sierr error;
 static uint8_t status[2];
 
-#ifdef CONFIG_SCSI
 
 /*
- *     Si_cmdend()     Wait till end of scsi comand and return errors.
+ *     Si_cmdend()     Wait till end of scsi command and return errors.
  */
 static uint8_t si_cmdend(void) {
        int err;
 
-       status[0] = -1;
+       status[0] = 0xFF;
        si_dcb.length = 2;
        si_user = 0;
        /* Gets status and message byte */