linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] EDAC, pnd2_edac: make function sbi_send static
@ 2017-06-23  8:48 Colin King
  2017-06-23  8:58 ` Borislav Petkov
  2017-06-26 14:14 ` Borislav Petkov
  0 siblings, 2 replies; 4+ messages in thread
From: Colin King @ 2017-06-23  8:48 UTC (permalink / raw)
  To: Tony Luck, Borislav Petkov, Mauro Carvalho Chehab, linux-edac
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The function sbi_send is local to just pnd2_edac.c and does not need to
be in global scope, so make it static.

Cleans up sparse warning:
symbol 'sbi_send' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/edac/pnd2_edac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
index 1cad5a9af8d0..4efdca1dad5a 100644
--- a/drivers/edac/pnd2_edac.c
+++ b/drivers/edac/pnd2_edac.c
@@ -131,7 +131,7 @@ static struct mem_ctl_info *pnd2_mci;
 
 #ifdef CONFIG_X86_INTEL_SBI_APL
 #include "linux/platform_data/sbi_apl.h"
-int sbi_send(int port, int off, int op, u32 *data)
+static int sbi_send(int port, int off, int op, u32 *data)
 {
 	struct sbi_apl_message sbi_arg;
 	int ret, read = 0;
@@ -160,7 +160,7 @@ int sbi_send(int port, int off, int op, u32 *data)
 	return ret;
 }
 #else
-int sbi_send(int port, int off, int op, u32 *data)
+static int sbi_send(int port, int off, int op, u32 *data)
 {
 	return -EUNATCH;
 }
-- 
2.11.0

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

* Re: [PATCH] EDAC, pnd2_edac: make function sbi_send static
  2017-06-23  8:48 [PATCH] EDAC, pnd2_edac: make function sbi_send static Colin King
@ 2017-06-23  8:58 ` Borislav Petkov
  2017-06-23 20:48   ` Luck, Tony
  2017-06-26 14:14 ` Borislav Petkov
  1 sibling, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2017-06-23  8:58 UTC (permalink / raw)
  To: Tony Luck
  Cc: Colin King, Mauro Carvalho Chehab, linux-edac, kernel-janitors,
	linux-kernel

On Fri, Jun 23, 2017 at 09:48:55AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The function sbi_send is local to just pnd2_edac.c and does not need to
> be in global scope, so make it static.
> 
> Cleans up sparse warning:
> symbol 'sbi_send' was not declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/edac/pnd2_edac.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
> index 1cad5a9af8d0..4efdca1dad5a 100644
> --- a/drivers/edac/pnd2_edac.c
> +++ b/drivers/edac/pnd2_edac.c
> @@ -131,7 +131,7 @@ static struct mem_ctl_info *pnd2_mci;
>  
>  #ifdef CONFIG_X86_INTEL_SBI_APL
>  #include "linux/platform_data/sbi_apl.h"
> -int sbi_send(int port, int off, int op, u32 *data)
> +static int sbi_send(int port, int off, int op, u32 *data)
>  {
>  	struct sbi_apl_message sbi_arg;
>  	int ret, read = 0;
> @@ -160,7 +160,7 @@ int sbi_send(int port, int off, int op, u32 *data)
>  	return ret;
>  }
>  #else
> -int sbi_send(int port, int off, int op, u32 *data)
> +static int sbi_send(int port, int off, int op, u32 *data)

Tony, were those supposed to be used somewhere outside of the driver,
i.e., that CONFIG_X86_INTEL_SBI_APL thing?

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

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

* Re: [PATCH] EDAC, pnd2_edac: make function sbi_send static
  2017-06-23  8:58 ` Borislav Petkov
@ 2017-06-23 20:48   ` Luck, Tony
  0 siblings, 0 replies; 4+ messages in thread
From: Luck, Tony @ 2017-06-23 20:48 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Colin King, Mauro Carvalho Chehab, linux-edac, kernel-janitors,
	linux-kernel

On Fri, Jun 23, 2017 at 10:58:24AM +0200, Borislav Petkov wrote:
> On Fri, Jun 23, 2017 at 09:48:55AM +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> > -int sbi_send(int port, int off, int op, u32 *data)
> > +static int sbi_send(int port, int off, int op, u32 *data)
> 
> Tony, were those supposed to be used somewhere outside of the driver,
> i.e., that CONFIG_X86_INTEL_SBI_APL thing?

No.  This function is internal and can be static.

The CONFIG_X86_INTEL_SBI_APL thing is about sbi_apl_commit()
while is still waiting for a sideband driver that defines it
to be pushed upstream.

-Tony

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

* Re: [PATCH] EDAC, pnd2_edac: make function sbi_send static
  2017-06-23  8:48 [PATCH] EDAC, pnd2_edac: make function sbi_send static Colin King
  2017-06-23  8:58 ` Borislav Petkov
@ 2017-06-26 14:14 ` Borislav Petkov
  1 sibling, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2017-06-26 14:14 UTC (permalink / raw)
  To: Colin King
  Cc: Tony Luck, Mauro Carvalho Chehab, linux-edac, kernel-janitors,
	linux-kernel

On Fri, Jun 23, 2017 at 09:48:55AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The function sbi_send is local to just pnd2_edac.c and does not need to
> be in global scope, so make it static.
> 
> Cleans up sparse warning:
> symbol 'sbi_send' was not declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/edac/pnd2_edac.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

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

end of thread, other threads:[~2017-06-26 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23  8:48 [PATCH] EDAC, pnd2_edac: make function sbi_send static Colin King
2017-06-23  8:58 ` Borislav Petkov
2017-06-23 20:48   ` Luck, Tony
2017-06-26 14:14 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).