public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c
@ 2013-12-14 13:58 Rashika Kheria
  2013-12-14 14:00 ` [PATCH 2/3] drivers: edac: Mark the function edac_create_debug_nodes() as static in edac_mc_sysfs.c Rashika Kheria
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Rashika Kheria @ 2013-12-14 13:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: Doug Thompson, Borislav Petkov, linux-edac, josh

This patch marks the function amd64_decode_bus_error() as static in
amd64_edac.c because it is not used outside this file.

Thus, it also eliminates the following warning in amd64_edac.c:
drivers/edac/amd64_edac.c:2038:6: warning: no previous prototype for ‘amd64_decode_bus_error’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/edac/amd64_edac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index b53d0de..52b34ea 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2035,7 +2035,7 @@ static inline void __amd64_decode_bus_error(struct mem_ctl_info *mci,
 	__log_bus_error(mci, &err, ecc_type);
 }
 
-void amd64_decode_bus_error(int node_id, struct mce *m)
+static void amd64_decode_bus_error(int node_id, struct mce *m)
 {
 	__amd64_decode_bus_error(mcis[node_id], m);
 }
-- 
1.7.9.5


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

* [PATCH 2/3] drivers: edac: Mark the function edac_create_debug_nodes() as static in edac_mc_sysfs.c
  2013-12-14 13:58 [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c Rashika Kheria
@ 2013-12-14 14:00 ` Rashika Kheria
  2013-12-14 20:28   ` Josh Triplett
  2013-12-14 14:02 ` [PATCH 3/3] drivers: edac: Mark the function get_mci_for_node_id() as static in sb_edac.c Rashika Kheria
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Rashika Kheria @ 2013-12-14 14:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: Doug Thompson, linux-edac, josh

This patch marks the function edac_create_debug_nodes() as static in
edac_mc_sysfs.c because it is not used outside this file.

Thus, it also eliminates the following warning in edac_mc_sysfs.c:
drivers/edac/edac_mc_sysfs.c:917:5: warning: no previous prototype for ‘edac_create_debug_nodes’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/edac/edac_mc_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 9f7e0e60..51c0362 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -914,7 +914,7 @@ void __exit edac_debugfs_exit(void)
 	debugfs_remove(edac_debugfs);
 }
 
-int edac_create_debug_nodes(struct mem_ctl_info *mci)
+static int edac_create_debug_nodes(struct mem_ctl_info *mci)
 {
 	struct dentry *d, *parent;
 	char name[80];
-- 
1.7.9.5


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

* [PATCH 3/3] drivers: edac: Mark the function get_mci_for_node_id() as static in sb_edac.c
  2013-12-14 13:58 [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c Rashika Kheria
  2013-12-14 14:00 ` [PATCH 2/3] drivers: edac: Mark the function edac_create_debug_nodes() as static in edac_mc_sysfs.c Rashika Kheria
@ 2013-12-14 14:02 ` Rashika Kheria
  2013-12-14 20:28   ` Josh Triplett
  2013-12-14 17:01 ` [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c Borislav Petkov
  2013-12-14 20:28 ` Josh Triplett
  3 siblings, 1 reply; 12+ messages in thread
From: Rashika Kheria @ 2013-12-14 14:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mauro Carvalho Chehab, Doug Thompson, linux-edac, josh

This patch marks the function get_mci_for_node_id() as static in
sb_edac.c because it is not used outside this file.

Thus, it also eliminates the following warning in sb_edac.c:
drivers/edac/sb_edac.c:918:22: warning: no previous prototype for ‘get_mci_for_node_id’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/edac/sb_edac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 8472405..a8845a3 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -915,7 +915,7 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
 	}
 }
 
-struct mem_ctl_info *get_mci_for_node_id(u8 node_id)
+static struct mem_ctl_info *get_mci_for_node_id(u8 node_id)
 {
 	struct sbridge_dev *sbridge_dev;
 
-- 
1.7.9.5


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

* Re: [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c
  2013-12-14 13:58 [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c Rashika Kheria
  2013-12-14 14:00 ` [PATCH 2/3] drivers: edac: Mark the function edac_create_debug_nodes() as static in edac_mc_sysfs.c Rashika Kheria
  2013-12-14 14:02 ` [PATCH 3/3] drivers: edac: Mark the function get_mci_for_node_id() as static in sb_edac.c Rashika Kheria
@ 2013-12-14 17:01 ` Borislav Petkov
  2013-12-14 18:17   ` Rashika Kheria
  2013-12-14 20:28 ` Josh Triplett
  3 siblings, 1 reply; 12+ messages in thread
From: Borislav Petkov @ 2013-12-14 17:01 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Doug Thompson, linux-edac, josh

On Sat, Dec 14, 2013 at 07:28:24PM +0530, Rashika Kheria wrote:
> This patch marks the function amd64_decode_bus_error() as static in
> amd64_edac.c because it is not used outside this file.
> 
> Thus, it also eliminates the following warning in amd64_edac.c:
> drivers/edac/amd64_edac.c:2038:6: warning: no previous prototype for ‘amd64_decode_bus_error’ [-Wmissing-prototypes]

How do you trigger this? .config and output of

gcc --version

please.

I've never seen this warning before.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c
  2013-12-14 17:01 ` [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c Borislav Petkov
@ 2013-12-14 18:17   ` Rashika Kheria
  2013-12-14 20:42     ` Borislav Petkov
  0 siblings, 1 reply; 12+ messages in thread
From: Rashika Kheria @ 2013-12-14 18:17 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: Linux-Kernel, Doug Thompson, linux-edac, Josh Triplett

On Sat, Dec 14, 2013 at 10:31 PM, Borislav Petkov <bp@alien8.de> wrote:
> On Sat, Dec 14, 2013 at 07:28:24PM +0530, Rashika Kheria wrote:
>> This patch marks the function amd64_decode_bus_error() as static in
>> amd64_edac.c because it is not used outside this file.
>>
>> Thus, it also eliminates the following warning in amd64_edac.c:
>> drivers/edac/amd64_edac.c:2038:6: warning: no previous prototype for ‘amd64_decode_bus_error’ [-Wmissing-prototypes]
>
> How do you trigger this? .config and output of
>
> gcc --version
>
> please.
>
> I've never seen this warning before.
>
> --
> Regards/Gruss,
>     Boris.
>

Hi Borislav,

My gcc version is 4.6.3. You can trigger these warnings by adding
-Wmissing-prototypes to KBUILD_CFLAGS in the top-level Makefile, and
do a build with defconfig or allyesconfig. It will show all warnings
of missing prototype.

Thanks ,
-- 
Rashika Kheria
B.Tech CSE
IIIT Hyderabad

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

* Re: [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c
  2013-12-14 13:58 [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c Rashika Kheria
                   ` (2 preceding siblings ...)
  2013-12-14 17:01 ` [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c Borislav Petkov
@ 2013-12-14 20:28 ` Josh Triplett
  2013-12-15 16:58   ` Borislav Petkov
  3 siblings, 1 reply; 12+ messages in thread
From: Josh Triplett @ 2013-12-14 20:28 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Doug Thompson, Borislav Petkov, linux-edac

On Sat, Dec 14, 2013 at 07:28:24PM +0530, Rashika Kheria wrote:
> This patch marks the function amd64_decode_bus_error() as static in
> amd64_edac.c because it is not used outside this file.
> 
> Thus, it also eliminates the following warning in amd64_edac.c:
> drivers/edac/amd64_edac.c:2038:6: warning: no previous prototype for ‘amd64_decode_bus_error’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

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

>  drivers/edac/amd64_edac.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
> index b53d0de..52b34ea 100644
> --- a/drivers/edac/amd64_edac.c
> +++ b/drivers/edac/amd64_edac.c
> @@ -2035,7 +2035,7 @@ static inline void __amd64_decode_bus_error(struct mem_ctl_info *mci,
>  	__log_bus_error(mci, &err, ecc_type);
>  }
>  
> -void amd64_decode_bus_error(int node_id, struct mce *m)
> +static void amd64_decode_bus_error(int node_id, struct mce *m)
>  {
>  	__amd64_decode_bus_error(mcis[node_id], m);
>  }
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 2/3] drivers: edac: Mark the function edac_create_debug_nodes() as static in edac_mc_sysfs.c
  2013-12-14 14:00 ` [PATCH 2/3] drivers: edac: Mark the function edac_create_debug_nodes() as static in edac_mc_sysfs.c Rashika Kheria
@ 2013-12-14 20:28   ` Josh Triplett
  2013-12-15 17:00     ` Borislav Petkov
  0 siblings, 1 reply; 12+ messages in thread
From: Josh Triplett @ 2013-12-14 20:28 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Doug Thompson, linux-edac

On Sat, Dec 14, 2013 at 07:30:11PM +0530, Rashika Kheria wrote:
> This patch marks the function edac_create_debug_nodes() as static in
> edac_mc_sysfs.c because it is not used outside this file.
> 
> Thus, it also eliminates the following warning in edac_mc_sysfs.c:
> drivers/edac/edac_mc_sysfs.c:917:5: warning: no previous prototype for ‘edac_create_debug_nodes’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

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

>  drivers/edac/edac_mc_sysfs.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
> index 9f7e0e60..51c0362 100644
> --- a/drivers/edac/edac_mc_sysfs.c
> +++ b/drivers/edac/edac_mc_sysfs.c
> @@ -914,7 +914,7 @@ void __exit edac_debugfs_exit(void)
>  	debugfs_remove(edac_debugfs);
>  }
>  
> -int edac_create_debug_nodes(struct mem_ctl_info *mci)
> +static int edac_create_debug_nodes(struct mem_ctl_info *mci)
>  {
>  	struct dentry *d, *parent;
>  	char name[80];
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 3/3] drivers: edac: Mark the function get_mci_for_node_id() as static in sb_edac.c
  2013-12-14 14:02 ` [PATCH 3/3] drivers: edac: Mark the function get_mci_for_node_id() as static in sb_edac.c Rashika Kheria
@ 2013-12-14 20:28   ` Josh Triplett
  2013-12-15 17:03     ` Borislav Petkov
  0 siblings, 1 reply; 12+ messages in thread
From: Josh Triplett @ 2013-12-14 20:28 UTC (permalink / raw)
  To: Rashika Kheria
  Cc: linux-kernel, Mauro Carvalho Chehab, Doug Thompson, linux-edac

On Sat, Dec 14, 2013 at 07:32:09PM +0530, Rashika Kheria wrote:
> This patch marks the function get_mci_for_node_id() as static in
> sb_edac.c because it is not used outside this file.
> 
> Thus, it also eliminates the following warning in sb_edac.c:
> drivers/edac/sb_edac.c:918:22: warning: no previous prototype for ‘get_mci_for_node_id’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

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

>  drivers/edac/sb_edac.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index 8472405..a8845a3 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -915,7 +915,7 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
>  	}
>  }
>  
> -struct mem_ctl_info *get_mci_for_node_id(u8 node_id)
> +static struct mem_ctl_info *get_mci_for_node_id(u8 node_id)
>  {
>  	struct sbridge_dev *sbridge_dev;
>  
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c
  2013-12-14 18:17   ` Rashika Kheria
@ 2013-12-14 20:42     ` Borislav Petkov
  0 siblings, 0 replies; 12+ messages in thread
From: Borislav Petkov @ 2013-12-14 20:42 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: Linux-Kernel, Doug Thompson, linux-edac, Josh Triplett

On Sat, Dec 14, 2013 at 11:47:10PM +0530, Rashika Kheria wrote:
> My gcc version is 4.6.3. You can trigger these warnings by adding
> -Wmissing-prototypes to KBUILD_CFLAGS in the top-level Makefile, and

Actually, you don't even have to do that - you only need to build with
W=1:

make W=1 drivers/edac/amd64_edac.o

We already enable -Wmissing-prototypes as an additional compiler warning
when building objects with the W= switch.

> do a build with defconfig or allyesconfig. It will show all warnings
> of missing prototype.

Ok, gcc man page says this detects global functions without prototypes
in a header but I guess it can be used to detect needlessly global
functions too. :)

I'll pick up your three patches,

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c
  2013-12-14 20:28 ` Josh Triplett
@ 2013-12-15 16:58   ` Borislav Petkov
  0 siblings, 0 replies; 12+ messages in thread
From: Borislav Petkov @ 2013-12-15 16:58 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Rashika Kheria, linux-kernel, Doug Thompson, linux-edac

On Sat, Dec 14, 2013 at 12:28:12PM -0800, Josh Triplett wrote:
> On Sat, Dec 14, 2013 at 07:28:24PM +0530, Rashika Kheria wrote:
> > This patch marks the function amd64_decode_bus_error() as static in
> > amd64_edac.c because it is not used outside this file.
> > 
> > Thus, it also eliminates the following warning in amd64_edac.c:
> > drivers/edac/amd64_edac.c:2038:6: warning: no previous prototype for ‘amd64_decode_bus_error’ [-Wmissing-prototypes]
> > 
> > Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> 
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH 2/3] drivers: edac: Mark the function edac_create_debug_nodes() as static in edac_mc_sysfs.c
  2013-12-14 20:28   ` Josh Triplett
@ 2013-12-15 17:00     ` Borislav Petkov
  0 siblings, 0 replies; 12+ messages in thread
From: Borislav Petkov @ 2013-12-15 17:00 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Rashika Kheria, linux-kernel, Doug Thompson, linux-edac

On Sat, Dec 14, 2013 at 12:28:33PM -0800, Josh Triplett wrote:
> On Sat, Dec 14, 2013 at 07:30:11PM +0530, Rashika Kheria wrote:
> > This patch marks the function edac_create_debug_nodes() as static in
> > edac_mc_sysfs.c because it is not used outside this file.
> > 
> > Thus, it also eliminates the following warning in edac_mc_sysfs.c:
> > drivers/edac/edac_mc_sysfs.c:917:5: warning: no previous prototype for ‘edac_create_debug_nodes’ [-Wmissing-prototypes]
> > 
> > Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> 
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH 3/3] drivers: edac: Mark the function get_mci_for_node_id() as static in sb_edac.c
  2013-12-14 20:28   ` Josh Triplett
@ 2013-12-15 17:03     ` Borislav Petkov
  0 siblings, 0 replies; 12+ messages in thread
From: Borislav Petkov @ 2013-12-15 17:03 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Rashika Kheria, linux-kernel, Mauro Carvalho Chehab,
	Doug Thompson, linux-edac

On Sat, Dec 14, 2013 at 12:28:58PM -0800, Josh Triplett wrote:
> On Sat, Dec 14, 2013 at 07:32:09PM +0530, Rashika Kheria wrote:
> > This patch marks the function get_mci_for_node_id() as static in
> > sb_edac.c because it is not used outside this file.
> > 
> > Thus, it also eliminates the following warning in sb_edac.c:
> > drivers/edac/sb_edac.c:918:22: warning: no previous prototype for ‘get_mci_for_node_id’ [-Wmissing-prototypes]
> > 
> > Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> 
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-14 13:58 [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c Rashika Kheria
2013-12-14 14:00 ` [PATCH 2/3] drivers: edac: Mark the function edac_create_debug_nodes() as static in edac_mc_sysfs.c Rashika Kheria
2013-12-14 20:28   ` Josh Triplett
2013-12-15 17:00     ` Borislav Petkov
2013-12-14 14:02 ` [PATCH 3/3] drivers: edac: Mark the function get_mci_for_node_id() as static in sb_edac.c Rashika Kheria
2013-12-14 20:28   ` Josh Triplett
2013-12-15 17:03     ` Borislav Petkov
2013-12-14 17:01 ` [PATCH 1/3] drivers: edac: Mark the function amd64_decode_bus_error() as static in amd64_edac.c Borislav Petkov
2013-12-14 18:17   ` Rashika Kheria
2013-12-14 20:42     ` Borislav Petkov
2013-12-14 20:28 ` Josh Triplett
2013-12-15 16:58   ` Borislav Petkov

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