kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] x86: platform: mrst: check platform_device_register() return code
@ 2010-11-18 18:16 Vasiliy Kulikov
  2010-11-18 18:18 ` [PATCH 1/4] x86: platform: mrst: check Alan Cox
  2010-11-18 20:19 ` [PATCH 1/4] x86: platform: mrst: check Alan Cox
  0 siblings, 2 replies; 6+ messages in thread
From: Vasiliy Kulikov @ 2010-11-18 18:16 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Feng Tang,
	Alan Cox, Arjan van de Ven, Jacob Pan, linux-kernel

platform_device_register() may fail, if so propagate the return
code from mrst_device_create().

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
 I cannot compile this driver in next-20101117, so it is not tested at all.

 arch/x86/platform/mrst/vrtc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/x86/platform/mrst/vrtc.c b/arch/x86/platform/mrst/vrtc.c
index 4d3f770..32cd7ed 100644
--- a/arch/x86/platform/mrst/vrtc.c
+++ b/arch/x86/platform/mrst/vrtc.c
@@ -159,8 +159,7 @@ static int __init mrst_device_create(void)
 	vrtc_resources[1].start = sfi_mrtc_array[0].irq;
 	vrtc_resources[1].end = sfi_mrtc_array[0].irq;
 
-	platform_device_register(&vrtc_device);
-	return 0;
+	return platform_device_register(&vrtc_device);
 }
 
 module_init(mrst_device_create);
-- 
1.7.0.4


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

* Re: [PATCH 1/4] x86: platform: mrst: check
  2010-11-18 18:16 [PATCH 1/4] x86: platform: mrst: check platform_device_register() return code Vasiliy Kulikov
@ 2010-11-18 18:18 ` Alan Cox
  2010-11-18 18:44   ` Vasiliy Kulikov
  2010-11-18 20:19 ` [PATCH 1/4] x86: platform: mrst: check Alan Cox
  1 sibling, 1 reply; 6+ messages in thread
From: Alan Cox @ 2010-11-18 18:18 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Feng Tang, Arjan van de Ven, Jacob Pan, linux-kernel

>  I cannot compile this driver in next-20101117, so it is not tested
> at all.

Compile or test - if it bombs out compiling for you please send me (off
list the .config that fails so I can fix that

Otherwise NAK the patch because it needs to do the cleanup but thanks
for finding the bug - you've done the hard 99%

Alan

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

* Re: [PATCH 1/4] x86: platform: mrst: check
  2010-11-18 18:18 ` [PATCH 1/4] x86: platform: mrst: check Alan Cox
@ 2010-11-18 18:44   ` Vasiliy Kulikov
  2010-11-18 20:18     ` Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Vasiliy Kulikov @ 2010-11-18 18:44 UTC (permalink / raw)
  To: Alan Cox
  Cc: kernel-janitors, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Feng Tang, Arjan van de Ven, Jacob Pan, linux-kernel

On Thu, Nov 18, 2010 at 18:18 +0000, Alan Cox wrote:
> >  I cannot compile this driver in next-20101117, so it is not tested
> > at all.
> 
> Compile or test - if it bombs out compiling for you please send me (off
> list the .config that fails so I can fix that
> 
> Otherwise NAK the patch because it needs to do the cleanup but thanks
> for finding the bug - you've done the hard 99%

make -C /home/vasya/linux arch/x86/platform/mrst/vrtc.o
make: Entering directory `/home/vasya/dev/linux-next'
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CC      arch/x86/platform/mrst/vrtc.o
arch/x86/platform/mrst/vrtc.c: In function 'mrst_rtc_init':
arch/x86/platform/mrst/vrtc.c:113: error: 'FIX_LNW_VRTC' undeclared (first use in this function)
arch/x86/platform/mrst/vrtc.c:113: error: (Each undeclared identifier is reported only once
arch/x86/platform/mrst/vrtc.c:113: error: for each function it appears in.)
make[1]: *** [arch/x86/platform/mrst/vrtc.o] Error 1

Both with allyesconfig and allmodconfig, x86_64.

These are not patched lines, though.


Thanks,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

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

* Re: [PATCH 1/4] x86: platform: mrst: check
  2010-11-18 18:44   ` Vasiliy Kulikov
@ 2010-11-18 20:18     ` Alan Cox
  2010-11-18 21:27       ` [PATCH 1/4] x86: platform: mrst: check platform_device_register() Thomas Gleixner
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2010-11-18 20:18 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Feng Tang, Arjan van de Ven, Jacob Pan, linux-kernel

On Thu, 18 Nov 2010 21:44:21 +0300
Vasiliy Kulikov <segoon@openwall.com> wrote:

> On Thu, Nov 18, 2010 at 18:18 +0000, Alan Cox wrote:
> > >  I cannot compile this driver in next-20101117, so it is not
> > > tested at all.
> > 
> > Compile or test - if it bombs out compiling for you please send me
> > (off list the .config that fails so I can fix that
> > 
> > Otherwise NAK the patch because it needs to do the cleanup but
> > thanks for finding the bug - you've done the hard 99%
> 
> make -C /home/vasya/linux arch/x86/platform/mrst/vrtc.o
> make: Entering directory `/home/vasya/dev/linux-next'
>   CHK     include/linux/version.h
>   CHK     include/generated/utsrelease.h
>   CALL    scripts/checksyscalls.sh
>   CC      arch/x86/platform/mrst/vrtc.o
> arch/x86/platform/mrst/vrtc.c: In function 'mrst_rtc_init':
> arch/x86/platform/mrst/vrtc.c:113: error: 'FIX_LNW_VRTC' undeclared
> (first use in this function) arch/x86/platform/mrst/vrtc.c:113:
> error: (Each undeclared identifier is reported only once
> arch/x86/platform/mrst/vrtc.c:113: error: for each function it
> appears in.) make[1]: *** [arch/x86/platform/mrst/vrtc.o] Error 1
> 
> Both with allyesconfig and allmodconfig, x86_64.

I can't duplicate this.

It's defined if CONFIG_X86_MRST is defined, and the file in question is
only compiled if CONFIG_X86_MRST is defined




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

* Re: [PATCH 1/4] x86: platform: mrst: check
  2010-11-18 18:16 [PATCH 1/4] x86: platform: mrst: check platform_device_register() return code Vasiliy Kulikov
  2010-11-18 18:18 ` [PATCH 1/4] x86: platform: mrst: check Alan Cox
@ 2010-11-18 20:19 ` Alan Cox
  1 sibling, 0 replies; 6+ messages in thread
From: Alan Cox @ 2010-11-18 20:19 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Feng Tang, Arjan van de Ven, Jacob Pan, linux-kernel

On Thu, 18 Nov 2010 21:16:45 +0300
Vasiliy Kulikov <segoon@openwall.com> wrote:

> platform_device_register() may fail, if so propagate the return
> code from mrst_device_create().
> 
> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>

Signed-off-by: Alan Cox <alan@linux.intel.com>

On further inspection this fix is actually correct as the other
cleanup got moved to the arch/x86 driver.

Alan

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

* Re: [PATCH 1/4] x86: platform: mrst: check platform_device_register()
  2010-11-18 20:18     ` Alan Cox
@ 2010-11-18 21:27       ` Thomas Gleixner
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Gleixner @ 2010-11-18 21:27 UTC (permalink / raw)
  To: Alan Cox
  Cc: Vasiliy Kulikov, kernel-janitors, Ingo Molnar, H. Peter Anvin,
	x86, Feng Tang, Arjan van de Ven, Jacob Pan, linux-kernel

On Thu, 18 Nov 2010, Alan Cox wrote:
> On Thu, 18 Nov 2010 21:44:21 +0300
> Vasiliy Kulikov <segoon@openwall.com> wrote:
> 
> > On Thu, Nov 18, 2010 at 18:18 +0000, Alan Cox wrote:
> > > >  I cannot compile this driver in next-20101117, so it is not
> > > > tested at all.
> > > 
> > > Compile or test - if it bombs out compiling for you please send me
> > > (off list the .config that fails so I can fix that
> > > 
> > > Otherwise NAK the patch because it needs to do the cleanup but
> > > thanks for finding the bug - you've done the hard 99%
> > 
> > make -C /home/vasya/linux arch/x86/platform/mrst/vrtc.o
> > make: Entering directory `/home/vasya/dev/linux-next'
> >   CHK     include/linux/version.h
> >   CHK     include/generated/utsrelease.h
> >   CALL    scripts/checksyscalls.sh
> >   CC      arch/x86/platform/mrst/vrtc.o
> > arch/x86/platform/mrst/vrtc.c: In function 'mrst_rtc_init':
> > arch/x86/platform/mrst/vrtc.c:113: error: 'FIX_LNW_VRTC' undeclared
> > (first use in this function) arch/x86/platform/mrst/vrtc.c:113:
> > error: (Each undeclared identifier is reported only once
> > arch/x86/platform/mrst/vrtc.c:113: error: for each function it
> > appears in.) make[1]: *** [arch/x86/platform/mrst/vrtc.o] Error 1
> > 
> > Both with allyesconfig and allmodconfig, x86_64.
> 
> I can't duplicate this.
> 
> It's defined if CONFIG_X86_MRST is defined, and the file in question is
> only compiled if CONFIG_X86_MRST is defined

Of course you can't duplicate this:

> > make -C /home/vasya/linux arch/x86/platform/mrst/vrtc.o

Vasiliy forced a manual compile of that file with a 64bit config which has
CONFIG_X86_MRST=n. That's PEBKAC not a build failure :)

Thanks,

	tglx

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

end of thread, other threads:[~2010-11-18 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18 18:16 [PATCH 1/4] x86: platform: mrst: check platform_device_register() return code Vasiliy Kulikov
2010-11-18 18:18 ` [PATCH 1/4] x86: platform: mrst: check Alan Cox
2010-11-18 18:44   ` Vasiliy Kulikov
2010-11-18 20:18     ` Alan Cox
2010-11-18 21:27       ` [PATCH 1/4] x86: platform: mrst: check platform_device_register() Thomas Gleixner
2010-11-18 20:19 ` [PATCH 1/4] x86: platform: mrst: check Alan Cox

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