public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c
@ 2013-12-13  7:26 Rashika Kheria
  2013-12-13  7:29 ` [PATCH 2/2] drivers: platform: Include appropriate header file in mxm-wmi.c Rashika Kheria
  2013-12-13  8:58 ` [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c Josh Triplett
  0 siblings, 2 replies; 5+ messages in thread
From: Rashika Kheria @ 2013-12-13  7:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Eric Piel, Matthew Garrett, platform-driver-x86, josh

This patch marks the functions lis3lv02d_acpi_init(),
lis3lv02d_acpi_read() and lis3lv02d_acpi_write() as static in
x86/hp_accel.c because they are not used outside this file.

Thus, it also eliminates the following warnings in x86/hp_accel.c:
drivers/platform/x86/hp_accel.c:91:5: warning: no previous prototype for ‘lis3lv02d_acpi_init’ [-Wmissing-prototypes]
drivers/platform/x86/hp_accel.c:109:5: warning: no previous prototype for ‘lis3lv02d_acpi_read’ [-Wmissing-prototypes]
drivers/platform/x86/hp_accel.c:132:5: warning: no previous prototype for ‘lis3lv02d_acpi_write’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/platform/x86/hp_accel.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c
index a8e43cf..01b619e 100644
--- a/drivers/platform/x86/hp_accel.c
+++ b/drivers/platform/x86/hp_accel.c
@@ -88,7 +88,7 @@ MODULE_DEVICE_TABLE(acpi, lis3lv02d_device_ids);
  *
  * Returns 0 on success.
  */
-int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
+static int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
 {
 	struct acpi_device *dev = lis3->bus_priv;
 	if (acpi_evaluate_object(dev->handle, METHOD_NAME__INI,
@@ -106,7 +106,7 @@ int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
  *
  * Returns 0 on success.
  */
-int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
+static int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
 {
 	struct acpi_device *dev = lis3->bus_priv;
 	union acpi_object arg0 = { ACPI_TYPE_INTEGER };
@@ -129,7 +129,7 @@ int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
  *
  * Returns 0 on success.
  */
-int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)
+static int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)
 {
 	struct acpi_device *dev = lis3->bus_priv;
 	unsigned long long ret; /* Not used when writting */
-- 
1.7.9.5


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

* [PATCH 2/2] drivers: platform: Include appropriate header file in mxm-wmi.c
  2013-12-13  7:26 [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c Rashika Kheria
@ 2013-12-13  7:29 ` Rashika Kheria
  2013-12-13  8:59   ` Josh Triplett
  2013-12-13  8:58 ` [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c Josh Triplett
  1 sibling, 1 reply; 5+ messages in thread
From: Rashika Kheria @ 2013-12-13  7:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: josh, Matthew Garrett, platform-driver-x86

This patch includes appropriate header file linux/mxm-wmi.h in
x86/mxm-wmi.c because functions mxm_wmi_call_mxds(), mxm_wmi_call_mxmx()
and mxm_wmi_supported() have their prototype declaration in
linux/mxm-wmi.h.

Thus, it also eliminates the following warnings in x86/mxm-wmi.c:
drivers/platform/x86/mxm-wmi.c:43:5: warning: no previous prototype for ‘mxm_wmi_call_mxds’ [-Wmissing-prototypes]
drivers/platform/x86/mxm-wmi.c:68:5: warning: no previous prototype for ‘mxm_wmi_call_mxmx’ [-Wmissing-prototypes]
drivers/platform/x86/mxm-wmi.c:93:6: warning: no previous prototype for ‘mxm_wmi_supported’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/platform/x86/mxm-wmi.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/mxm-wmi.c b/drivers/platform/x86/mxm-wmi.c
index 0aea63b..7503d2b 100644
--- a/drivers/platform/x86/mxm-wmi.c
+++ b/drivers/platform/x86/mxm-wmi.c
@@ -20,6 +20,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/mxm-wmi.h>
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
-- 
1.7.9.5


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

* Re: [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c
  2013-12-13  7:26 [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c Rashika Kheria
  2013-12-13  7:29 ` [PATCH 2/2] drivers: platform: Include appropriate header file in mxm-wmi.c Rashika Kheria
@ 2013-12-13  8:58 ` Josh Triplett
  2013-12-13 22:34   ` Éric Piel
  1 sibling, 1 reply; 5+ messages in thread
From: Josh Triplett @ 2013-12-13  8:58 UTC (permalink / raw)
  To: Rashika Kheria
  Cc: linux-kernel, Eric Piel, Matthew Garrett, platform-driver-x86

On Fri, Dec 13, 2013 at 12:56:34PM +0530, Rashika Kheria wrote:
> This patch marks the functions lis3lv02d_acpi_init(),
> lis3lv02d_acpi_read() and lis3lv02d_acpi_write() as static in
> x86/hp_accel.c because they are not used outside this file.
> 
> Thus, it also eliminates the following warnings in x86/hp_accel.c:
> drivers/platform/x86/hp_accel.c:91:5: warning: no previous prototype for ‘lis3lv02d_acpi_init’ [-Wmissing-prototypes]
> drivers/platform/x86/hp_accel.c:109:5: warning: no previous prototype for ‘lis3lv02d_acpi_read’ [-Wmissing-prototypes]
> drivers/platform/x86/hp_accel.c:132:5: warning: no previous prototype for ‘lis3lv02d_acpi_write’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/platform/x86/hp_accel.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c
> index a8e43cf..01b619e 100644
> --- a/drivers/platform/x86/hp_accel.c
> +++ b/drivers/platform/x86/hp_accel.c
> @@ -88,7 +88,7 @@ MODULE_DEVICE_TABLE(acpi, lis3lv02d_device_ids);
>   *
>   * Returns 0 on success.
>   */
> -int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
> +static int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
>  {
>  	struct acpi_device *dev = lis3->bus_priv;
>  	if (acpi_evaluate_object(dev->handle, METHOD_NAME__INI,
> @@ -106,7 +106,7 @@ int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
>   *
>   * Returns 0 on success.
>   */
> -int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
> +static int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
>  {
>  	struct acpi_device *dev = lis3->bus_priv;
>  	union acpi_object arg0 = { ACPI_TYPE_INTEGER };
> @@ -129,7 +129,7 @@ int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
>   *
>   * Returns 0 on success.
>   */
> -int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)
> +static int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)
>  {
>  	struct acpi_device *dev = lis3->bus_priv;
>  	unsigned long long ret; /* Not used when writting */
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 2/2] drivers: platform: Include appropriate header file in mxm-wmi.c
  2013-12-13  7:29 ` [PATCH 2/2] drivers: platform: Include appropriate header file in mxm-wmi.c Rashika Kheria
@ 2013-12-13  8:59   ` Josh Triplett
  0 siblings, 0 replies; 5+ messages in thread
From: Josh Triplett @ 2013-12-13  8:59 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Matthew Garrett, platform-driver-x86

On Fri, Dec 13, 2013 at 12:59:52PM +0530, Rashika Kheria wrote:
> This patch includes appropriate header file linux/mxm-wmi.h in
> x86/mxm-wmi.c because functions mxm_wmi_call_mxds(), mxm_wmi_call_mxmx()
> and mxm_wmi_supported() have their prototype declaration in
> linux/mxm-wmi.h.
> 
> Thus, it also eliminates the following warnings in x86/mxm-wmi.c:
> drivers/platform/x86/mxm-wmi.c:43:5: warning: no previous prototype for ‘mxm_wmi_call_mxds’ [-Wmissing-prototypes]
> drivers/platform/x86/mxm-wmi.c:68:5: warning: no previous prototype for ‘mxm_wmi_call_mxmx’ [-Wmissing-prototypes]
> drivers/platform/x86/mxm-wmi.c:93:6: warning: no previous prototype for ‘mxm_wmi_supported’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/platform/x86/mxm-wmi.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/mxm-wmi.c b/drivers/platform/x86/mxm-wmi.c
> index 0aea63b..7503d2b 100644
> --- a/drivers/platform/x86/mxm-wmi.c
> +++ b/drivers/platform/x86/mxm-wmi.c
> @@ -20,6 +20,7 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
> +#include <linux/mxm-wmi.h>
>  #include <acpi/acpi_bus.h>
>  #include <acpi/acpi_drivers.h>
>  
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c
  2013-12-13  8:58 ` [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c Josh Triplett
@ 2013-12-13 22:34   ` Éric Piel
  0 siblings, 0 replies; 5+ messages in thread
From: Éric Piel @ 2013-12-13 22:34 UTC (permalink / raw)
  To: Rashika Kheria, Matthew Garrett
  Cc: Josh Triplett, linux-kernel, platform-driver-x86

On 13-12-13 09:58, Josh Triplett wrote:
> On Fri, Dec 13, 2013 at 12:56:34PM +0530, Rashika Kheria wrote:
>> This patch marks the functions lis3lv02d_acpi_init(),
>> lis3lv02d_acpi_read() and lis3lv02d_acpi_write() as static in
>> x86/hp_accel.c because they are not used outside this file.
>>
>> Thus, it also eliminates the following warnings in x86/hp_accel.c:
>> drivers/platform/x86/hp_accel.c:91:5: warning: no previous prototype for ‘lis3lv02d_acpi_init’ [-Wmissing-prototypes]
>> drivers/platform/x86/hp_accel.c:109:5: warning: no previous prototype for ‘lis3lv02d_acpi_read’ [-Wmissing-prototypes]
>> drivers/platform/x86/hp_accel.c:132:5: warning: no previous prototype for ‘lis3lv02d_acpi_write’ [-Wmissing-prototypes]
>>
>> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Yes, looks fine.

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>

Matthew, could you pick this patch up in the platform-driver-x86 branch?

Cheers,
Éric
>
>>   drivers/platform/x86/hp_accel.c |    6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c
>> index a8e43cf..01b619e 100644
>> --- a/drivers/platform/x86/hp_accel.c
>> +++ b/drivers/platform/x86/hp_accel.c
>> @@ -88,7 +88,7 @@ MODULE_DEVICE_TABLE(acpi, lis3lv02d_device_ids);
>>    *
>>    * Returns 0 on success.
>>    */
>> -int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
>> +static int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
>>   {
>>   	struct acpi_device *dev = lis3->bus_priv;
>>   	if (acpi_evaluate_object(dev->handle, METHOD_NAME__INI,
>> @@ -106,7 +106,7 @@ int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
>>    *
>>    * Returns 0 on success.
>>    */
>> -int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
>> +static int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
>>   {
>>   	struct acpi_device *dev = lis3->bus_priv;
>>   	union acpi_object arg0 = { ACPI_TYPE_INTEGER };
>> @@ -129,7 +129,7 @@ int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
>>    *
>>    * Returns 0 on success.
>>    */
>> -int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)
>> +static int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)
>>   {
>>   	struct acpi_device *dev = lis3->bus_priv;
>>   	unsigned long long ret; /* Not used when writting */
>> --
>> 1.7.9.5
>>


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

end of thread, other threads:[~2013-12-13 22:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13  7:26 [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c Rashika Kheria
2013-12-13  7:29 ` [PATCH 2/2] drivers: platform: Include appropriate header file in mxm-wmi.c Rashika Kheria
2013-12-13  8:59   ` Josh Triplett
2013-12-13  8:58 ` [PATCH 1/2] drivers: platform: Mark functions as static in hp_accel.c Josh Triplett
2013-12-13 22:34   ` Éric Piel

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