- scsi_scan-warning-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     scsi_scan-warning-fix

has been removed from the -mm tree.  Its filename is

     scsi_scan-warning-fix.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.


From: Andrew Morton <akpm@xxxxxxxx>

drivers/scsi/scsi_scan.c: In function `scsi_probe_and_add_lun':
drivers/scsi/scsi_scan.c:926: warning: unused variable `vend'
drivers/scsi/scsi_scan.c:926: warning: unused variable `mod'
drivers/scsi/scsi_scan.c: At top level:
drivers/scsi/scsi_scan.c:829: warning: `scsi_inq_str' defined but not used

Fix those, tighten up the (somewhat poorly-designed) logging macro and fix
some coding-style warts.

Cc: Kurt Garloff <garloff@xxxxxxx>
Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/scsi/scsi_logging.h |    8 +++++---
 drivers/scsi/scsi_scan.c    |   19 +++++++++++++------
 2 files changed, 18 insertions(+), 9 deletions(-)

diff -puN drivers/scsi/scsi_scan.c~scsi_scan-warning-fix drivers/scsi/scsi_scan.c
--- devel/drivers/scsi/scsi_scan.c~scsi_scan-warning-fix	2006-04-15 00:26:13.000000000 -0700
+++ devel-akpm/drivers/scsi/scsi_scan.c	2006-04-15 00:26:13.000000000 -0700
@@ -816,6 +816,7 @@ static inline void scsi_destroy_sdev(str
 	put_device(&sdev->sdev_gendev);
 }
 
+#ifdef CONFIG_SCSI_LOGGING
 /** 
  * scsi_inq_str - print INQUIRY data from min to max index,
  * strip trailing whitespace
@@ -824,12 +825,13 @@ static inline void scsi_destroy_sdev(str
  * @first: Offset of string into inq
  * @end:   Index after last character in inq
  */
-static unsigned char* scsi_inq_str(unsigned char* buf, unsigned char *inq,
+static unsigned char *scsi_inq_str(unsigned char *buf, unsigned char *inq,
 				   unsigned first, unsigned end)
 {
 	unsigned term = 0, idx;
-	for (idx = 0; idx+first < end && idx+first < inq[4]+5; ++idx) {
-		if (inq[idx+first] > 0x20) {
+
+	for (idx = 0; idx + first < end && idx + first < inq[4] + 5; idx++) {
+		if (inq[idx+first] > ' ') {
 			buf[idx] = inq[idx+first];
 			term = idx+1;
 		} else {
@@ -839,6 +841,7 @@ static unsigned char* scsi_inq_str(unsig
 	buf[term] = 0;
 	return buf;
 }
+#endif
 
 /**
  * scsi_probe_and_add_lun - probe a LUN, if a LUN is found add it
@@ -923,12 +926,16 @@ static int scsi_probe_and_add_lun(struct
 				   " peripheral qualifier of 3, device not"
 				   " added\n"))
 		if (lun == 0) {
-			unsigned char vend[9], mod[17];
-			SCSI_LOG_SCAN_BUS(1, sdev_printk(KERN_INFO, sdev,
+			SCSI_LOG_SCAN_BUS(1, {
+				unsigned char vend[9];
+				unsigned char mod[17];
+
+				sdev_printk(KERN_INFO, sdev,
 					"scsi scan: consider passing scsi_mod."
 					"dev_flags=%s:%s:0x240 or 0x800240\n",
 					scsi_inq_str(vend, result, 8, 16),
-					scsi_inq_str(mod, result, 16, 32)));
+					scsi_inq_str(mod, result, 16, 32));
+			});
 		}
 		
 		res = SCSI_SCAN_TARGET_PRESENT;
diff -puN drivers/scsi/scsi_logging.h~scsi_scan-warning-fix drivers/scsi/scsi_logging.h
--- devel/drivers/scsi/scsi_logging.h~scsi_scan-warning-fix	2006-04-15 00:26:13.000000000 -0700
+++ devel-akpm/drivers/scsi/scsi_logging.h	2006-04-15 00:29:00.000000000 -0700
@@ -45,10 +45,12 @@ extern unsigned int scsi_logging_level;
         ((scsi_logging_level >> (SHIFT)) & ((1 << (BITS)) - 1))
 
 #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD)		\
-{								\
+do {								\
         if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL)))	\
-		(CMD);						\
-}
+		do {						\
+			CMD;					\
+		} while (0);					\
+} while (0)
 #else
 #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD)
 #endif /* CONFIG_SCSI_LOGGING */
_

Patches currently in -mm which might be from akpm@xxxxxxxx are

origin.patch
config_net=n-build-fix.patch
git-acpi.patch
acpi-update-asus_acpi-driver-registration-fix.patch
acpi-memory-hotplug-cannot-manage-_crs-with-plural-resoureces.patch
catch-notification-of-memory-add-event-of-acpi-via-container-driver-register-start-func-for-memory-device.patch
catch-notification-of-memory-add-event-of-acpi-via-container-driveravoid-redundant-call-add_memory.patch
sony_apci-resume.patch
sound-fix-hang-in-mpu401_uartc-tidy.patch
git-audit-master-fixup.patch
powernow-k8-crash-workaround.patch
git-drm.patch
git-dvb.patch
git-dvb-compat-build-fix.patch
bt866-build-fix.patch
connector-exports.patch
i2c-add-support-for-virtual-i2c-adapters-tidy.patch
git-libata-all.patch
mtd-improve-parameter-parsing-for-block2mtd-fix.patch
pci-error-recovery-e1000-network-device-driver.patch
improve-pci-config-space-writeback-tidy.patch
git-pcmcia.patch
revert-pci-pci-cardbus-cards-hidden-needs-pci=assign-busses-to-fix.patch
git-scsi-misc.patch
megaraid-unused-variable.patch
git-splice-fixup.patch
git-watchdog.patch
arm-add_memory-build-fix.patch
pg_uncached-is-ia64-only.patch
migration-remove-unnecessary-pageswapcache-checks-fix.patch
wait_table-and-zonelist-initializing-for-memory-hotadd-wait_table-initialization-fixes.patch
preserve-write-permissions-in-migration-entries-fix.patch
oom-kill-mm-locking-fix.patch
page_allocc-buddy-handling-cleanup.patch
slab-cleanup-kmem_getpages-fix.patch
slab-stop-using-list_for_each-fix.patch
acx1xx-wireless-driver.patch
prune_one_dentry-tweaks.patch
fix-cdrom-being-confused-on-using-kdump-tweaks.patch
mmput-might-sleep.patch
tpm-use-clear_bit-fix.patch
tpm-use-clear_bit-fix-fix.patch
tpm-use-clear_bit-fix-fix-fix-fix.patch
hangcheck-remove-monotomic_clock-on-x86.patch
pi-futex-futex-code-cleanups-fix.patch
reiser4.patch
kgdb-core-lite-add-reboot-command.patch
kgdb-8250-fix.patch
nr_blockdev_pages-in_interrupt-warning.patch
device-suspend-debug.patch
revert-tty-buffering-comment-out-debug-code.patch
slab-leaks3-default-y.patch
x86-kmap_atomic-debugging.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux