mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Greg KH <greg@kroah.com>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
	usb-storage@lists.one-eyed-alien.net,
	Linux USB Mailing List <linux-usb@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Felipe Balbi <balbi@ti.com>
Subject: [PATCH 04/13] usb: storage: ene_ub6250: fix sparse warnings
Date: Tue, 15 Nov 2011 09:53:31 +0200	[thread overview]
Message-ID: <1321343620-10794-5-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1321343620-10794-1-git-send-email-balbi@ti.com>

Fix the following sparse warnings:

| drivers/usb/storage/ene_ub6250.c:45:22: warning: symbol
|	'ene_ub6250_usb_ids' was not declared. Should it
|	be static?
|
| drivers/usb/storage/ene_ub6250.c:780:5: warning: symbol
|	'ms_lib_alloc_logicalmap' was not declared. Should it
|	be static?
|
| drivers/usb/storage/ene_ub6250.c:2251:5: warning: symbol
|	'ms_scsi_irp' was not declared. Should it be static?
|
| drivers/usb/storage/ene_ub6250.c:638:29: warning: right shift by bigger
|	than source value
|
| drivers/usb/storage/ene_ub6250.c:639:29: warning: right shift by bigger
|	than source value

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/storage/ene_ub6250.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c
index 9fbe742..b990726 100644
--- a/drivers/usb/storage/ene_ub6250.c
+++ b/drivers/usb/storage/ene_ub6250.c
@@ -42,7 +42,7 @@ MODULE_LICENSE("GPL");
 { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
 	.driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
 
-struct usb_device_id ene_ub6250_usb_ids[] = {
+static struct usb_device_id ene_ub6250_usb_ids[] = {
 #	include "unusual_ene_ub6250.h"
 	{ }		/* Terminating entry */
 };
@@ -607,8 +607,8 @@ static int sd_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb)
 
 static int sd_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb)
 {
-	u32   bl_num;
-	u16    bl_len;
+	u32	bl_num;
+	u32	bl_len;
 	unsigned int offset = 0;
 	unsigned char    buf[8];
 	struct scatterlist *sg = NULL;
@@ -622,7 +622,7 @@ static int sd_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb)
 		else
 			bl_num = (info->HC_C_SIZE + 1) * 1024 - 1;
 	} else {
-		bl_len = 1<<(info->SD_READ_BL_LEN);
+		bl_len = 1 << (info->SD_READ_BL_LEN);
 		bl_num = info->SD_Block_Mult * (info->SD_C_SIZE + 1)
 				* (1 << (info->SD_C_SIZE_MULT + 2)) - 1;
 	}
@@ -777,7 +777,7 @@ static int ms_lib_free_logicalmap(struct us_data *us)
 	return 0;
 }
 
-int ms_lib_alloc_logicalmap(struct us_data *us)
+static int ms_lib_alloc_logicalmap(struct us_data *us)
 {
 	u32  i;
 	struct ene_ub6250_info *info = (struct ene_ub6250_info *) us->extra;
@@ -2248,7 +2248,7 @@ static int sd_scsi_irp(struct us_data *us, struct scsi_cmnd *srb)
 /*
  * ms_scsi_irp()
  */
-int ms_scsi_irp(struct us_data *us, struct scsi_cmnd *srb)
+static int ms_scsi_irp(struct us_data *us, struct scsi_cmnd *srb)
 {
 	int result;
 	struct ene_ub6250_info *info = (struct ene_ub6250_info *)us->extra;
-- 
1.7.8.rc0


  parent reply	other threads:[~2011-11-15  7:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  7:53 [PATCH 00/13] Sparse fixes Felipe Balbi
2011-11-15  7:53 ` [PATCH 01/13] usb: storage: alauda: fix sparse warnings Felipe Balbi
2011-11-15  7:53 ` [PATCH 02/13] usb: storage: cypress: fix sparse warning Felipe Balbi
2011-11-15  7:53 ` [PATCH 03/13] usb: storage: datafab: " Felipe Balbi
2011-11-15  7:53 ` Felipe Balbi [this message]
2011-11-15  7:53 ` [PATCH 05/13] usb: storage: freecom: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 06/13] usb: storage: isd200: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 07/13] usb: storage: jumpshot: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 08/13] usb: storage: karma: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 09/13] usb: storage: onetouch: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 10/13] usb: storagE: realtek_cr: fix sparse warnings Felipe Balbi
2011-11-15  7:53 ` [PATCH 11/13] usb: storage: sddr09: fix sparse warning Felipe Balbi
2011-11-15  7:53 ` [PATCH 12/13] usb: storage: sddr55: " Felipe Balbi
2011-11-15  7:53 ` [PATCH 13/13] usb: storage: shuttle_usbat: " Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1321343620-10794-5-git-send-email-balbi@ti.com \
    --to=balbi@ti.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®