浏览代码

aic79xx: fix misuse of static variables

The format strings for various printk()s make use of a temporary
variable that is declared 'static'. This is probably not intended,
so fix those.

Found in the PaX patch, written by the PaX Team.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: PaX Team <pageexec@freemail.hu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Mathias Krause 11 年之前
父节点
当前提交
b413cf4906
共有 1 个文件被更改,包括 5 次插入13 次删除
  1. 5 13
      drivers/scsi/aic7xxx/aic79xx_pci.c

+ 5 - 13
drivers/scsi/aic7xxx/aic79xx_pci.c

@@ -827,7 +827,7 @@ ahd_pci_intr(struct ahd_softc *ahd)
 		for (bit = 0; bit < 8; bit++) {
 		for (bit = 0; bit < 8; bit++) {
 
 
 			if ((pci_status[i] & (0x1 << bit)) != 0) {
 			if ((pci_status[i] & (0x1 << bit)) != 0) {
-				static const char *s;
+				const char *s;
 
 
 				s = pci_status_strings[bit];
 				s = pci_status_strings[bit];
 				if (i == 7/*TARG*/ && bit == 3)
 				if (i == 7/*TARG*/ && bit == 3)
@@ -887,23 +887,15 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat)
 
 
 		for (bit = 0; bit < 8; bit++) {
 		for (bit = 0; bit < 8; bit++) {
 
 
-			if ((split_status[i] & (0x1 << bit)) != 0) {
-				static const char *s;
-
-				s = split_status_strings[bit];
-				printk(s, ahd_name(ahd),
+			if ((split_status[i] & (0x1 << bit)) != 0)
+				printk(split_status_strings[bit], ahd_name(ahd),
 				       split_status_source[i]);
 				       split_status_source[i]);
-			}
 
 
 			if (i > 1)
 			if (i > 1)
 				continue;
 				continue;
 
 
-			if ((sg_split_status[i] & (0x1 << bit)) != 0) {
-				static const char *s;
-
-				s = split_status_strings[bit];
-				printk(s, ahd_name(ahd), "SG");
-			}
+			if ((sg_split_status[i] & (0x1 << bit)) != 0)
+				printk(split_status_strings[bit], ahd_name(ahd), "SG");
 		}
 		}
 	}
 	}
 	/*
 	/*