[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.03.1309222113300.16797@linux-mips.org>
Date: Sun, 22 Sep 2013 21:19:01 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...ux-mips.org>
To: David Miller <davem@...emloft.net>
cc: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
netdev@...r.kernel.org
Subject: [PATCH v2] declance: Remove `incompatible pointer type' warnings
Revert damage caused by 43d620c82985b19008d87a437b4cf83f356264f7
[drivers/net: Remove casts of void *]:
.../declance.c: In function 'cp_to_buf':
.../declance.c:347: warning: assignment from incompatible pointer type
.../declance.c:348: warning: assignment from incompatible pointer type
.../declance.c: In function 'cp_from_buf':
.../declance.c:406: warning: assignment from incompatible pointer type
.../declance.c:407: warning: assignment from incompatible pointer type
Also add a `const' qualifier where applicable and adjust formatting.
Signed-off-by: Maciej W. Rozycki <macro@...ux-mips.org>
---
> Applied to net-next
Thanks, by Sergei's request please use this version instead that has the
reference to the original commit updated (no change to the patch itself).
Maciej
linux-declance-cast-fix.patch
Index: linux-mips-3.12.0-rc1-20130917-4maxp/drivers/net/ethernet/amd/declance.c
===================================================================
--- linux-mips-3.12.0-rc1-20130917-4maxp.orig/drivers/net/ethernet/amd/declance.c
+++ linux-mips-3.12.0-rc1-20130917-4maxp/drivers/net/ethernet/amd/declance.c
@@ -344,8 +344,8 @@ static void cp_to_buf(const int type, vo
}
clen = len & 1;
- rtp = tp;
- rfp = fp;
+ rtp = (unsigned char *)tp;
+ rfp = (const unsigned char *)fp;
while (clen--) {
*rtp++ = *rfp++;
}
@@ -372,8 +372,8 @@ static void cp_to_buf(const int type, vo
* do the rest, if any.
*/
clen = len & 15;
- rtp = (unsigned char *) tp;
- rfp = (unsigned char *) fp;
+ rtp = (unsigned char *)tp;
+ rfp = (const unsigned char *)fp;
while (clen--) {
*rtp++ = *rfp++;
}
@@ -403,8 +403,8 @@ static void cp_from_buf(const int type,
clen = len & 1;
- rtp = tp;
- rfp = fp;
+ rtp = (unsigned char *)tp;
+ rfp = (const unsigned char *)fp;
while (clen--) {
*rtp++ = *rfp++;
@@ -433,8 +433,8 @@ static void cp_from_buf(const int type,
* do the rest, if any.
*/
clen = len & 15;
- rtp = (unsigned char *) tp;
- rfp = (unsigned char *) fp;
+ rtp = (unsigned char *)tp;
+ rfp = (const unsigned char *)fp;
while (clen--) {
*rtp++ = *rfp++;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists