netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] declance: Remove `incompatible pointer type' warnings
@ 2013-09-19 23:49 Maciej W. Rozycki
  2013-09-20 18:43 ` David Miller
  2013-09-21 22:41 ` [PATCH] " Sergei Shtylyov
  0 siblings, 2 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2013-09-19 23:49 UTC (permalink / raw)
  To: netdev

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>
---
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++;
 		}

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] declance: Remove `incompatible pointer type' warnings
  2013-09-19 23:49 [PATCH] declance: Remove `incompatible pointer type' warnings Maciej W. Rozycki
@ 2013-09-20 18:43 ` David Miller
  2013-09-22 20:19   ` [PATCH v2] " Maciej W. Rozycki
  2013-09-21 22:41 ` [PATCH] " Sergei Shtylyov
  1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2013-09-20 18:43 UTC (permalink / raw)
  To: macro; +Cc: netdev

From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Fri, 20 Sep 2013 00:49:44 +0100 (BST)

> 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>

Applied to net-next

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] declance: Remove `incompatible pointer type' warnings
  2013-09-19 23:49 [PATCH] declance: Remove `incompatible pointer type' warnings Maciej W. Rozycki
  2013-09-20 18:43 ` David Miller
@ 2013-09-21 22:41 ` Sergei Shtylyov
  1 sibling, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2013-09-21 22:41 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: netdev

Hello.

On 09/20/2013 03:49 AM, Maciej W. Rozycki wrote:

> 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.

> .../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>

WBR, Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] declance: Remove `incompatible pointer type' warnings
  2013-09-20 18:43 ` David Miller
@ 2013-09-22 20:19   ` Maciej W. Rozycki
  2013-09-28 22:33     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Maciej W. Rozycki @ 2013-09-22 20:19 UTC (permalink / raw)
  To: David Miller; +Cc: Sergei Shtylyov, netdev

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@linux-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++;
 		}

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] declance: Remove `incompatible pointer type' warnings
  2013-09-22 20:19   ` [PATCH v2] " Maciej W. Rozycki
@ 2013-09-28 22:33     ` David Miller
  2013-09-29  0:09       ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2013-09-28 22:33 UTC (permalink / raw)
  To: macro; +Cc: sergei.shtylyov, netdev

From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Sun, 22 Sep 2013 21:19:01 +0100 (BST)

> 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@linux-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).

I can't undo the original commit once it has been installed in my tree.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] declance: Remove `incompatible pointer type' warnings
  2013-09-28 22:33     ` David Miller
@ 2013-09-29  0:09       ` Maciej W. Rozycki
  0 siblings, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2013-09-29  0:09 UTC (permalink / raw)
  To: David Miller; +Cc: sergei.shtylyov, netdev

On Sat, 28 Sep 2013, David Miller wrote:

> >  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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-29  0:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-19 23:49 [PATCH] declance: Remove `incompatible pointer type' warnings Maciej W. Rozycki
2013-09-20 18:43 ` David Miller
2013-09-22 20:19   ` [PATCH v2] " Maciej W. Rozycki
2013-09-28 22:33     ` David Miller
2013-09-29  0:09       ` Maciej W. Rozycki
2013-09-21 22:41 ` [PATCH] " Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).