public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 06/39] GCC4.6: Squash subsequent warnings in usb_storage.c
Date: Sat, 22 Oct 2011 02:17:01 +0200	[thread overview]
Message-ID: <1319242654-15534-7-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1319242654-15534-1-git-send-email-marek.vasut@gmail.com>

usb_storage.c: In function ?us_one_transfer?:
usb_storage.c:377:7: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 2 has type ?long unsigned int? [-Wformat]
usb_storage.c:389:6: warning: format ?%d? expects argument of type ?int?, but
argument 2 has type ?long unsigned int? [-Wformat]
usb_storage.c:394:6: warning: format ?%d? expects argument of type ?int?, but
argument 2 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_BBB_reset?:
usb_storage.c:442:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c:448:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c:454:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_CB_reset?:
usb_storage.c:482:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_CB_comdat?:
usb_storage.c:572:3: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c:584:4: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_BBB_transport?:
usb_storage.c:782:3: warning: format ?%d? expects argument of type ?int?, but
argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c: In function ?usb_stor_CB_transport?:
usb_storage.c:807:2: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 3 has type ?long unsigned int? [-Wformat]
usb_storage.c:830:3: warning: format ?%X? expects argument of type ?unsigned
int?, but argument 2 has type ?long unsigned int? [-Wformat]
usb_storage.c:857:3: warning: format ?%d? expects argument of type ?int?, but
argument 2 has type ?long unsigned int? [-Wformat]

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Remy Bohmer <linux@bohmer.net>
---
 common/usb_storage.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

NOTE: Checkpatch issue here would need much deeper rework of the usb_storage.c,
      please bear with it.

Remy, can you take care of this please? ;-)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index eb9a30e..d665a87 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -373,7 +373,7 @@ static int us_one_transfer(struct us_data *us, int pipe, char *buf, int length)
 					usb_clear_halt(us->pusb_dev, pipe);
 					us->pusb_dev->status = stat;
 					if (this_xfer == partial) {
-						USB_STOR_PRINTF("bulk transferred with error %X, but data ok\n", us->pusb_dev->status);
+						USB_STOR_PRINTF("bulk transferred with error %lX, but data ok\n", us->pusb_dev->status);
 						return 0;
 					}
 					else
@@ -385,12 +385,12 @@ static int us_one_transfer(struct us_data *us, int pipe, char *buf, int length)
 				}
 				USB_STOR_PRINTF("bulk transferred with error");
 				if (this_xfer == partial) {
-					USB_STOR_PRINTF(" %d, but data ok\n",
+					USB_STOR_PRINTF(" %ld, but data ok\n",
 							us->pusb_dev->status);
 					return 0;
 				}
 				/* if our try counter reaches 0, bail out */
-					USB_STOR_PRINTF(" %d, data %d\n",
+					USB_STOR_PRINTF(" %ld, data %d\n",
 						us->pusb_dev->status, partial);
 				if (!maxtry--)
 						return result;
@@ -438,19 +438,19 @@ static int usb_stor_BBB_reset(struct us_data *us)
 
 	/* long wait for reset */
 	wait_ms(150);
-	USB_STOR_PRINTF("BBB_reset result %d: status %X reset\n", result,
+	USB_STOR_PRINTF("BBB_reset result %d: status %lX reset\n", result,
 			us->pusb_dev->status);
 	pipe = usb_rcvbulkpipe(us->pusb_dev, us->ep_in);
 	result = usb_clear_halt(us->pusb_dev, pipe);
 	/* long wait for reset */
 	wait_ms(150);
-	USB_STOR_PRINTF("BBB_reset result %d: status %X clearing IN endpoint\n",
+	USB_STOR_PRINTF("BBB_reset result %d: status %lX clearing IN endpoint\n",
 			result, us->pusb_dev->status);
 	/* long wait for reset */
 	pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
 	result = usb_clear_halt(us->pusb_dev, pipe);
 	wait_ms(150);
-	USB_STOR_PRINTF("BBB_reset result %d: status %X"
+	USB_STOR_PRINTF("BBB_reset result %d: status %lX"
 			" clearing OUT endpoint\n", result,
 			us->pusb_dev->status);
 	USB_STOR_PRINTF("BBB_reset done\n");
@@ -478,7 +478,7 @@ static int usb_stor_CB_reset(struct us_data *us)
 
 	/* long wait for reset */
 	wait_ms(1500);
-	USB_STOR_PRINTF("CB_reset result %d: status %X"
+	USB_STOR_PRINTF("CB_reset result %d: status %lX"
 			" clearing endpoint halt\n", result,
 			us->pusb_dev->status);
 	usb_clear_halt(us->pusb_dev, usb_rcvbulkpipe(us->pusb_dev, us->ep_in));
@@ -569,7 +569,7 @@ int usb_stor_CB_comdat(ccb *srb, struct us_data *us)
 					 srb->cmd, srb->cmdlen,
 					 USB_CNTL_TIMEOUT * 5);
 		USB_STOR_PRINTF("CB_transport: control msg returned %d,"
-				" status %X\n", result, us->pusb_dev->status);
+				" status %lX\n", result, us->pusb_dev->status);
 		/* check the return code for the command */
 		if (result < 0) {
 			if (us->pusb_dev->status & USB_ST_STALLED) {
@@ -581,7 +581,7 @@ int usb_stor_CB_comdat(ccb *srb, struct us_data *us)
 				us->pusb_dev->status = status;
 			}
 			USB_STOR_PRINTF(" error during command %02X"
-					" Stat = %X\n", srb->cmd[0],
+					" Stat = %lX\n", srb->cmd[0],
 					us->pusb_dev->status);
 			return result;
 		}
@@ -778,7 +778,7 @@ again:
 		usb_stor_BBB_reset(us);
 		return USB_STOR_TRANSPORT_FAILED;
 	} else if (data_actlen > srb->datalen) {
-		USB_STOR_PRINTF("transferred %dB instead of %dB\n",
+		USB_STOR_PRINTF("transferred %dB instead of %ldB\n",
 			data_actlen, srb->datalen);
 		return USB_STOR_TRANSPORT_FAILED;
 	} else if (csw.bCSWStatus == CSWSTATUS_FAILED) {
@@ -803,7 +803,7 @@ int usb_stor_CB_transport(ccb *srb, struct us_data *us)
 	/* issue the command */
 do_retry:
 	result = usb_stor_CB_comdat(srb, us);
-	USB_STOR_PRINTF("command / Data returned %d, status %X\n",
+	USB_STOR_PRINTF("command / Data returned %d, status %lX\n",
 			result, us->pusb_dev->status);
 	/* if this is an CBI Protocol, get IRQ */
 	if (us->protocol == US_PR_CBI) {
@@ -826,7 +826,7 @@ do_retry:
 	/* do we have to issue an auto request? */
 	/* HERE we have to check the result */
 	if ((result < 0) && !(us->pusb_dev->status & USB_ST_STALLED)) {
-		USB_STOR_PRINTF("ERROR %X\n", us->pusb_dev->status);
+		USB_STOR_PRINTF("ERROR %lX\n", us->pusb_dev->status);
 		us->transport_reset(us);
 		return USB_STOR_TRANSPORT_ERROR;
 	}
@@ -853,7 +853,7 @@ do_retry:
 		status = usb_stor_CBI_get_status(psrb, us);
 
 	if ((result < 0) && !(us->pusb_dev->status & USB_ST_STALLED)) {
-		USB_STOR_PRINTF(" AUTO REQUEST ERROR %d\n",
+		USB_STOR_PRINTF(" AUTO REQUEST ERROR %ld\n",
 				us->pusb_dev->status);
 		return USB_STOR_TRANSPORT_ERROR;
 	}
-- 
1.7.6.3

  parent reply	other threads:[~2011-10-22  0:17 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-22  0:16 [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Marek Vasut
2011-10-22  0:16 ` [U-Boot] [PATCH 01/39] DEBUG: Fix debug macros Marek Vasut
2011-10-23  5:37   ` Mike Frysinger
2011-10-23 17:12     ` Wolfgang Denk
2011-10-25 20:10       ` Joe Hershberger
2011-10-25 20:40         ` 馬克泡
2011-10-25 21:59           ` Wolfgang Denk
2011-10-25 22:08             ` Joe Hershberger
2011-10-24  4:31   ` Simon Glass
2011-10-24  8:21     ` Marek Vasut
2011-10-24 19:21       ` Wolfgang Denk
2011-10-25  0:11         ` Marek Vasut
2011-10-25  7:37           ` Wolfgang Denk
2011-10-25  8:27             ` Marek Vasut
2011-10-25  8:49               ` Graeme Russ
2011-10-25  9:03                 ` Marek Vasut
2011-10-25 18:34               ` Wolfgang Denk
2011-10-22  0:16 ` [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c Marek Vasut
2011-10-24 12:15   ` Stefano Babic
2011-10-24 12:22     ` Marek Vasut
2011-10-24 19:37       ` Wolfgang Denk
2011-10-25  0:09         ` Marek Vasut
2011-10-22  0:16 ` [U-Boot] [PATCH 03/39] GCC4.6: Squash warning in cmd_ide.c Marek Vasut
2011-10-22  0:16 ` [U-Boot] [PATCH 04/39] GCC4.6: Squash warning in cmd_date.c Marek Vasut
2011-10-30 19:59   ` Mike Frysinger
2011-10-22  0:17 ` [U-Boot] [PATCH 05/39] GCC4.6: Squash warning in usb_storage.c Marek Vasut
2011-10-23  5:39   ` Mike Frysinger
2011-10-22  0:17 ` Marek Vasut [this message]
2011-10-22  0:17 ` [U-Boot] [PATCH 07/39] PowerPC: Squash warning in mpc512x serial.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 08/39] GCC4.6: Squash warning in mpc5121ads.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 09/39] GCC4.6: Squash warning in cfb_console.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 10/39] GCC4.6: Squash warning in cfi_flash.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 11/39] GCC4.6: Squash warnings in denali_data_eye.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 12/39] GCC4.6: Squash warnings in denali_spd_ddr2.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 13/39] GCC4.6: Squash warnings in diu.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 14/39] GCC4.6: Squash warnings in mpc8610hpcd.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 15/39] GCC4.6: Squash warnings in tqm834x.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 16/39] GCC4.6: Squash warning in jedec_flash.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 17/39] GCC4.6: Squash warnings in 44x_spd_ddr.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 18/39] GCC4.6: Squash warnings in 4xx_enet.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 19/39] GCC4.6: Squash warnings in 4xx_ibm_ddr2_autocalib.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 20/39] GCC4.6: Squash warnings in 4xx_pcie.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 21/39] GCC4.6: Squash warnings in ahci.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 22/39] GCC4.6: Squash warning in cmd_pmc440.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 23/39] GCC4.6: Use dst instead of l2srbar in cpu_early_init.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 24/39] GCC4.6: Squash warnings in ddr[123]_dimm_params.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 25/39] GCC4.6: Squash warnings in fsl_espi.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 26/39] GCC4.6: Squash warnings in fsl_pci_init.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 27/39] GCC4.6: Squash warnings in pmc405de.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 28/39] GCC4.6: Squash warnings in sata_sil3114.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 29/39] GCC4.6: Squash warnings in tqm8xx_pcmcia.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 30/39] GCC4.6: Squash undefined variable in cmd_mtdparts.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 31/39] GCC4.6: Squash warnings in serial_xuartlite.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 32/39] GCC4.6: Squash warnings in mpc86xx/interrupts.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 33/39] GCC4.6: Squash warnings in r360mpi/flash.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 34/39] GCC4.6: Squash warnings in PPChameleonEVB/flash.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 35/39] GCC4.6: Squash error in pcmcia/i82365.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 36/39] GCC4.6: Squash error in cpc45/pd67290.c Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 37/39] RFT GCC4.6: Fix muas3001 and IDS8247 Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 38/39] GCC4.6: Squash GTREADREG related errors Marek Vasut
2011-10-22  0:17 ` [U-Boot] [PATCH 39/39] GCC4.6: Add macros to mv_gen_reg.h Marek Vasut
2011-10-22  0:35 ` [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro Albert ARIBAUD
2011-10-22  1:18   ` Marek Vasut
2011-10-22  9:48     ` Albert ARIBAUD
2011-10-22 14:19       ` Marek Vasut
2011-10-22 15:23         ` Albert ARIBAUD
2011-10-22 22:17           ` Marek Vasut
2011-10-24 10:10             ` Detlev Zundel
2011-10-24 10:16               ` Marek Vasut
2011-10-24 11:52                 ` Detlev Zundel
2011-10-24 12:33                   ` Marek Vasut
2011-10-23  5:33       ` Mike Frysinger
2011-10-25  9:04 ` Marek Vasut

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=1319242654-15534-7-git-send-email-marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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