Skip to content

Commit 19717d0

Browse files
Maciej W. Rozyckidavem330
authored andcommitted
declance: Remove `incompatible pointer type' warnings
Revert damage caused by 43d620c: .../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>
1 parent 1a5465f commit 19717d0

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎drivers/net/ethernet/amd/declance.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
344344
}
345345

346346
clen = len & 1;
347-
rtp = tp;
348-
rfp = fp;
347+
rtp = (unsigned char *)tp;
348+
rfp = (const unsigned char *)fp;
349349
while (clen--) {
350350
*rtp++ = *rfp++;
351351
}
@@ -372,8 +372,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
372372
* do the rest, if any.
373373
*/
374374
clen = len & 15;
375-
rtp = (unsigned char *) tp;
376-
rfp = (unsigned char *) fp;
375+
rtp = (unsigned char *)tp;
376+
rfp = (const unsigned char *)fp;
377377
while (clen--) {
378378
*rtp++ = *rfp++;
379379
}
@@ -403,8 +403,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
403403

404404
clen = len & 1;
405405

406-
rtp = tp;
407-
rfp = fp;
406+
rtp = (unsigned char *)tp;
407+
rfp = (const unsigned char *)fp;
408408

409409
while (clen--) {
410410
*rtp++ = *rfp++;
@@ -433,8 +433,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
433433
* do the rest, if any.
434434
*/
435435
clen = len & 15;
436-
rtp = (unsigned char *) tp;
437-
rfp = (unsigned char *) fp;
436+
rtp = (unsigned char *)tp;
437+
rfp = (const unsigned char *)fp;
438438
while (clen--) {
439439
*rtp++ = *rfp++;
440440
}

0 commit comments

Comments
 (0)