summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au.ibm.com>2010-03-03 11:00:37 +1100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 13:21:31 -0700
commit0df4d8ef77f7e1251763d429f5ddbf5373961714 (patch)
tree5f99a500f7708f2675013c728e0e9998a7b941e4 /drivers/usb/storage
parentfa4dc36482a5236c92c589cdbc0a42ff5c945b6b (diff)
downloadlinux-0df4d8ef77f7e1251763d429f5ddbf5373961714.tar.gz
linux-0df4d8ef77f7e1251763d429f5ddbf5373961714.tar.bz2
linux-0df4d8ef77f7e1251763d429f5ddbf5373961714.zip
USB: Remove large struct from the stack in USB storage isd200 driver
The compiler throws the following warning when compiling for a PowerPC 64 bit machine: drivers/usb/storage/isd200.c:580: warning: the frame size of 2208 bytes is larger than 2048 bytes There is a struct scsi_device which is placed on the stack and is largely responsible for such wastage. The struct is just a dummy struct filled with NULLs and set as the scsi_cmnd->device to make the usb_stor_Bulk_transport function happy. This patch makes the struct static, so that it is never placed onto the stack and silences the compiler warning. Signed-off-by: Ian Munsie <imunsie@au.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/isd200.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
index fdba2f69d4c9..e9cbc1467f76 100644
--- a/drivers/usb/storage/isd200.c
+++ b/drivers/usb/storage/isd200.c
@@ -490,13 +490,13 @@ static int isd200_action( struct us_data *us, int action,
void* pointer, int value )
{
union ata_cdb ata;
- struct scsi_device srb_dev;
+ /* static to prevent this large struct being placed on the valuable stack */
+ static struct scsi_device srb_dev;
struct isd200_info *info = (struct isd200_info *)us->extra;
struct scsi_cmnd *srb = &info->srb;
int status;
memset(&ata, 0, sizeof(ata));
- memset(&srb_dev, 0, sizeof(srb_dev));
srb->cmnd = info->cmnd;
srb->device = &srb_dev;
++srb->serial_number;