All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers: sfi: Include appropriate headers in sfi_acpi.c
@ 2013-12-17 12:32 Rashika Kheria
  2013-12-17 12:34 ` [PATCH 2/2] drivers: sfi: Mark functions as static in sfi_core.c Rashika Kheria
  2013-12-17 16:35 ` [PATCH 1/2] drivers: sfi: Include appropriate headers in sfi_acpi.c Josh Triplett
  0 siblings, 2 replies; 4+ messages in thread
From: Rashika Kheria @ 2013-12-17 12:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Len Brown, sfi-devel, josh

Include header file include/linux/sfi_acpi.h in sfi_acpi.c because
function sfi_acpi_table_parse() has its prototype declaration in
include/linux/sfi_acpi.h. Also, include include/linux/acpi.h because it
contains declarations necessary for include/linux/sfi_acpi.h.

This eliminates the following warning in sfi_acpi.c:
drivers/sfi/sfi_acpi.c:154:5: warning: no previous prototype for ‘sfi_acpi_table_parse’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/sfi/sfi_acpi.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/sfi/sfi_acpi.c b/drivers/sfi/sfi_acpi.c
index f5b4ca5..95023f9 100644
--- a/drivers/sfi/sfi_acpi.c
+++ b/drivers/sfi/sfi_acpi.c
@@ -60,6 +60,8 @@
 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
 
 #include <linux/kernel.h>
+#include <linux/acpi.h>
+#include <linux/sfi_acpi.h>
 #include <acpi/acpi.h>
 
 #include <linux/sfi.h>
-- 
1.7.9.5


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

* [PATCH 2/2] drivers: sfi: Mark functions as static in sfi_core.c
  2013-12-17 12:32 [PATCH 1/2] drivers: sfi: Include appropriate headers in sfi_acpi.c Rashika Kheria
@ 2013-12-17 12:34 ` Rashika Kheria
  2013-12-17 16:35   ` Josh Triplett
  2013-12-17 16:35 ` [PATCH 1/2] drivers: sfi: Include appropriate headers in sfi_acpi.c Josh Triplett
  1 sibling, 1 reply; 4+ messages in thread
From: Rashika Kheria @ 2013-12-17 12:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: Len Brown, sfi-devel, josh

Mark functions sfi_map_table() and sfi_unmap_table() as static in
sfi_core.c because they are not used outside this file.

This eliminates following warning in sfi_core.c:
drivers/sfi/sfi_core.c:164:26: warning: no previous prototype for ‘sfi_map_table’ [-Wmissing-prototypes]
drivers/sfi/sfi_core.c:192:6: warning: no previous prototype for ‘sfi_unmap_table’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/sfi/sfi_core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/sfi/sfi_core.c b/drivers/sfi/sfi_core.c
index 1e824fb..296db7a 100644
--- a/drivers/sfi/sfi_core.c
+++ b/drivers/sfi/sfi_core.c
@@ -161,7 +161,7 @@ static int sfi_verify_table(struct sfi_table_header *table)
  * Check for common case that we can re-use mapping to SYST,
  * which requires syst_pa, syst_va to be initialized.
  */
-struct sfi_table_header *sfi_map_table(u64 pa)
+static struct sfi_table_header *sfi_map_table(u64 pa)
 {
 	struct sfi_table_header *th;
 	u32 length;
@@ -189,7 +189,7 @@ struct sfi_table_header *sfi_map_table(u64 pa)
  * Undoes effect of sfi_map_table() by unmapping table
  * if it did not completely fit on same page as SYST.
  */
-void sfi_unmap_table(struct sfi_table_header *th)
+static void sfi_unmap_table(struct sfi_table_header *th)
 {
 	if (!TABLE_ON_PAGE(syst_va, th, th->len))
 		sfi_unmap_memory(th, TABLE_ON_PAGE(th, th, th->len) ?
-- 
1.7.9.5


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

* Re: [PATCH 1/2] drivers: sfi: Include appropriate headers in sfi_acpi.c
  2013-12-17 12:32 [PATCH 1/2] drivers: sfi: Include appropriate headers in sfi_acpi.c Rashika Kheria
  2013-12-17 12:34 ` [PATCH 2/2] drivers: sfi: Mark functions as static in sfi_core.c Rashika Kheria
@ 2013-12-17 16:35 ` Josh Triplett
  1 sibling, 0 replies; 4+ messages in thread
From: Josh Triplett @ 2013-12-17 16:35 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Len Brown, sfi-devel

On Tue, Dec 17, 2013 at 06:02:14PM +0530, Rashika Kheria wrote:
> Include header file include/linux/sfi_acpi.h in sfi_acpi.c because
> function sfi_acpi_table_parse() has its prototype declaration in
> include/linux/sfi_acpi.h. Also, include include/linux/acpi.h because it
> contains declarations necessary for include/linux/sfi_acpi.h.
> 
> This eliminates the following warning in sfi_acpi.c:
> drivers/sfi/sfi_acpi.c:154:5: warning: no previous prototype for ‘sfi_acpi_table_parse’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

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

>  drivers/sfi/sfi_acpi.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/sfi/sfi_acpi.c b/drivers/sfi/sfi_acpi.c
> index f5b4ca5..95023f9 100644
> --- a/drivers/sfi/sfi_acpi.c
> +++ b/drivers/sfi/sfi_acpi.c
> @@ -60,6 +60,8 @@
>  #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
>  
>  #include <linux/kernel.h>
> +#include <linux/acpi.h>
> +#include <linux/sfi_acpi.h>
>  #include <acpi/acpi.h>
>  
>  #include <linux/sfi.h>
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 2/2] drivers: sfi: Mark functions as static in sfi_core.c
  2013-12-17 12:34 ` [PATCH 2/2] drivers: sfi: Mark functions as static in sfi_core.c Rashika Kheria
@ 2013-12-17 16:35   ` Josh Triplett
  0 siblings, 0 replies; 4+ messages in thread
From: Josh Triplett @ 2013-12-17 16:35 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Len Brown, sfi-devel

On Tue, Dec 17, 2013 at 06:04:50PM +0530, Rashika Kheria wrote:
> Mark functions sfi_map_table() and sfi_unmap_table() as static in
> sfi_core.c because they are not used outside this file.
> 
> This eliminates following warning in sfi_core.c:
> drivers/sfi/sfi_core.c:164:26: warning: no previous prototype for ‘sfi_map_table’ [-Wmissing-prototypes]
> drivers/sfi/sfi_core.c:192:6: warning: no previous prototype for ‘sfi_unmap_table’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

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

>  drivers/sfi/sfi_core.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/sfi/sfi_core.c b/drivers/sfi/sfi_core.c
> index 1e824fb..296db7a 100644
> --- a/drivers/sfi/sfi_core.c
> +++ b/drivers/sfi/sfi_core.c
> @@ -161,7 +161,7 @@ static int sfi_verify_table(struct sfi_table_header *table)
>   * Check for common case that we can re-use mapping to SYST,
>   * which requires syst_pa, syst_va to be initialized.
>   */
> -struct sfi_table_header *sfi_map_table(u64 pa)
> +static struct sfi_table_header *sfi_map_table(u64 pa)
>  {
>  	struct sfi_table_header *th;
>  	u32 length;
> @@ -189,7 +189,7 @@ struct sfi_table_header *sfi_map_table(u64 pa)
>   * Undoes effect of sfi_map_table() by unmapping table
>   * if it did not completely fit on same page as SYST.
>   */
> -void sfi_unmap_table(struct sfi_table_header *th)
> +static void sfi_unmap_table(struct sfi_table_header *th)
>  {
>  	if (!TABLE_ON_PAGE(syst_va, th, th->len))
>  		sfi_unmap_memory(th, TABLE_ON_PAGE(th, th, th->len) ?
> -- 
> 1.7.9.5
> 

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-17 12:32 [PATCH 1/2] drivers: sfi: Include appropriate headers in sfi_acpi.c Rashika Kheria
2013-12-17 12:34 ` [PATCH 2/2] drivers: sfi: Mark functions as static in sfi_core.c Rashika Kheria
2013-12-17 16:35   ` Josh Triplett
2013-12-17 16:35 ` [PATCH 1/2] drivers: sfi: Include appropriate headers in sfi_acpi.c Josh Triplett

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.