* [PATCH] net/7990: Make lance_private.name const
@ 2013-11-12 19:14 Geert Uytterhoeven
2013-11-12 22:04 ` Sergei Shtylyov
0 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2013-11-12 19:14 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, linux-m68k, Geert Uytterhoeven
This allows to drop a few casts.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/net/ethernet/amd/7990.h | 2 +-
drivers/net/ethernet/amd/hplance.c | 2 +-
drivers/net/ethernet/amd/mvme147.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/amd/7990.h b/drivers/net/ethernet/amd/7990.h
index 0a5837b96421..60c60926afda 100644
--- a/drivers/net/ethernet/amd/7990.h
+++ b/drivers/net/ethernet/amd/7990.h
@@ -100,7 +100,7 @@ struct lance_init_block {
*/
struct lance_private
{
- char *name;
+ const char *name;
unsigned long base;
volatile struct lance_init_block *init_block; /* CPU address of RAM */
volatile struct lance_init_block *lance_init_block; /* LANCE address of RAM */
diff --git a/drivers/net/ethernet/amd/hplance.c b/drivers/net/ethernet/amd/hplance.c
index 0c61fd50d882..a9046cf3a564 100644
--- a/drivers/net/ethernet/amd/hplance.c
+++ b/drivers/net/ethernet/amd/hplance.c
@@ -149,7 +149,7 @@ static void hplance_init(struct net_device *dev, struct dio_dev *d)
}
lp = netdev_priv(dev);
- lp->lance.name = (char*)d->name; /* discards const, shut up gcc */
+ lp->lance.name = d->name;
lp->lance.base = va;
lp->lance.init_block = (struct lance_init_block *)(va + HPLANCE_MEMOFF); /* CPU addr */
lp->lance.lance_init_block = NULL; /* LANCE addr of same RAM */
diff --git a/drivers/net/ethernet/amd/mvme147.c b/drivers/net/ethernet/amd/mvme147.c
index e108e911da05..b5d76b45176e 100644
--- a/drivers/net/ethernet/amd/mvme147.c
+++ b/drivers/net/ethernet/amd/mvme147.c
@@ -120,7 +120,7 @@ struct net_device * __init mvme147lance_probe(int unit)
return ERR_PTR(-ENOMEM);
}
- lp->lance.name = (char*)name; /* discards const, shut up gcc */
+ lp->lance.name = name;
lp->lance.base = dev->base_addr;
lp->lance.init_block = (struct lance_init_block *)(lp->ram); /* CPU addr */
lp->lance.lance_init_block = (struct lance_init_block *)(lp->ram); /* LANCE addr of same RAM */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-12 22:04 ` Sergei Shtylyov
@ 2013-11-12 21:12 ` David Miller
2013-11-12 23:40 ` Sergei Shtylyov
0 siblings, 1 reply; 12+ messages in thread
From: David Miller @ 2013-11-12 21:12 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: geert, netdev, linux-m68k
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 13 Nov 2013 01:04:17 +0300
>> @@ -100,7 +100,7 @@ struct lance_init_block {
>> */
>> struct lance_private
>> {
>> - char *name;
>> + const char *name;
>
> Indent with tab, not spaces, please.
This whole file is %99 space indentation, you really can't blame
Geert for this.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-12 19:14 [PATCH] net/7990: Make lance_private.name const Geert Uytterhoeven
@ 2013-11-12 22:04 ` Sergei Shtylyov
2013-11-12 21:12 ` David Miller
0 siblings, 1 reply; 12+ messages in thread
From: Sergei Shtylyov @ 2013-11-12 22:04 UTC (permalink / raw)
To: Geert Uytterhoeven, David S. Miller; +Cc: netdev, linux-m68k
Hello.
On 11/12/2013 10:14 PM, Geert Uytterhoeven wrote:
> This allows to drop a few casts.
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> drivers/net/ethernet/amd/7990.h | 2 +-
> drivers/net/ethernet/amd/hplance.c | 2 +-
> drivers/net/ethernet/amd/mvme147.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
> diff --git a/drivers/net/ethernet/amd/7990.h b/drivers/net/ethernet/amd/7990.h
> index 0a5837b96421..60c60926afda 100644
> --- a/drivers/net/ethernet/amd/7990.h
> +++ b/drivers/net/ethernet/amd/7990.h
> @@ -100,7 +100,7 @@ struct lance_init_block {
> */
> struct lance_private
> {
> - char *name;
> + const char *name;
Indent with tab, not spaces, please.
> diff --git a/drivers/net/ethernet/amd/hplance.c b/drivers/net/ethernet/amd/hplance.c
> index 0c61fd50d882..a9046cf3a564 100644
> --- a/drivers/net/ethernet/amd/hplance.c
> +++ b/drivers/net/ethernet/amd/hplance.c
> @@ -149,7 +149,7 @@ static void hplance_init(struct net_device *dev, struct dio_dev *d)
> }
>
> lp = netdev_priv(dev);
> - lp->lance.name = (char*)d->name; /* discards const, shut up gcc */
> + lp->lance.name = d->name;
Same here.
WBR, Sergei
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-12 23:40 ` Sergei Shtylyov
@ 2013-11-12 22:44 ` Geert Uytterhoeven
2013-11-12 23:16 ` David Miller
2013-11-13 0:04 ` Sergei Shtylyov
2013-11-12 23:15 ` David Miller
1 sibling, 2 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2013-11-12 22:44 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: David Miller, netdev@vger.kernel.org, Linux/m68k
On Wed, Nov 13, 2013 at 12:40 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 11/13/2013 12:12 AM, David Miller wrote:
>
>>>> @@ -100,7 +100,7 @@ struct lance_init_block {
>>>> */
>>>> struct lance_private
>>>> {
>>>> - char *name;
>>>> + const char *name;
>
>
>>> Indent with tab, not spaces, please.
>
>
>> This whole file is %99 space indentation, you really can't blame
>> Geert for this.
>
>
> It's never late to fix some.
That would be a separate patch. Care to create and send it?
> And remember about checkpatch.pl which was hardly content with the patch.
Only because checkpatch looks at the _new_ lines, and doesn't compare the
styles of the old and new lines.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-12 23:40 ` Sergei Shtylyov
2013-11-12 22:44 ` Geert Uytterhoeven
@ 2013-11-12 23:15 ` David Miller
1 sibling, 0 replies; 12+ messages in thread
From: David Miller @ 2013-11-12 23:15 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: geert, netdev, linux-m68k
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 13 Nov 2013 02:40:38 +0300
> On 11/13/2013 12:12 AM, David Miller wrote:
>
>>>> @@ -100,7 +100,7 @@ struct lance_init_block {
>>>> */
>>>> struct lance_private
>>>> {
>>>> - char *name;
>>>> + const char *name;
>
>>> Indent with tab, not spaces, please.
>
>> This whole file is %99 space indentation, you really can't blame
>> Geert for this.
>
> It's never late to fix some. And remember about checkpatch.pl which
> was hardly content with the patch.
Good point, Geert please respin this, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-12 22:44 ` Geert Uytterhoeven
@ 2013-11-12 23:16 ` David Miller
2013-11-13 8:54 ` Geert Uytterhoeven
2013-11-13 0:04 ` Sergei Shtylyov
1 sibling, 1 reply; 12+ messages in thread
From: David Miller @ 2013-11-12 23:16 UTC (permalink / raw)
To: geert; +Cc: sergei.shtylyov, netdev, linux-m68k
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Tue, 12 Nov 2013 23:44:06 +0100
> On Wed, Nov 13, 2013 at 12:40 AM, Sergei Shtylyov
> <sergei.shtylyov@cogentembedded.com> wrote:
>> On 11/13/2013 12:12 AM, David Miller wrote:
>>
>>>>> @@ -100,7 +100,7 @@ struct lance_init_block {
>>>>> */
>>>>> struct lance_private
>>>>> {
>>>>> - char *name;
>>>>> + const char *name;
>>
>>
>>>> Indent with tab, not spaces, please.
>>
>>
>>> This whole file is %99 space indentation, you really can't blame
>>> Geert for this.
>>
>>
>> It's never late to fix some.
>
> That would be a separate patch. Care to create and send it?
>
>> And remember about checkpatch.pl which was hardly content with the patch.
>
> Only because checkpatch looks at the _new_ lines, and doesn't compare the
> styles of the old and new lines.
You really should fix the line you are changing to use tabs, please respin
with this in mind, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-12 21:12 ` David Miller
@ 2013-11-12 23:40 ` Sergei Shtylyov
2013-11-12 22:44 ` Geert Uytterhoeven
2013-11-12 23:15 ` David Miller
0 siblings, 2 replies; 12+ messages in thread
From: Sergei Shtylyov @ 2013-11-12 23:40 UTC (permalink / raw)
To: David Miller; +Cc: geert, netdev, linux-m68k
On 11/13/2013 12:12 AM, David Miller wrote:
>>> @@ -100,7 +100,7 @@ struct lance_init_block {
>>> */
>>> struct lance_private
>>> {
>>> - char *name;
>>> + const char *name;
>> Indent with tab, not spaces, please.
> This whole file is %99 space indentation, you really can't blame
> Geert for this.
It's never late to fix some. And remember about checkpatch.pl which was
hardly content with the patch.
WBR, Sergei
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-12 22:44 ` Geert Uytterhoeven
2013-11-12 23:16 ` David Miller
@ 2013-11-13 0:04 ` Sergei Shtylyov
1 sibling, 0 replies; 12+ messages in thread
From: Sergei Shtylyov @ 2013-11-13 0:04 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: David Miller, netdev@vger.kernel.org, Linux/m68k
On 11/13/2013 01:44 AM, Geert Uytterhoeven wrote:
>>>>> @@ -100,7 +100,7 @@ struct lance_init_block {
>>>>> */
>>>>> struct lance_private
>>>>> {
>>>>> - char *name;
>>>>> + const char *name;
>>>> Indent with tab, not spaces, please.
>>> This whole file is %99 space indentation, you really can't blame
>>> Geert for this.
>> It's never late to fix some.
> That would be a separate patch. Care to create and send it?
I wasn't telling you to fix all of them, just the ones you touched anyway.
I don't see why the separate patch is needed for that.
>> And remember about checkpatch.pl which was hardly content with the patch.
> Only because checkpatch looks at the _new_ lines, and doesn't compare the
> styles of the old and new lines.
Care to fix it? :-)
> Gr{oetje,eeting}s,
> Geert
WBR, Sergei
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-12 23:16 ` David Miller
@ 2013-11-13 8:54 ` Geert Uytterhoeven
2013-11-13 20:13 ` David Miller
0 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2013-11-13 8:54 UTC (permalink / raw)
To: David Miller; +Cc: Sergei Shtylyov, netdev@vger.kernel.org, Linux/m68k
On Wed, Nov 13, 2013 at 12:16 AM, David Miller <davem@davemloft.net> wrote:
>>> And remember about checkpatch.pl which was hardly content with the patch.
>>
>> Only because checkpatch looks at the _new_ lines, and doesn't compare the
>> styles of the old and new lines.
>
> You really should fix the line you are changing to use tabs, please respin
> with this in mind, thanks.
As that would add more to the TAB/space mess^H^H^Hix, I prepended a
patch to fix all whitespace errors.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-13 8:54 ` Geert Uytterhoeven
@ 2013-11-13 20:13 ` David Miller
2013-11-14 8:37 ` Geert Uytterhoeven
0 siblings, 1 reply; 12+ messages in thread
From: David Miller @ 2013-11-13 20:13 UTC (permalink / raw)
To: geert; +Cc: sergei.shtylyov, netdev, linux-m68k
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Wed, 13 Nov 2013 09:54:18 +0100
> On Wed, Nov 13, 2013 at 12:16 AM, David Miller <davem@davemloft.net> wrote:
>>>> And remember about checkpatch.pl which was hardly content with the patch.
>>>
>>> Only because checkpatch looks at the _new_ lines, and doesn't compare the
>>> styles of the old and new lines.
>>
>> You really should fix the line you are changing to use tabs, please respin
>> with this in mind, thanks.
>
> As that would add more to the TAB/space mess^H^H^Hix, I prepended a
> patch to fix all whitespace errors.
I implicitly asked you not to do this, now things are more difficult
and your original change will take longer to integrate.
Becuase now it isn't a patch set I can easily just apply quickly in
the current merge window, and it's therefore a series you'll have to
resubmit later when the merge window closes and the net-next tree
opens up again.
Sorry.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-13 20:13 ` David Miller
@ 2013-11-14 8:37 ` Geert Uytterhoeven
2013-11-14 9:11 ` David Miller
0 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2013-11-14 8:37 UTC (permalink / raw)
To: David Miller; +Cc: Sergei Shtylyov, netdev@vger.kernel.org, Linux/m68k
Hi David,
On Wed, Nov 13, 2013 at 9:13 PM, David Miller <davem@davemloft.net> wrote:
>> On Wed, Nov 13, 2013 at 12:16 AM, David Miller <davem@davemloft.net> wrote:
>>>>> And remember about checkpatch.pl which was hardly content with the patch.
>>>>
>>>> Only because checkpatch looks at the _new_ lines, and doesn't compare the
>>>> styles of the old and new lines.
>>>
>>> You really should fix the line you are changing to use tabs, please respin
>>> with this in mind, thanks.
>>
>> As that would add more to the TAB/space mess^H^H^Hix, I prepended a
>> patch to fix all whitespace errors.
>
> I implicitly asked you not to do this, now things are more difficult
> and your original change will take longer to integrate.
Sorry, I didn't get that message. I was puzzled by your request to correct
the whitespace of the lines I touched only, which causes them to stand out
in a block of old non-compliant whitespace.
> Becuase now it isn't a patch set I can easily just apply quickly in
> the current merge window, and it's therefore a series you'll have to
> resubmit later when the merge window closes and the net-next tree
> opens up again.
Nevermind, it's not urgent nor critical. I will resubmit for the next merge
window.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] net/7990: Make lance_private.name const
2013-11-14 8:37 ` Geert Uytterhoeven
@ 2013-11-14 9:11 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2013-11-14 9:11 UTC (permalink / raw)
To: geert; +Cc: sergei.shtylyov, netdev, linux-m68k
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Thu, 14 Nov 2013 09:37:32 +0100
> Sorry, I didn't get that message. I was puzzled by your request to correct
> the whitespace of the lines I touched only, which causes them to stand out
> in a block of old non-compliant whitespace.
It's very hard to stand out in this source file, even in the first
hunk of your patch the very next line already used proper TABs.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-11-14 9:11 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-12 19:14 [PATCH] net/7990: Make lance_private.name const Geert Uytterhoeven
2013-11-12 22:04 ` Sergei Shtylyov
2013-11-12 21:12 ` David Miller
2013-11-12 23:40 ` Sergei Shtylyov
2013-11-12 22:44 ` Geert Uytterhoeven
2013-11-12 23:16 ` David Miller
2013-11-13 8:54 ` Geert Uytterhoeven
2013-11-13 20:13 ` David Miller
2013-11-14 8:37 ` Geert Uytterhoeven
2013-11-14 9:11 ` David Miller
2013-11-13 0:04 ` Sergei Shtylyov
2013-11-12 23:15 ` David Miller
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).