Patchwork [07/43] drivers/net/ni65.c: fix sparse warnings: fix signedness

login
register
mail settings
Submitter Hannes Eder
Date Feb. 14, 2009, 9:13 p.m.
Message ID <20090214211332.23489.25144.stgit@vmbox.hanneseder.net>
Download mbox | patch
Permalink /patch/23153/
State Accepted
Delegated to: David Miller
Headers show

Comments

Hannes Eder - Feb. 14, 2009, 9:13 p.m.
Fix this sparse warnings:
  drivers/net/ni65.c:488:36: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---
 drivers/net/ni65.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Feb. 18, 2009, 1:21 a.m.
From: Hannes Eder <hannes@hanneseder.net>
Date: Sat, 14 Feb 2009 22:13:39 +0100

> Fix this sparse warnings:
>   drivers/net/ni65.c:488:36: warning: incorrect type in argument 2 (different signedness)
> 
> Signed-off-by: Hannes Eder <hannes@hanneseder.net>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c
index d769a88..df5f869 100644
--- a/drivers/net/ni65.c
+++ b/drivers/net/ni65.c
@@ -481,8 +481,9 @@  static int __init ni65_probe1(struct net_device *dev,int ioaddr)
 	else {
 		if(dev->dma == 0) {
 		/* 'stuck test' from lance.c */
-			long dma_channels = ((inb(DMA1_STAT_REG) >> 4) & 0x0f) |
-					    (inb(DMA2_STAT_REG) & 0xf0);
+			unsigned long dma_channels =
+				((inb(DMA1_STAT_REG) >> 4) & 0x0f)
+				| (inb(DMA2_STAT_REG) & 0xf0);
 			for(i=1;i<5;i++) {
 				int dma = dmatab[i];
 				if(test_bit(dma,&dma_channels) || request_dma(dma,"ni6510"))