Patchwork [U-Boot,03/14] drivers/block/sata_dwc.c: Fix GCC 4.6 build warning

login
register
mail settings
Submitter Wolfgang Denk
Date Nov. 30, 2011, 8:17 a.m.
Message ID <1322641077-829-4-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/128448/
State Accepted
Commit 24ec52dec298ffb5298cd57ddd3567fe00347988
Headers show

Comments

Wolfgang Denk - Nov. 30, 2011, 8:17 a.m.
Fix:
sata_dwc.c: In function 'scan_sata':
sata_dwc.c:535:38: warning: variable 'udma_mask' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kazuaki Ichinohe <kazuichi@fsi.co.jp>
---
total: 0 errors, 0 warnings, 18 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE

 drivers/block/sata_dwc.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
Wolfgang Denk - Dec. 1, 2011, 11:10 p.m.
Dear Wolfgang Denk,

In message <1322641077-829-4-git-send-email-wd@denx.de> you wrote:
> Fix:
> sata_dwc.c: In function 'scan_sata':
> sata_dwc.c:535:38: warning: variable 'udma_mask' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Kazuaki Ichinohe <kazuichi@fsi.co.jp>
> ---
> total: 0 errors, 0 warnings, 18 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
> 
>  drivers/block/sata_dwc.c |    6 +-----
>  1 files changed, 1 insertions(+), 5 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/block/sata_dwc.c b/drivers/block/sata_dwc.c
index 69ec5fd..75101b5 100644
--- a/drivers/block/sata_dwc.c
+++ b/drivers/block/sata_dwc.c
@@ -532,7 +532,7 @@  int scan_sata(int dev)
 	u8 status;
 	const u16 *id;
 	struct ata_device *ata_dev = &ata_device;
-	unsigned long pio_mask, mwdma_mask, udma_mask;
+	unsigned long pio_mask, mwdma_mask;
 	char revbuf[7];
 	u16 iobuf[ATA_SECTOR_WORDS];
 
@@ -622,10 +622,6 @@  int scan_sata(int dev)
 			mwdma_mask |= (1 << 4);
 	}
 
-	udma_mask = 0;
-	if (id[ATA_ID_FIELD_VALID] & (1 << 2))
-		udma_mask = id[ATA_ID_UDMA_MODES] & 0xff;
-
 	if (ata_dev->class == ATA_DEV_ATA) {
 		if (ata_id_is_cfa(id)) {
 			if (id[162] & 1)