This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH] usb-storage: don't call utsname()
- From: Alan Stern <stern at rowland dot harvard dot edu>
- To: Greg KH <greg at kroah dot com>, Matthew Dharm <mdharm-usb at one-eyed-alien dot net>
- Cc: Christoph Hellwig <hch at infradead dot org>, "Frank Ch. Eigler" <fche at redhat dot com>, Adrian Bunk <bunk at kernel dot org>, USB Storage list <usb-storage at lists dot one-eyed-alien dot net>, Kernel development list <linux-kernel at vger dot kernel dot org>, "David S. Miller" <davem at sunset dot davemloft dot net>, <systemtap at sources dot redhat dot com>, Andrew Morton <akpm at linux-foundation dot org>, <linux-cifs-client at lists dot samba dot org>, <linux-nfs at vger dot kernel dot org>
- Date: Wed, 21 May 2008 13:51:17 -0400 (EDT)
- Subject: [PATCH] usb-storage: don't call utsname()
This patch (as1100) replaces the core-kernel function call to utsname()
in usb-storage with the UTS_RELEASE macro. It's used only for warning
about extra unusual_devs entries.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
---
Index: usb-2.6/drivers/usb/storage/usb.c
===================================================================
--- usb-2.6.orig/drivers/usb/storage/usb.c
+++ usb-2.6/drivers/usb/storage/usb.c
@@ -53,7 +53,7 @@
#include <linux/slab.h>
#include <linux/kthread.h>
#include <linux/mutex.h>
-#include <linux/utsname.h>
+#include <linux/utsrelease.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
@@ -531,8 +531,8 @@ static int get_device_info(struct us_dat
if (msg >= 0 && !(us->fflags & US_FL_NEED_OVERRIDE))
printk(KERN_NOTICE USB_STORAGE "This device "
"(%04x,%04x,%04x S %02x P %02x)"
- " has %s in unusual_devs.h (kernel"
- " %s)\n"
+ " has %s in unusual_devs.h (kernel "
+ UTS_RELEASE ")\n"
" Please send a copy of this message to "
"<linux-usb@vger.kernel.org> and "
"<usb-storage@lists.one-eyed-alien.net>\n",
@@ -541,8 +541,7 @@ static int get_device_info(struct us_dat
le16_to_cpu(ddesc->bcdDevice),
idesc->bInterfaceSubClass,
idesc->bInterfaceProtocol,
- msgs[msg],
- utsname()->release);
+ msgs[msg]);
}
return 0;