From: Maciej W. Rozycki Date: Thu, 19 Sep 2013 23:49:44 +0000 (+0100) Subject: declance: Remove `incompatible pointer type' warnings X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=19717d05848849a3b1dddeced9abb5884cff9152;p=deliverable%2Flinux.git declance: Remove `incompatible pointer type' warnings Revert damage caused by 43d620c82985b19008d87a437b4cf83f356264f7: .../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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/amd/declance.c b/drivers/net/ethernet/amd/declance.c index 94edc9c6fbbf..cc35f6f4e703 100644 --- a/drivers/net/ethernet/amd/declance.c +++ b/drivers/net/ethernet/amd/declance.c @@ -344,8 +344,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len) } 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, void *to, const void *from, int len) * 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, void *to, const void *from, int len) 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, void *to, const void *from, int len) * 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++; }