All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] x86: include: asm: Fix build warning
@ 2015-09-29 15:30 Ksenija Stanojevic
  2015-09-29 15:47 ` [Outreachy kernel] " Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Ksenija Stanojevic @ 2015-09-29 15:30 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Ksenija Stanojevic

Fix build warnings:
error: implicit declaration of function ‘olpc_board_at_least’
[-Werror=implicit-function-declaration]

 error: implicit declaration of function ‘olpc_board’
[-Werror=implicit-function-declaration]

in files:
drivers/power/olpc_battery.c
drivers/input/mouse/hgpk.c
drivers/staging/olpc_dcon/olpc_dcon.c
arch/x86/platform/olpc/olpc.c
sound/pci/cs5535audio/cs5535audio_olpc.c
---
Hi,

I know that Greg doesn't accept patches outside staging.
I got some build warnings when working on driver olpc_dcon/olpc_dcon.c
and I'm sending this patch here for a review, bc I'm not sure if it's good.

Thanks,
Ksenija
 arch/x86/include/asm/olpc.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/x86/include/asm/olpc.h b/arch/x86/include/asm/olpc.h
index 72f9adf6..7245efd 100644
--- a/arch/x86/include/asm/olpc.h
+++ b/arch/x86/include/asm/olpc.h
@@ -72,6 +72,11 @@ extern int olpc_ec_sci_query(u16 *sci_value);
 
 #else
 
+static inline uint32_t olpc_board(uint8_t id)
+{
+	return 0;
+}
+
 static inline int machine_is_olpc(void)
 {
 	return 0;
@@ -82,6 +87,11 @@ static inline int olpc_has_dcon(void)
 	return 0;
 }
 
+static inline int olpc_board_at_least(uint32_t rev)
+{
+	return -ENODEV;
+}
+
 static inline void olpc_ec_wakeup_set(u16 value) { }
 static inline void olpc_ec_wakeup_clear(u16 value) { }
 
-- 
1.9.1



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

* Re: [Outreachy kernel] [RFC] x86: include: asm: Fix build warning
  2015-09-29 15:30 [RFC] x86: include: asm: Fix build warning Ksenija Stanojevic
@ 2015-09-29 15:47 ` Arnd Bergmann
  2015-09-29 15:49   ` Ksenija Stanojević
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2015-09-29 15:47 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Ksenija Stanojevic

On Tuesday 29 September 2015 17:30:59 Ksenija Stanojevic wrote:
> Fix build warnings:
> error: implicit declaration of function ‘olpc_board_at_least’
> [-Werror=implicit-function-declaration]
> 
>  error: implicit declaration of function ‘olpc_board’
> [-Werror=implicit-function-declaration]
> 
> in files:
> drivers/power/olpc_battery.c
> drivers/input/mouse/hgpk.c
> drivers/staging/olpc_dcon/olpc_dcon.c
> arch/x86/platform/olpc/olpc.c
> sound/pci/cs5535audio/cs5535audio_olpc.c
> 

The patch looks good to me in principle, except that it is missing
a 'Signed-off-by' line, and a somewhat inaccurate return code:

> +static inline int olpc_board_at_least(uint32_t rev)
> +{
> +       return -ENODEV;
> +}

The original function returns either 0 or 1, and so should this version.
Returning 0 probably makes more sense here.

With those two things changed, you could send the patch to the x86
architecture maintainers and the people that last touched
arch/x86/platform/olpc/olpc.c.

	Arnd


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

* Re: [Outreachy kernel] [RFC] x86: include: asm: Fix build warning
  2015-09-29 15:47 ` [Outreachy kernel] " Arnd Bergmann
@ 2015-09-29 15:49   ` Ksenija Stanojević
  0 siblings, 0 replies; 3+ messages in thread
From: Ksenija Stanojević @ 2015-09-29 15:49 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: outreachy-kernel

On Tue, Sep 29, 2015 at 5:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 29 September 2015 17:30:59 Ksenija Stanojevic wrote:
>> Fix build warnings:
>> error: implicit declaration of function ‘olpc_board_at_least’
>> [-Werror=implicit-function-declaration]
>>
>>  error: implicit declaration of function ‘olpc_board’
>> [-Werror=implicit-function-declaration]
>>
>> in files:
>> drivers/power/olpc_battery.c
>> drivers/input/mouse/hgpk.c
>> drivers/staging/olpc_dcon/olpc_dcon.c
>> arch/x86/platform/olpc/olpc.c
>> sound/pci/cs5535audio/cs5535audio_olpc.c
>>
>
> The patch looks good to me in principle, except that it is missing
> a 'Signed-off-by' line, and a somewhat inaccurate return code:

Oops, I forgot it.

>> +static inline int olpc_board_at_least(uint32_t rev)
>> +{
>> +       return -ENODEV;
>> +}
>
> The original function returns either 0 or 1, and so should this version.
> Returning 0 probably makes more sense here.
>
> With those two things changed, you could send the patch to the x86
> architecture maintainers and the people that last touched
> arch/x86/platform/olpc/olpc.c.
>

Thanks!

>         Arnd


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

end of thread, other threads:[~2015-09-29 15:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-29 15:30 [RFC] x86: include: asm: Fix build warning Ksenija Stanojevic
2015-09-29 15:47 ` [Outreachy kernel] " Arnd Bergmann
2015-09-29 15:49   ` Ksenija Stanojević

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.