mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] eeepc_laptop: Properly annote eeepc_enable_camera().
@ 2009-10-02  5:31 Rakib Mullick
  2009-10-02 13:35 ` Corentin Chary
  0 siblings, 1 reply; 3+ messages in thread
From: Rakib Mullick @ 2009-10-02  5:31 UTC (permalink / raw)
  To: acpi4asus-user, LKML, Andrew Morton; +Cc: corentincj

 Currenlty the annotation for function eeepc_enable_camera() is
__init, and refers to a function eeepc_hotk_add() which is non-init.
Use __devinit for both functions which is
 more appropriate and fixes a section mismatch warning.

 We were warned by the following warning:

  LD      drivers/platform/x86/built-in.o
WARNING: drivers/platform/x86/built-in.o(.text+0x12e1): Section
mismatch in reference from the function eeepc_hotk_add() to the
function .init.text:eeepc_enable_camera()
The function eeepc_hotk_add() references
the function __init eeepc_enable_camera().
This is often because eeepc_hotk_add lacks a __init
annotation or the annotation of eeepc_enable_camera is wrong.

----
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>

--- linus/drivers/platform/x86/eeepc-laptop.c	2009-09-28
12:05:21.000000000 +0600
+++ rakib/drivers/platform/x86/eeepc-laptop.c	2009-09-29
23:40:00.000000000 +0600
@@ -350,7 +350,7 @@ static const struct rfkill_ops eeepc_rfk
 	.set_block = eeepc_rfkill_set,
 };

-static void __init eeepc_enable_camera(void)
+static void __devinit eeepc_enable_camera(void)
 {
 	/*
 	 * If the following call to set_acpi() fails, it's because there's no
@@ -1189,7 +1189,7 @@ static int eeepc_input_init(struct devic
 	return 0;
 }

-static int eeepc_hotk_add(struct acpi_device *device)
+static int __devinit eeepc_hotk_add(struct acpi_device *device)
 {
 	struct device *dev;
 	int result;

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

* Re: [PATCH] eeepc_laptop: Properly annote eeepc_enable_camera().
  2009-10-02  5:31 [PATCH] eeepc_laptop: Properly annote eeepc_enable_camera() Rakib Mullick
@ 2009-10-02 13:35 ` Corentin Chary
  2009-10-03  6:23   ` Rakib Mullick
  0 siblings, 1 reply; 3+ messages in thread
From: Corentin Chary @ 2009-10-02 13:35 UTC (permalink / raw)
  To: Rakib Mullick; +Cc: acpi4asus-user, LKML, Andrew Morton

On Friday 02 October 2009 07:31:51 Rakib Mullick wrote:
>  Currenlty the annotation for function eeepc_enable_camera() is
> __init, and refers to a function eeepc_hotk_add() which is non-init.
> Use __devinit for both functions which is
>  more appropriate and fixes a section mismatch warning.
> 
>  We were warned by the following warning:
> 
>   LD      drivers/platform/x86/built-in.o
> WARNING: drivers/platform/x86/built-in.o(.text+0x12e1): Section
> mismatch in reference from the function eeepc_hotk_add() to the
> function .init.text:eeepc_enable_camera()
> The function eeepc_hotk_add() references
> the function __init eeepc_enable_camera().
> This is often because eeepc_hotk_add lacks a __init
> annotation or the annotation of eeepc_enable_camera is wrong.
> 
> ----
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
> 
> --- linus/drivers/platform/x86/eeepc-laptop.c	2009-09-28
> 12:05:21.000000000 +0600
> +++ rakib/drivers/platform/x86/eeepc-laptop.c	2009-09-29
> 23:40:00.000000000 +0600
> @@ -350,7 +350,7 @@ static const struct rfkill_ops eeepc_rfk
>  	.set_block = eeepc_rfkill_set,
>  };
> 
> -static void __init eeepc_enable_camera(void)
> +static void __devinit eeepc_enable_camera(void)
>  {
>  	/*
>  	 * If the following call to set_acpi() fails, it's because there's no
> @@ -1189,7 +1189,7 @@ static int eeepc_input_init(struct devic
>  	return 0;
>  }
> 
> -static int eeepc_hotk_add(struct acpi_device *device)
> +static int __devinit eeepc_hotk_add(struct acpi_device *device)
>  {
>  	struct device *dev;
>  	int result;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

Hi,
Your patch is broken, probably due to wordwrap.

$ git am /tmp/\[PATCH\]\ eeepc_laptop\:\ Properly\ annote\ eeepc_enable_camera\(\)
Applying: eeepc_laptop: Properly annote eeepc_enable_camera().
fatal: patch fragment without header at line 5: @@ -350,7 +350,7 @@ static const struct rfkill_ops eeepc_rfk
Patch failed at 0001 eeepc_laptop: Properly annote eeepc_enable_camera().

Please re-send it (you can use git send-emails).
Also, please name it eeepc-laptop, not eeepc_laptop
Thanks,

-- 
Corentin Chary
http://xf.iksaif.net

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

* Re: [PATCH] eeepc_laptop: Properly annote eeepc_enable_camera().
  2009-10-02 13:35 ` Corentin Chary
@ 2009-10-03  6:23   ` Rakib Mullick
  0 siblings, 0 replies; 3+ messages in thread
From: Rakib Mullick @ 2009-10-03  6:23 UTC (permalink / raw)
  To: Corentin Chary; +Cc: acpi4asus-user, LKML, Andrew Morton

On 10/2/09, Corentin Chary <corentincj@iksaif.net> wrote:
>  Hi,
>  Your patch is broken, probably due to wordwrap.

Hi Corentin, not sure how it got broken. On my system it applies well.
And this is the way I usually send patches.

>  $ git am /tmp/\[PATCH\]\ eeepc_laptop\:\ Properly\ annote\ eeepc_enable_camera\(\)
>  Applying: eeepc_laptop: Properly annote eeepc_enable_camera().
>  fatal: patch fragment without header at line 5: @@ -350,7 +350,7 @@ static const struct rfkill_ops eeepc_rfk
>  Patch failed at 0001 eeepc_laptop: Properly annote eeepc_enable_camera().
>
>  Please re-send it (you can use git send-emails).
Okay, I'm re-sending it.
>  Also, please name it eeepc-laptop, not eeepc_laptop
>  Thanks,

Thanks,
Rakib

>  --
>  Corentin Chary
>  http://xf.iksaif.net
>

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

end of thread, other threads:[~2009-10-03  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-02  5:31 [PATCH] eeepc_laptop: Properly annote eeepc_enable_camera() Rakib Mullick
2009-10-02 13:35 ` Corentin Chary
2009-10-03  6:23   ` Rakib Mullick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®