declance: Remove `incompatible pointer type' warnings
Subsystems (3)
PATCH 1/1 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.
---
linux-declance-cast-fix.patch
drivers/net/ethernet/amd/declance.c +8 -8
@@ -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++; }
From: "Maciej W. Rozycki" <[email protected]>
Date: Fri, 20 Sep 2013 00:49:44 +0100 (BST)
Quoted 9 lines
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
Quoted 3 lines
Also add a `const' qualifier where applicable and adjust formatting.
Signed-off-by Maciej W. Rozycki <[email protected]>
Applied to net-next
Hello.
Quoted 1 line · Maciej W. Rozycki
Revert damage caused by
43d620c82985b19008d87a437b4cf83f356264f7:
Please also specify that commit's summary in parens. That's the only way
to uniquely identify a commit and makes life a bit easier when you browse the commits.
Quoted 10 lines
.../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 typeAlso add a `const' qualifier where applicable and adjust formatting.
Signed-off-by Maciej W. Rozycki <[email protected]>
WBR, Sergei
PATCH v2 1/1 declance: Remove `incompatible pointer type' warnings
In reply to David MillerRevert 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.
---
Quoted 1 line
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
drivers/net/ethernet/amd/declance.c +8 -8
@@ -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++; }
David Miller
maintainerFrom: "Maciej W. Rozycki" <[email protected]>
Date: Sun, 22 Sep 2013 21:19:01 +0100 (BST)
Quoted 10 lines
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
Quoted 8 lines
Also add a `const' qualifier where applicable and adjust formatting.
Signed-off-by Maciej W. Rozycki <[email protected]>---
Quoted 1 line
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).
I can't undo the original commit once it has been installed in my tree.
Quoted 4 lines · David Miller
Quoted 2 lines
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).I can't undo the original commit once it has been installed in my tree.
No worries, and good to know, thanks.
Maciej