LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Fix compile warnings in r8169
@ 2007-01-17 14:19 Bernhard Walle
  2007-01-17 18:33 ` Francois Romieu
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Walle @ 2007-01-17 14:19 UTC (permalink / raw)
  To: linux-kernel

Fix compile warnings in r8169. It doesn't fix "real" bugs, only that
the driver compiles cleanly without warnings.

Signed-off-by: Bernhard Walle <bwalle@suse.de>

---

 r8169.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.20-rc4.orig/drivers/net/r8169.c	2007-01-07 06:45:51.000000000 +0100
+++ linux-2.6.20-rc4/drivers/net/r8169.c	2007-01-17 11:39:13.792309228 +0100
@@ -2016,7 +2016,7 @@ static int rtl8169_alloc_rx_skb(struct p
 	if (!skb)
 		goto err_out;
 
-	skb_reserve(skb, (align - 1) & (u32)skb->data);
+	skb_reserve(skb, (align - 1) & (long)skb->data);
 	*sk_buff = skb;
 
 	mapping = pci_map_single(pdev, skb->data, rx_buf_sz,
@@ -2227,7 +2227,7 @@ static int rtl8169_xmit_frags(struct rtl
 {
 	struct skb_shared_info *info = skb_shinfo(skb);
 	unsigned int cur_frag, entry;
-	struct TxDesc *txd;
+	struct TxDesc *txd = NULL;
 
 	entry = tp->cur_tx;
 	for (cur_frag = 0; cur_frag < info->nr_frags; cur_frag++) {
@@ -2487,7 +2487,7 @@ static inline int rtl8169_try_rx_copy(st
 
 		skb = dev_alloc_skb(pkt_size + align);
 		if (skb) {
-			skb_reserve(skb, (align - 1) & (u32)skb->data);
+			skb_reserve(skb, (align - 1) & (long)skb->data);
 			eth_copy_and_sum(skb, sk_buff[0]->data, pkt_size, 0);
 			*sk_buff = skb;
 			rtl8169_mark_to_asic(desc, rx_buf_sz);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix compile warnings in r8169
  2007-01-17 14:19 [PATCH] Fix compile warnings in r8169 Bernhard Walle
@ 2007-01-17 18:33 ` Francois Romieu
  0 siblings, 0 replies; 2+ messages in thread
From: Francois Romieu @ 2007-01-17 18:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Bernhard Walle

Bernhard Walle <bwalle@suse.de> :
> --- linux-2.6.20-rc4.orig/drivers/net/r8169.c	2007-01-07 06:45:51.000000000 +0100
> +++ linux-2.6.20-rc4/drivers/net/r8169.c	2007-01-17 11:39:13.792309228 +0100
[...]
> @@ -2227,7 +2227,7 @@ static int rtl8169_xmit_frags(struct rtl
>  {
>  	struct skb_shared_info *info = skb_shinfo(skb);
>  	unsigned int cur_frag, entry;
> -	struct TxDesc *txd;
> +	struct TxDesc *txd = NULL;
>  
>  	entry = tp->cur_tx;
>  	for (cur_frag = 0; cur_frag < info->nr_frags; cur_frag++) {

The driver is right. This change does not alleviate the maintenance
of the driver nor does it add incentive to fix the compiler.

-- 
Ueimor

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-17 18:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-17 14:19 [PATCH] Fix compile warnings in r8169 Bernhard Walle
2007-01-17 18:33 ` Francois Romieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).