Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Maciej W. Rozycki and committed by
David S. Miller
19717d05 1a5465f5

+8 -8
+8 -8
drivers/net/ethernet/amd/declance.c
··· 344 344 } 345 345 346 346 clen = len & 1; 347 - rtp = tp; 348 - rfp = fp; 347 + rtp = (unsigned char *)tp; 348 + rfp = (const unsigned char *)fp; 349 349 while (clen--) { 350 350 *rtp++ = *rfp++; 351 351 } ··· 372 372 * do the rest, if any. 373 373 */ 374 374 clen = len & 15; 375 - rtp = (unsigned char *) tp; 376 - rfp = (unsigned char *) fp; 375 + rtp = (unsigned char *)tp; 376 + rfp = (const unsigned char *)fp; 377 377 while (clen--) { 378 378 *rtp++ = *rfp++; 379 379 } ··· 403 403 404 404 clen = len & 1; 405 405 406 - rtp = tp; 407 - rfp = fp; 406 + rtp = (unsigned char *)tp; 407 + rfp = (const unsigned char *)fp; 408 408 409 409 while (clen--) { 410 410 *rtp++ = *rfp++; ··· 433 433 * do the rest, if any. 434 434 */ 435 435 clen = len & 15; 436 - rtp = (unsigned char *) tp; 437 - rfp = (unsigned char *) fp; 436 + rtp = (unsigned char *)tp; 437 + rfp = (const unsigned char *)fp; 438 438 while (clen--) { 439 439 *rtp++ = *rfp++; 440 440 }