* Re: [PATCH] trivial: treewide: remove extra semicolon added by module_init/exit
[not found] <1338990069-6627-1-git-send-email-balbi@ti.com>
@ 2012-06-10 12:39 ` Nicolas Ferre
[not found] ` <20120606083119.0d0a0029@nehalam.linuxnetplumber.net>
1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Ferre @ 2012-06-10 12:39 UTC (permalink / raw)
To: Felipe Balbi; +Cc: trivial, Linux Kernel list, David Miller
(Not putting everybody in copy, but still replying)
Felipe,
On 06/06/2012 03:41 PM, Felipe Balbi :
> The definition of module_init() and module_exit()
> already added the final semicolon creating a situation
> where most of our drivers end up with two semicolons
> at the end of every module_init()/module_exit() call.
>
> To fix that, we add missing semicolons to the places
> which didn't have them and remove the semicolons from
> the definition of module_init/module_exit.
>
> Patch generated with the following sed script:
>
> $ sed -i 's/^module_\(init\|exit\)\s*\((\w\+)\)$/module_\1\2;/g' \
> $(git ls-files)
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>
> compile tested with allyesconfig, allnoconfig and allmodconfig on
> x86 only.
>
> Unfortunately I couldn't Cc everybody on get_maintainer.pl's output
> due to recipient limits on TI's mail server.
[..]
> drivers/net/ethernet/cadence/at91_ether.c | 4 ++--
[..]
> diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c
> index 7788419..b107e7f 100644
> --- a/drivers/net/ethernet/cadence/at91_ether.c
> +++ b/drivers/net/ethernet/cadence/at91_ether.c
> @@ -1290,8 +1290,8 @@ static void __exit at91ether_exit(void)
> platform_driver_unregister(&at91ether_driver);
> }
>
> -module_init(at91ether_init)
> -module_exit(at91ether_exit)
> +module_init(at91ether_init);
> +module_exit(at91ether_exit);
>
> MODULE_LICENSE("GPL");
> MODULE_DESCRIPTION("AT91RM9200 EMAC Ethernet driver");
For this Atmel network driver, you can add my:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Best regards,
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trivial: treewide: remove extra semicolon added by module_init/exit
[not found] ` <20120611142028.380c5a61@nehalam.linuxnetplumber.net>
@ 2012-06-12 0:26 ` Rusty Russell
2012-06-12 9:43 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: Rusty Russell @ 2012-06-12 0:26 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Felipe Balbi, trivial, Linux Kernel Mailing List
On Mon, 11 Jun 2012 14:20:28 -0700, Stephen Hemminger <shemminger@vyatta.com> wrote:
> Given common kernel practice and the fact that only 16% of the uses of
> module_init/exit are without semicolon and that other kernel macros don't
> include semicolon.
>
> I recommend going with the majority and common practice...
> 1. Fix the 636 places that use module_init()/exit without semicolon to include semicolon
> 2. Remove semicolon from module_init()/exit()
Um, yes. He should do exactly what he did.
It's a wart, let's fix it.
Thanks,
Rusty.
PS. CC's chopped; somewhere in there is a bad address...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trivial: treewide: remove extra semicolon added by module_init/exit
2012-06-12 0:26 ` Rusty Russell
@ 2012-06-12 9:43 ` Felipe Balbi
2012-06-12 9:47 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2012-06-12 9:43 UTC (permalink / raw)
To: Rusty Russell
Cc: Stephen Hemminger, Felipe Balbi, trivial,
Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
Hi,
On Tue, Jun 12, 2012 at 09:56:36AM +0930, Rusty Russell wrote:
> On Mon, 11 Jun 2012 14:20:28 -0700, Stephen Hemminger <shemminger@vyatta.com> wrote:
> > Given common kernel practice and the fact that only 16% of the uses of
> > module_init/exit are without semicolon and that other kernel macros don't
> > include semicolon.
> >
> > I recommend going with the majority and common practice...
> > 1. Fix the 636 places that use module_init()/exit without semicolon to include semicolon
> > 2. Remove semicolon from module_init()/exit()
>
> Um, yes. He should do exactly what he did.
>
> It's a wart, let's fix it.
>
> Thanks,
> Rusty.
> PS. CC's chopped; somewhere in there is a bad address...
let me know if you need me to update the patch.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] trivial: treewide: remove extra semicolon added by module_init/exit
2012-06-12 9:43 ` Felipe Balbi
@ 2012-06-12 9:47 ` Felipe Balbi
0 siblings, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2012-06-12 9:47 UTC (permalink / raw)
To: Felipe Balbi
Cc: Rusty Russell, Stephen Hemminger, trivial,
Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]
Hi,
On Tue, Jun 12, 2012 at 12:43:50PM +0300, Felipe Balbi wrote:
> Hi,
>
> On Tue, Jun 12, 2012 at 09:56:36AM +0930, Rusty Russell wrote:
> > On Mon, 11 Jun 2012 14:20:28 -0700, Stephen Hemminger <shemminger@vyatta.com> wrote:
> > > Given common kernel practice and the fact that only 16% of the uses of
> > > module_init/exit are without semicolon and that other kernel macros don't
> > > include semicolon.
> > >
> > > I recommend going with the majority and common practice...
> > > 1. Fix the 636 places that use module_init()/exit without semicolon to include semicolon
> > > 2. Remove semicolon from module_init()/exit()
> >
> > Um, yes. He should do exactly what he did.
> >
> > It's a wart, let's fix it.
> >
> > Thanks,
> > Rusty.
> > PS. CC's chopped; somewhere in there is a bad address...
>
> let me know if you need me to update the patch.
BTW, I sent a v2 of this patch [1] and that should be used instead. It
contains a fix to the sed script so that it matches also
module_init/exit when it contains a trailing whitespace at the end.
[1] http://marc.info/?l=linux-kernel&m=133899476223535
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-12 9:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1338990069-6627-1-git-send-email-balbi@ti.com>
2012-06-10 12:39 ` [PATCH] trivial: treewide: remove extra semicolon added by module_init/exit Nicolas Ferre
[not found] ` <20120606083119.0d0a0029@nehalam.linuxnetplumber.net>
[not found] ` <87zk8bhfds.fsf@rustcorp.com.au>
[not found] ` <20120611142028.380c5a61@nehalam.linuxnetplumber.net>
2012-06-12 0:26 ` Rusty Russell
2012-06-12 9:43 ` Felipe Balbi
2012-06-12 9:47 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox