linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] sound: Fix compile error of seq_device.c
@ 2016-06-21  8:34 fgao
  2016-06-21  8:44 ` Takashi Iwai
  0 siblings, 1 reply; 8+ messages in thread
From: fgao @ 2016-06-21  8:34 UTC (permalink / raw)
  To: perex, tiwai, alsa-devel, linux-kernel; +Cc: gfree.wind, Gao Feng

From: Gao Feng <fgao@ikuai8.com>

Signed-off-by: Gao Feng <fgao@ikuai8.com>
---
 sound/core/seq/seq_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
index c4acf17..4e859e4 100644
--- a/sound/core/seq/seq_device.c
+++ b/sound/core/seq/seq_device.c
@@ -311,5 +311,5 @@ static void __exit alsa_seq_device_exit(void)
 	bus_unregister(&snd_seq_bus_type);
 }
 
-subsys_initcall(alsa_seq_device_init)
-module_exit(alsa_seq_device_exit)
+subsys_initcall(alsa_seq_device_init);
+module_exit(alsa_seq_device_exit);
-- 
1.9.1

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

* Re: [PATCH 1/1] sound: Fix compile error of seq_device.c
  2016-06-21  8:34 [PATCH 1/1] sound: Fix compile error of seq_device.c fgao
@ 2016-06-21  8:44 ` Takashi Iwai
       [not found]   ` <000901d1cb99$b0f36130$12da2390$@ikuai8.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2016-06-21  8:44 UTC (permalink / raw)
  To: fgao; +Cc: alsa-devel, perex, linux-kernel, gfree.wind

On Tue, 21 Jun 2016 10:34:25 +0200,
<fgao@ikuai8.com> wrote:
> 
> From: Gao Feng <fgao@ikuai8.com>
> 
> Signed-off-by: Gao Feng <fgao@ikuai8.com>

What compile error did you get?


Takashi

> ---
>  sound/core/seq/seq_device.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
> index c4acf17..4e859e4 100644
> --- a/sound/core/seq/seq_device.c
> +++ b/sound/core/seq/seq_device.c
> @@ -311,5 +311,5 @@ static void __exit alsa_seq_device_exit(void)
>  	bus_unregister(&snd_seq_bus_type);
>  }
>  
> -subsys_initcall(alsa_seq_device_init)
> -module_exit(alsa_seq_device_exit)
> +subsys_initcall(alsa_seq_device_init);
> +module_exit(alsa_seq_device_exit);
> -- 
> 1.9.1
> 
> 
> 
> 
> 

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

* Re: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
       [not found]   ` <000901d1cb99$b0f36130$12da2390$@ikuai8.com>
@ 2016-06-21  9:19     ` Takashi Iwai
  2016-06-21  9:35       ` 答复: " 高峰
  0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2016-06-21  9:19 UTC (permalink / raw)
  To: 高峰; +Cc: alsa-devel, perex, linux-kernel, gfree.wind

On Tue, 21 Jun 2016 10:48:30 +0200,
高峰 wrote:
> 
> The lastest CentOS7 platform, and the gcc version is gcc version 4.8.5
> 20150623 (Red Hat 4.8.5-4) (GCC).
> It could pass compilation after append the lost semicolon. 
> 
> from sound/core/seq/seq_device.c:39:
> include/linux/init.h:216:2: error: expected ‘,’ or ‘;’ before ‘static’
>   static exitcall_t __exitcall_##fn __exit_call = fn
>   ^
> include/linux/init.h:279:24: note: in expansion of macro ‘__exitcall’
>  #define module_exit(x) __exitcall(x);
>                         ^
> sound/core/seq/seq_device.c:315:1: note: in expansion of macro
> ‘module_exit’
>  module_exit(alsa_seq_device_exit)
>  ^
> make[3]: *** [sound/core/seq/seq_device.o] Error 1
> make[2]: *** [sound/core/seq] Error 2
> make[1]: *** [sound/core] Error 2
> make: *** [sound] Error 2

It's a RH specific issue.  The upstream code has a different
definition of module_init(), thus no such an error would occur.

Note that I'm fine to apply the patch, it's a trivial change.
But you need to give the clear reason why to apply it.  In this case,
it's no fault of the upstream code.  But if it would make someone's
life a bit easier, it's OK to apply such a change.

That being said, please resubmit the patch with a more explanation.


thanks,

Takashi

> 
> -----邮件原件-----
> 发件人: Takashi Iwai [mailto:tiwai@suse.de] 
> 发送时间: 2016年6月21日 16:45
> 收件人: fgao@ikuai8.com
> 抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.
> org; gfree.wind@gmail.com
> 主题: Re: [PATCH 1/1] sound: Fix compile error of seq_device.c
> 
> On Tue, 21 Jun 2016 10:34:25 +0200,
> <fgao@ikuai8.com> wrote:
> > 
> > From: Gao Feng <fgao@ikuai8.com>
> > 
> > Signed-off-by: Gao Feng <fgao@ikuai8.com>
> 
> What compile error did you get?
> 
> 
> Takashi
> 
> > ---
> >  sound/core/seq/seq_device.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c 
> > index c4acf17..4e859e4 100644
> > --- a/sound/core/seq/seq_device.c
> > +++ b/sound/core/seq/seq_device.c
> > @@ -311,5 +311,5 @@ static void __exit alsa_seq_device_exit(void)
> >  	bus_unregister(&snd_seq_bus_type);
> >  }
> >  
> > -subsys_initcall(alsa_seq_device_init)
> > -module_exit(alsa_seq_device_exit)
> > +subsys_initcall(alsa_seq_device_init);
> > +module_exit(alsa_seq_device_exit);
> > --
> > 1.9.1
> > 
> > 
> > 
> > 
> > 
> 
> 
> 

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

* 答复: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
  2016-06-21  9:19     ` 答复: " Takashi Iwai
@ 2016-06-21  9:35       ` 高峰
  2016-06-21  9:53         ` Takashi Iwai
  0 siblings, 1 reply; 8+ messages in thread
From: 高峰 @ 2016-06-21  9:35 UTC (permalink / raw)
  To: 'Takashi Iwai'; +Cc: alsa-devel, perex, linux-kernel, gfree.wind

I have sent the new commit with the compile errors.
Is it ok now?

BTW, I think the compile error is caused by that "subsys_initcall" statement losts the semicolon. 

-----邮件原件-----
发件人: Takashi Iwai [mailto:tiwai@suse.de] 
发送时间: 2016年6月21日 17:20
收件人: 高峰 <fgao@ikuai8.com>
抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.org; gfree.wind@gmail.com
主题: Re: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c

On Tue, 21 Jun 2016 10:48:30 +0200,
高峰 wrote:
> 
> The lastest CentOS7 platform, and the gcc version is gcc version 4.8.5
> 20150623 (Red Hat 4.8.5-4) (GCC).
> It could pass compilation after append the lost semicolon. 
> 
> from sound/core/seq/seq_device.c:39:
> include/linux/init.h:216:2: error: expected ‘,’ or ‘;’ before ‘static’
>   static exitcall_t __exitcall_##fn __exit_call = fn
>   ^
> include/linux/init.h:279:24: note: in expansion of macro ‘__exitcall’
>  #define module_exit(x) __exitcall(x);
>                         ^
> sound/core/seq/seq_device.c:315:1: note: in expansion of macro 
> ‘module_exit’
>  module_exit(alsa_seq_device_exit)
>  ^
> make[3]: *** [sound/core/seq/seq_device.o] Error 1
> make[2]: *** [sound/core/seq] Error 2
> make[1]: *** [sound/core] Error 2
> make: *** [sound] Error 2

It's a RH specific issue.  The upstream code has a different definition of module_init(), thus no such an error would occur.

Note that I'm fine to apply the patch, it's a trivial change.
But you need to give the clear reason why to apply it.  In this case, it's no fault of the upstream code.  But if it would make someone's life a bit easier, it's OK to apply such a change.

That being said, please resubmit the patch with a more explanation.


thanks,

Takashi

> 
> -----邮件原件-----
> 发件人: Takashi Iwai [mailto:tiwai@suse.de]
> 发送时间: 2016年6月21日 16:45
> 收件人: fgao@ikuai8.com
> 抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.
> org; gfree.wind@gmail.com
> 主题: Re: [PATCH 1/1] sound: Fix compile error of seq_device.c
> 
> On Tue, 21 Jun 2016 10:34:25 +0200,
> <fgao@ikuai8.com> wrote:
> > 
> > From: Gao Feng <fgao@ikuai8.com>
> > 
> > Signed-off-by: Gao Feng <fgao@ikuai8.com>
> 
> What compile error did you get?
> 
> 
> Takashi
> 
> > ---
> >  sound/core/seq/seq_device.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/sound/core/seq/seq_device.c 
> > b/sound/core/seq/seq_device.c index c4acf17..4e859e4 100644
> > --- a/sound/core/seq/seq_device.c
> > +++ b/sound/core/seq/seq_device.c
> > @@ -311,5 +311,5 @@ static void __exit alsa_seq_device_exit(void)
> >  	bus_unregister(&snd_seq_bus_type);
> >  }
> >  
> > -subsys_initcall(alsa_seq_device_init)
> > -module_exit(alsa_seq_device_exit)
> > +subsys_initcall(alsa_seq_device_init);
> > +module_exit(alsa_seq_device_exit);
> > --
> > 1.9.1
> > 
> > 
> > 
> > 
> > 
> 
> 
> 

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

* Re: 答复: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
  2016-06-21  9:35       ` 答复: " 高峰
@ 2016-06-21  9:53         ` Takashi Iwai
  2016-06-21  9:57           ` 答复: " 高峰
  0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2016-06-21  9:53 UTC (permalink / raw)
  To: 高峰; +Cc: alsa-devel, perex, linux-kernel, gfree.wind

On Tue, 21 Jun 2016 11:35:39 +0200,
高峰 wrote:
> 
> I have sent the new commit with the compile errors.
> Is it ok now?
> 
> BTW, I think the compile error is caused by that "subsys_initcall" statement losts the semicolon. 

Does this happen with the latest upstream kernel code at all...?


Takashi

> 
> -----邮件原件-----
> 发件人: Takashi Iwai [mailto:tiwai@suse.de] 
> 发送时间: 2016年6月21日 17:20
> 收件人: 高峰 <fgao@ikuai8.com>
> 抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.org; gfree.wind@gmail.com
> 主题: Re: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
> 
> On Tue, 21 Jun 2016 10:48:30 +0200,
> 高峰 wrote:
> > 
> > The lastest CentOS7 platform, and the gcc version is gcc version 4.8.5
> > 20150623 (Red Hat 4.8.5-4) (GCC).
> > It could pass compilation after append the lost semicolon. 
> > 
> > from sound/core/seq/seq_device.c:39:
> > include/linux/init.h:216:2: error: expected ‘,’ or ‘;’ before ‘static’
> >   static exitcall_t __exitcall_##fn __exit_call = fn
> >   ^
> > include/linux/init.h:279:24: note: in expansion of macro ‘__exitcall’
> >  #define module_exit(x) __exitcall(x);
> >                         ^
> > sound/core/seq/seq_device.c:315:1: note: in expansion of macro 
> > ‘module_exit’
> >  module_exit(alsa_seq_device_exit)
> >  ^
> > make[3]: *** [sound/core/seq/seq_device.o] Error 1
> > make[2]: *** [sound/core/seq] Error 2
> > make[1]: *** [sound/core] Error 2
> > make: *** [sound] Error 2
> 
> It's a RH specific issue.  The upstream code has a different definition of module_init(), thus no such an error would occur.
> 
> Note that I'm fine to apply the patch, it's a trivial change.
> But you need to give the clear reason why to apply it.  In this case, it's no fault of the upstream code.  But if it would make someone's life a bit easier, it's OK to apply such a change.
> 
> That being said, please resubmit the patch with a more explanation.
> 
> 
> thanks,
> 
> Takashi
> 
> > 
> > -----邮件原件-----
> > 发件人: Takashi Iwai [mailto:tiwai@suse.de]
> > 发送时间: 2016年6月21日 16:45
> > 收件人: fgao@ikuai8.com
> > 抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.
> > org; gfree.wind@gmail.com
> > 主题: Re: [PATCH 1/1] sound: Fix compile error of seq_device.c
> > 
> > On Tue, 21 Jun 2016 10:34:25 +0200,
> > <fgao@ikuai8.com> wrote:
> > > 
> > > From: Gao Feng <fgao@ikuai8.com>
> > > 
> > > Signed-off-by: Gao Feng <fgao@ikuai8.com>
> > 
> > What compile error did you get?
> > 
> > 
> > Takashi
> > 
> > > ---
> > >  sound/core/seq/seq_device.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/sound/core/seq/seq_device.c 
> > > b/sound/core/seq/seq_device.c index c4acf17..4e859e4 100644
> > > --- a/sound/core/seq/seq_device.c
> > > +++ b/sound/core/seq/seq_device.c
> > > @@ -311,5 +311,5 @@ static void __exit alsa_seq_device_exit(void)
> > >  	bus_unregister(&snd_seq_bus_type);
> > >  }
> > >  
> > > -subsys_initcall(alsa_seq_device_init)
> > > -module_exit(alsa_seq_device_exit)
> > > +subsys_initcall(alsa_seq_device_init);
> > > +module_exit(alsa_seq_device_exit);
> > > --
> > > 1.9.1
> > > 
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> 
> 
> 

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

* 答复: 答复: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
  2016-06-21  9:53         ` Takashi Iwai
@ 2016-06-21  9:57           ` 高峰
  2016-06-21 10:04             ` Takashi Iwai
  0 siblings, 1 reply; 8+ messages in thread
From: 高峰 @ 2016-06-21  9:57 UTC (permalink / raw)
  To: 'Takashi Iwai'; +Cc: alsa-devel, perex, linux-kernel, gfree.wind

Oh, I get it.

I met the compile error when compile the kernel 3.10 on CentOS7 and fix it, then I find the seq_device of upstream is same.
So I thought it should be fixed.

OK. Let me compile the upstream codes on CentOS7 again.

-----邮件原件-----
发件人: Takashi Iwai [mailto:tiwai@suse.de] 
发送时间: 2016年6月21日 17:54
收件人: 高峰 <fgao@ikuai8.com>
抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.org; gfree.wind@gmail.com
主题: Re: 答复: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c

On Tue, 21 Jun 2016 11:35:39 +0200,
高峰 wrote:
> 
> I have sent the new commit with the compile errors.
> Is it ok now?
> 
> BTW, I think the compile error is caused by that "subsys_initcall" statement losts the semicolon. 

Does this happen with the latest upstream kernel code at all...?


Takashi

> 
> -----邮件原件-----
> 发件人: Takashi Iwai [mailto:tiwai@suse.de]
> 发送时间: 2016年6月21日 17:20
> 收件人: 高峰 <fgao@ikuai8.com>
> 抄送: alsa-devel@alsa-project.org; perex@perex.cz; 
> linux-kernel@vger.kernel.org; gfree.wind@gmail.com
> 主题: Re: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
> 
> On Tue, 21 Jun 2016 10:48:30 +0200,
> 高峰 wrote:
> > 
> > The lastest CentOS7 platform, and the gcc version is gcc version 
> > 4.8.5
> > 20150623 (Red Hat 4.8.5-4) (GCC).
> > It could pass compilation after append the lost semicolon. 
> > 
> > from sound/core/seq/seq_device.c:39:
> > include/linux/init.h:216:2: error: expected ‘,’ or ‘;’ before ‘static’
> >   static exitcall_t __exitcall_##fn __exit_call = fn
> >   ^
> > include/linux/init.h:279:24: note: in expansion of macro ‘__exitcall’
> >  #define module_exit(x) __exitcall(x);
> >                         ^
> > sound/core/seq/seq_device.c:315:1: note: in expansion of macro 
> > ‘module_exit’
> >  module_exit(alsa_seq_device_exit)
> >  ^
> > make[3]: *** [sound/core/seq/seq_device.o] Error 1
> > make[2]: *** [sound/core/seq] Error 2
> > make[1]: *** [sound/core] Error 2
> > make: *** [sound] Error 2
> 
> It's a RH specific issue.  The upstream code has a different definition of module_init(), thus no such an error would occur.
> 
> Note that I'm fine to apply the patch, it's a trivial change.
> But you need to give the clear reason why to apply it.  In this case, it's no fault of the upstream code.  But if it would make someone's life a bit easier, it's OK to apply such a change.
> 
> That being said, please resubmit the patch with a more explanation.
> 
> 
> thanks,
> 
> Takashi
> 
> > 
> > -----邮件原件-----
> > 发件人: Takashi Iwai [mailto:tiwai@suse.de]
> > 发送时间: 2016年6月21日 16:45
> > 收件人: fgao@ikuai8.com
> > 抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.
> > org; gfree.wind@gmail.com
> > 主题: Re: [PATCH 1/1] sound: Fix compile error of seq_device.c
> > 
> > On Tue, 21 Jun 2016 10:34:25 +0200,
> > <fgao@ikuai8.com> wrote:
> > > 
> > > From: Gao Feng <fgao@ikuai8.com>
> > > 
> > > Signed-off-by: Gao Feng <fgao@ikuai8.com>
> > 
> > What compile error did you get?
> > 
> > 
> > Takashi
> > 
> > > ---
> > >  sound/core/seq/seq_device.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/sound/core/seq/seq_device.c 
> > > b/sound/core/seq/seq_device.c index c4acf17..4e859e4 100644
> > > --- a/sound/core/seq/seq_device.c
> > > +++ b/sound/core/seq/seq_device.c
> > > @@ -311,5 +311,5 @@ static void __exit alsa_seq_device_exit(void)
> > >  	bus_unregister(&snd_seq_bus_type);
> > >  }
> > >  
> > > -subsys_initcall(alsa_seq_device_init)
> > > -module_exit(alsa_seq_device_exit)
> > > +subsys_initcall(alsa_seq_device_init);
> > > +module_exit(alsa_seq_device_exit);
> > > --
> > > 1.9.1
> > > 
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> 
> 
> 

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

* Re: 答复: 答复: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
  2016-06-21  9:57           ` 答复: " 高峰
@ 2016-06-21 10:04             ` Takashi Iwai
  2016-06-21 10:11               ` 答复: " 高峰
  0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2016-06-21 10:04 UTC (permalink / raw)
  To: 高峰; +Cc: alsa-devel, perex, linux-kernel, gfree.wind

On Tue, 21 Jun 2016 11:57:28 +0200,
高峰 wrote:
> 
> Oh, I get it.
> 
> I met the compile error when compile the kernel 3.10 on CentOS7 and fix it, then I find the seq_device of upstream is same.
> So I thought it should be fixed.
> 
> OK. Let me compile the upstream codes on CentOS7 again.

Well, I see a potential problem even in the upstream, but it's only
when CONFIG_LTO is set.  However, CONFIG_LTO isn't used any other
places (or even set) in the upstream tree yet, so the issue must not
happen there.

And yet, even if CONFIG_LTO is enabled, the first place to be fixed is
rather in include/linux/init.h, not each code calling module_init()
without a terminator semicolon.  There are lots of such codes in the
tree, and calls of init/exit without semicolon are official ways.

Though, having semicolons looks nicer nowadays, so it'd make sense to
add semicolons in the end.  If so, we may fix all of them in a shot by
a script.


Takashi

> 
> -----邮件原件-----
> 发件人: Takashi Iwai [mailto:tiwai@suse.de] 
> 发送时间: 2016年6月21日 17:54
> 收件人: 高峰 <fgao@ikuai8.com>
> 抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.org; gfree.wind@gmail.com
> 主题: Re: 答复: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
> 
> On Tue, 21 Jun 2016 11:35:39 +0200,
> 高峰 wrote:
> > 
> > I have sent the new commit with the compile errors.
> > Is it ok now?
> > 
> > BTW, I think the compile error is caused by that "subsys_initcall" statement losts the semicolon. 
> 
> Does this happen with the latest upstream kernel code at all...?
> 
> 
> Takashi
> 
> > 
> > -----邮件原件-----
> > 发件人: Takashi Iwai [mailto:tiwai@suse.de]
> > 发送时间: 2016年6月21日 17:20
> > 收件人: 高峰 <fgao@ikuai8.com>
> > 抄送: alsa-devel@alsa-project.org; perex@perex.cz; 
> > linux-kernel@vger.kernel.org; gfree.wind@gmail.com
> > 主题: Re: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
> > 
> > On Tue, 21 Jun 2016 10:48:30 +0200,
> > 高峰 wrote:
> > > 
> > > The lastest CentOS7 platform, and the gcc version is gcc version 
> > > 4.8.5
> > > 20150623 (Red Hat 4.8.5-4) (GCC).
> > > It could pass compilation after append the lost semicolon. 
> > > 
> > > from sound/core/seq/seq_device.c:39:
> > > include/linux/init.h:216:2: error: expected ‘,’ or ‘;’ before ‘static’
> > >   static exitcall_t __exitcall_##fn __exit_call = fn
> > >   ^
> > > include/linux/init.h:279:24: note: in expansion of macro ‘__exitcall’
> > >  #define module_exit(x) __exitcall(x);
> > >                         ^
> > > sound/core/seq/seq_device.c:315:1: note: in expansion of macro 
> > > ‘module_exit’
> > >  module_exit(alsa_seq_device_exit)
> > >  ^
> > > make[3]: *** [sound/core/seq/seq_device.o] Error 1
> > > make[2]: *** [sound/core/seq] Error 2
> > > make[1]: *** [sound/core] Error 2
> > > make: *** [sound] Error 2
> > 
> > It's a RH specific issue.  The upstream code has a different definition of module_init(), thus no such an error would occur.
> > 
> > Note that I'm fine to apply the patch, it's a trivial change.
> > But you need to give the clear reason why to apply it.  In this case, it's no fault of the upstream code.  But if it would make someone's life a bit easier, it's OK to apply such a change.
> > 
> > That being said, please resubmit the patch with a more explanation.
> > 
> > 
> > thanks,
> > 
> > Takashi
> > 
> > > 
> > > -----邮件原件-----
> > > 发件人: Takashi Iwai [mailto:tiwai@suse.de]
> > > 发送时间: 2016年6月21日 16:45
> > > 收件人: fgao@ikuai8.com
> > > 抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.
> > > org; gfree.wind@gmail.com
> > > 主题: Re: [PATCH 1/1] sound: Fix compile error of seq_device.c
> > > 
> > > On Tue, 21 Jun 2016 10:34:25 +0200,
> > > <fgao@ikuai8.com> wrote:
> > > > 
> > > > From: Gao Feng <fgao@ikuai8.com>
> > > > 
> > > > Signed-off-by: Gao Feng <fgao@ikuai8.com>
> > > 
> > > What compile error did you get?
> > > 
> > > 
> > > Takashi
> > > 
> > > > ---
> > > >  sound/core/seq/seq_device.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/sound/core/seq/seq_device.c 
> > > > b/sound/core/seq/seq_device.c index c4acf17..4e859e4 100644
> > > > --- a/sound/core/seq/seq_device.c
> > > > +++ b/sound/core/seq/seq_device.c
> > > > @@ -311,5 +311,5 @@ static void __exit alsa_seq_device_exit(void)
> > > >  	bus_unregister(&snd_seq_bus_type);
> > > >  }
> > > >  
> > > > -subsys_initcall(alsa_seq_device_init)
> > > > -module_exit(alsa_seq_device_exit)
> > > > +subsys_initcall(alsa_seq_device_init);
> > > > +module_exit(alsa_seq_device_exit);
> > > > --
> > > > 1.9.1
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> 
> 
> 

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

* 答复: 答复: 答复: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
  2016-06-21 10:04             ` Takashi Iwai
@ 2016-06-21 10:11               ` 高峰
  0 siblings, 0 replies; 8+ messages in thread
From: 高峰 @ 2016-06-21 10:11 UTC (permalink / raw)
  To: 'Takashi Iwai'; +Cc: alsa-devel, perex, linux-kernel, gfree.wind

OK.
It is good news that there is no real issue on upstream.

But it is bad news that my commit would not be accepted :)

Best Regards
Feng

-----邮件原件-----
发件人: Takashi Iwai [mailto:tiwai@suse.de] 
发送时间: 2016年6月21日 18:05
收件人: 高峰 <fgao@ikuai8.com>
抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.org; gfree.wind@gmail.com
主题: Re: 答复: 答复: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c

On Tue, 21 Jun 2016 11:57:28 +0200,
高峰 wrote:
> 
> Oh, I get it.
> 
> I met the compile error when compile the kernel 3.10 on CentOS7 and fix it, then I find the seq_device of upstream is same.
> So I thought it should be fixed.
> 
> OK. Let me compile the upstream codes on CentOS7 again.

Well, I see a potential problem even in the upstream, but it's only when CONFIG_LTO is set.  However, CONFIG_LTO isn't used any other places (or even set) in the upstream tree yet, so the issue must not happen there.

And yet, even if CONFIG_LTO is enabled, the first place to be fixed is rather in include/linux/init.h, not each code calling module_init() without a terminator semicolon.  There are lots of such codes in the tree, and calls of init/exit without semicolon are official ways.

Though, having semicolons looks nicer nowadays, so it'd make sense to add semicolons in the end.  If so, we may fix all of them in a shot by a script.


Takashi

> 
> -----邮件原件-----
> 发件人: Takashi Iwai [mailto:tiwai@suse.de]
> 发送时间: 2016年6月21日 17:54
> 收件人: 高峰 <fgao@ikuai8.com>
> 抄送: alsa-devel@alsa-project.org; perex@perex.cz; 
> linux-kernel@vger.kernel.org; gfree.wind@gmail.com
> 主题: Re: 答复: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
> 
> On Tue, 21 Jun 2016 11:35:39 +0200,
> 高峰 wrote:
> > 
> > I have sent the new commit with the compile errors.
> > Is it ok now?
> > 
> > BTW, I think the compile error is caused by that "subsys_initcall" statement losts the semicolon. 
> 
> Does this happen with the latest upstream kernel code at all...?
> 
> 
> Takashi
> 
> > 
> > -----邮件原件-----
> > 发件人: Takashi Iwai [mailto:tiwai@suse.de]
> > 发送时间: 2016年6月21日 17:20
> > 收件人: 高峰 <fgao@ikuai8.com>
> > 抄送: alsa-devel@alsa-project.org; perex@perex.cz; 
> > linux-kernel@vger.kernel.org; gfree.wind@gmail.com
> > 主题: Re: 答复: [PATCH 1/1] sound: Fix compile error of seq_device.c
> > 
> > On Tue, 21 Jun 2016 10:48:30 +0200,
> > 高峰 wrote:
> > > 
> > > The lastest CentOS7 platform, and the gcc version is gcc version
> > > 4.8.5
> > > 20150623 (Red Hat 4.8.5-4) (GCC).
> > > It could pass compilation after append the lost semicolon. 
> > > 
> > > from sound/core/seq/seq_device.c:39:
> > > include/linux/init.h:216:2: error: expected ‘,’ or ‘;’ before ‘static’
> > >   static exitcall_t __exitcall_##fn __exit_call = fn
> > >   ^
> > > include/linux/init.h:279:24: note: in expansion of macro ‘__exitcall’
> > >  #define module_exit(x) __exitcall(x);
> > >                         ^
> > > sound/core/seq/seq_device.c:315:1: note: in expansion of macro 
> > > ‘module_exit’
> > >  module_exit(alsa_seq_device_exit)  ^
> > > make[3]: *** [sound/core/seq/seq_device.o] Error 1
> > > make[2]: *** [sound/core/seq] Error 2
> > > make[1]: *** [sound/core] Error 2
> > > make: *** [sound] Error 2
> > 
> > It's a RH specific issue.  The upstream code has a different definition of module_init(), thus no such an error would occur.
> > 
> > Note that I'm fine to apply the patch, it's a trivial change.
> > But you need to give the clear reason why to apply it.  In this case, it's no fault of the upstream code.  But if it would make someone's life a bit easier, it's OK to apply such a change.
> > 
> > That being said, please resubmit the patch with a more explanation.
> > 
> > 
> > thanks,
> > 
> > Takashi
> > 
> > > 
> > > -----邮件原件-----
> > > 发件人: Takashi Iwai [mailto:tiwai@suse.de]
> > > 发送时间: 2016年6月21日 16:45
> > > 收件人: fgao@ikuai8.com
> > > 抄送: alsa-devel@alsa-project.org; perex@perex.cz; linux-kernel@vger.kernel.
> > > org; gfree.wind@gmail.com
> > > 主题: Re: [PATCH 1/1] sound: Fix compile error of seq_device.c
> > > 
> > > On Tue, 21 Jun 2016 10:34:25 +0200, <fgao@ikuai8.com> wrote:
> > > > 
> > > > From: Gao Feng <fgao@ikuai8.com>
> > > > 
> > > > Signed-off-by: Gao Feng <fgao@ikuai8.com>
> > > 
> > > What compile error did you get?
> > > 
> > > 
> > > Takashi
> > > 
> > > > ---
> > > >  sound/core/seq/seq_device.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/sound/core/seq/seq_device.c 
> > > > b/sound/core/seq/seq_device.c index c4acf17..4e859e4 100644
> > > > --- a/sound/core/seq/seq_device.c
> > > > +++ b/sound/core/seq/seq_device.c
> > > > @@ -311,5 +311,5 @@ static void __exit alsa_seq_device_exit(void)
> > > >  	bus_unregister(&snd_seq_bus_type);
> > > >  }
> > > >  
> > > > -subsys_initcall(alsa_seq_device_init)
> > > > -module_exit(alsa_seq_device_exit)
> > > > +subsys_initcall(alsa_seq_device_init);
> > > > +module_exit(alsa_seq_device_exit);
> > > > --
> > > > 1.9.1
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> 
> 
> 

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

end of thread, other threads:[~2016-06-21 11:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-21  8:34 [PATCH 1/1] sound: Fix compile error of seq_device.c fgao
2016-06-21  8:44 ` Takashi Iwai
     [not found]   ` <000901d1cb99$b0f36130$12da2390$@ikuai8.com>
2016-06-21  9:19     ` 答复: " Takashi Iwai
2016-06-21  9:35       ` 答复: " 高峰
2016-06-21  9:53         ` Takashi Iwai
2016-06-21  9:57           ` 答复: " 高峰
2016-06-21 10:04             ` Takashi Iwai
2016-06-21 10:11               ` 答复: " 高峰

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