netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jeff Garzik <jgarzik@pobox.com>,
	netdev@vger.kernel.org
Subject: [patch 31/33] m68k: kill skb_copy_from_linear_data compiler warnings
Date: Tue, 01 May 2007 22:33:05 +0200	[thread overview]
Message-ID: <20070501203338.331311229@mail.of.borg> (raw)
In-Reply-To: 20070501203234.252205858@mail.of.borg

[-- Attachment #1: m68k-skb_copy_from_linear_data-warnings.diff --]
[-- Type: text/plain, Size: 2651 bytes --]

The recent conversion from `memcpy' to `skb_copy_from_linear_data' removed a
few casts, which were needed to silence compiler warnings. Re-add them.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/net/7990.c       |    6 +++---
 drivers/net/a2065.c      |    4 ++--
 drivers/net/sun3_82586.c |    5 +++--
 3 files changed, 8 insertions(+), 7 deletions(-)

--- linux-m68k-2.6.21.orig/drivers/net/7990.c
+++ linux-m68k-2.6.21/drivers/net/7990.c
@@ -565,9 +565,9 @@ int lance_start_xmit (struct sk_buff *sk
         ib->btx_ring [entry].length = (-len) | 0xf000;
         ib->btx_ring [entry].misc = 0;
 
-    	if (skb->len < ETH_ZLEN)
-    		memset((char *)&ib->tx_buf[entry][0], 0, ETH_ZLEN);
-        skb_copy_from_linear_data(skb, &ib->tx_buf[entry][0], skblen);
+	if (skb->len < ETH_ZLEN)
+		memset((void *)&ib->tx_buf[entry][0], 0, ETH_ZLEN);
+        skb_copy_from_linear_data(skb, (void *)&ib->tx_buf[entry][0], skblen);
 
         /* Now, give the packet to the lance */
         ib->btx_ring [entry].tmd1_bits = (LE_T1_POK|LE_T1_OWN);
--- linux-m68k-2.6.21.orig/drivers/net/a2065.c
+++ linux-m68k-2.6.21/drivers/net/a2065.c
@@ -597,11 +597,11 @@ static int lance_start_xmit (struct sk_b
 	ib->btx_ring [entry].length = (-len) | 0xf000;
 	ib->btx_ring [entry].misc = 0;
 
-	skb_copy_from_linear_data(skb, &ib->tx_buf [entry][0], skblen);
+	skb_copy_from_linear_data(skb, (void *)&ib->tx_buf [entry][0], skblen);
 
 	/* Clear the slack of the packet, do I need this? */
 	if (len != skblen)
-		memset ((char *) &ib->tx_buf [entry][skblen], 0, len - skblen);
+		memset ((void *) &ib->tx_buf [entry][skblen], 0, len - skblen);
 
 	/* Now, give the packet to the lance */
 	ib->btx_ring [entry].tmd1_bits = (LE_T1_POK|LE_T1_OWN);
--- linux-m68k-2.6.21.orig/drivers/net/sun3_82586.c
+++ linux-m68k-2.6.21/drivers/net/sun3_82586.c
@@ -1023,10 +1023,11 @@ static int sun3_82586_send_packet(struct
 	{
 		len = skb->len;
 		if (len < ETH_ZLEN) {
-			memset((char *)p->xmit_cbuffs[p->xmit_count], 0, ETH_ZLEN);
+			memset((void *)p->xmit_cbuffs[p->xmit_count], 0,
+			       ETH_ZLEN);
 			len = ETH_ZLEN;
 		}
-		skb_copy_from_linear_data(skb, p->xmit_cbuffs[p->xmit_count], skb->len);
+		skb_copy_from_linear_data(skb, (void *)p->xmit_cbuffs[p->xmit_count], skb->len);
 
 #if (NUM_XMIT_BUFFS == 1)
 #	ifdef NO_NOPCOMMANDS

--
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

      parent reply	other threads:[~2007-05-01 20:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070501203234.252205858@mail.of.borg>
2007-05-01 20:32 ` [patch 07/33] m68k: Mac89x0 Ethernet netif updates Geert Uytterhoeven
2007-05-01 20:57   ` Jeff Garzik
2007-05-01 20:32 ` [patch 16/33] m68k: Amiga A2065 and Ariadne TX statistics Geert Uytterhoeven
2007-05-01 20:32 ` [patch 20/33] m68k: Mac DP8390 update Geert Uytterhoeven
2007-05-01 20:33 ` [patch 27/33] m68k: macmace fixes Geert Uytterhoeven
2007-05-01 20:33 ` Geert Uytterhoeven [this message]

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=20070501203338.331311229@mail.of.borg \
    --to=geert@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).