All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] switchtec: make struct event_regs static
@ 2017-10-05 10:01 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-10-05 10:01 UTC (permalink / raw)
  To: Kurt Schwemmer, Stephen Bates, Logan Gunthorpe, Bjorn Helgaas, linux-pci
  Cc: kernel-janitors, linux-kernel

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

The structure event_regs is local to the source and does not need to
be in global scope, so make it static.

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/pci/switch/switchtec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index af81b2dec42e..da45dbea20ce 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -943,7 +943,7 @@ static u32 __iomem *pff_ev_reg(struct switchtec_dev *stdev,
 #define EV_PAR(i, r)[i] = {offsetof(struct part_cfg_regs, r), part_ev_reg}
 #define EV_PFF(i, r)[i] = {offsetof(struct pff_csr_regs, r), pff_ev_reg}
 
-const struct event_reg {
+static const struct event_reg {
 	size_t offset;
 	u32 __iomem *(*map_reg)(struct switchtec_dev *stdev,
 				size_t offset, int index);
-- 
2.14.1

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

* [PATCH] switchtec: make struct event_regs static
@ 2017-10-05 10:01 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-10-05 10:01 UTC (permalink / raw)
  To: Kurt Schwemmer, Stephen Bates, Logan Gunthorpe, Bjorn Helgaas, linux-pci
  Cc: kernel-janitors, linux-kernel

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

The structure event_regs is local to the source and does not need to
be in global scope, so make it static.

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/pci/switch/switchtec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index af81b2dec42e..da45dbea20ce 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -943,7 +943,7 @@ static u32 __iomem *pff_ev_reg(struct switchtec_dev *stdev,
 #define EV_PAR(i, r)[i] = {offsetof(struct part_cfg_regs, r), part_ev_reg}
 #define EV_PFF(i, r)[i] = {offsetof(struct pff_csr_regs, r), pff_ev_reg}
 
-const struct event_reg {
+static const struct event_reg {
 	size_t offset;
 	u32 __iomem *(*map_reg)(struct switchtec_dev *stdev,
 				size_t offset, int index);
-- 
2.14.1


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

* Re: [PATCH] switchtec: make struct event_regs static
  2017-10-05 10:01 ` Colin King
@ 2017-10-05 15:37   ` Logan Gunthorpe
  -1 siblings, 0 replies; 6+ messages in thread
From: Logan Gunthorpe @ 2017-10-05 15:37 UTC (permalink / raw)
  To: Colin King, Kurt Schwemmer, Bjorn Helgaas, linux-pci
  Cc: kernel-janitors, linux-kernel

Thanks!

Acked-by: Logan Gunthorpe <logang@deltatee.com>

On 10/5/2017 4:01 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The structure event_regs is local to the source and does not need to
> be in global scope, so make it static.
> 
> Cleans up sparse warning:
> symbol 'event_regs' was not declared. Should it be static
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   drivers/pci/switch/switchtec.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
> index af81b2dec42e..da45dbea20ce 100644
> --- a/drivers/pci/switch/switchtec.c
> +++ b/drivers/pci/switch/switchtec.c
> @@ -943,7 +943,7 @@ static u32 __iomem *pff_ev_reg(struct switchtec_dev *stdev,
>   #define EV_PAR(i, r)[i] = {offsetof(struct part_cfg_regs, r), part_ev_reg}
>   #define EV_PFF(i, r)[i] = {offsetof(struct pff_csr_regs, r), pff_ev_reg}
>   
> -const struct event_reg {
> +static const struct event_reg {
>   	size_t offset;
>   	u32 __iomem *(*map_reg)(struct switchtec_dev *stdev,
>   				size_t offset, int index);
> 

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

* Re: [PATCH] switchtec: make struct event_regs static
@ 2017-10-05 15:37   ` Logan Gunthorpe
  0 siblings, 0 replies; 6+ messages in thread
From: Logan Gunthorpe @ 2017-10-05 15:37 UTC (permalink / raw)
  To: Colin King, Kurt Schwemmer, Bjorn Helgaas, linux-pci
  Cc: kernel-janitors, linux-kernel

Thanks!

Acked-by: Logan Gunthorpe <logang@deltatee.com>

On 10/5/2017 4:01 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The structure event_regs is local to the source and does not need to
> be in global scope, so make it static.
> 
> Cleans up sparse warning:
> symbol 'event_regs' was not declared. Should it be static
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   drivers/pci/switch/switchtec.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
> index af81b2dec42e..da45dbea20ce 100644
> --- a/drivers/pci/switch/switchtec.c
> +++ b/drivers/pci/switch/switchtec.c
> @@ -943,7 +943,7 @@ static u32 __iomem *pff_ev_reg(struct switchtec_dev *stdev,
>   #define EV_PAR(i, r)[i] = {offsetof(struct part_cfg_regs, r), part_ev_reg}
>   #define EV_PFF(i, r)[i] = {offsetof(struct pff_csr_regs, r), pff_ev_reg}
>   
> -const struct event_reg {
> +static const struct event_reg {
>   	size_t offset;
>   	u32 __iomem *(*map_reg)(struct switchtec_dev *stdev,
>   				size_t offset, int index);
> 


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

* Re: [PATCH] switchtec: make struct event_regs static
  2017-10-05 10:01 ` Colin King
@ 2017-10-05 21:09   ` Bjorn Helgaas
  -1 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2017-10-05 21:09 UTC (permalink / raw)
  To: Colin King
  Cc: Kurt Schwemmer, Stephen Bates, Logan Gunthorpe, Bjorn Helgaas,
	linux-pci, kernel-janitors, linux-kernel

On Thu, Oct 05, 2017 at 11:01:45AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The structure event_regs is local to the source and does not need to
> be in global scope, so make it static.
> 
> Cleans up sparse warning:
> symbol 'event_regs' was not declared. Should it be static
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied with Logan's ack to pci/switchtec for v4.15, thanks!

> ---
>  drivers/pci/switch/switchtec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
> index af81b2dec42e..da45dbea20ce 100644
> --- a/drivers/pci/switch/switchtec.c
> +++ b/drivers/pci/switch/switchtec.c
> @@ -943,7 +943,7 @@ static u32 __iomem *pff_ev_reg(struct switchtec_dev *stdev,
>  #define EV_PAR(i, r)[i] = {offsetof(struct part_cfg_regs, r), part_ev_reg}
>  #define EV_PFF(i, r)[i] = {offsetof(struct pff_csr_regs, r), pff_ev_reg}
>  
> -const struct event_reg {
> +static const struct event_reg {
>  	size_t offset;
>  	u32 __iomem *(*map_reg)(struct switchtec_dev *stdev,
>  				size_t offset, int index);
> -- 
> 2.14.1
> 

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

* Re: [PATCH] switchtec: make struct event_regs static
@ 2017-10-05 21:09   ` Bjorn Helgaas
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2017-10-05 21:09 UTC (permalink / raw)
  To: Colin King
  Cc: Kurt Schwemmer, Stephen Bates, Logan Gunthorpe, Bjorn Helgaas,
	linux-pci, kernel-janitors, linux-kernel

On Thu, Oct 05, 2017 at 11:01:45AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The structure event_regs is local to the source and does not need to
> be in global scope, so make it static.
> 
> Cleans up sparse warning:
> symbol 'event_regs' was not declared. Should it be static
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied with Logan's ack to pci/switchtec for v4.15, thanks!

> ---
>  drivers/pci/switch/switchtec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
> index af81b2dec42e..da45dbea20ce 100644
> --- a/drivers/pci/switch/switchtec.c
> +++ b/drivers/pci/switch/switchtec.c
> @@ -943,7 +943,7 @@ static u32 __iomem *pff_ev_reg(struct switchtec_dev *stdev,
>  #define EV_PAR(i, r)[i] = {offsetof(struct part_cfg_regs, r), part_ev_reg}
>  #define EV_PFF(i, r)[i] = {offsetof(struct pff_csr_regs, r), pff_ev_reg}
>  
> -const struct event_reg {
> +static const struct event_reg {
>  	size_t offset;
>  	u32 __iomem *(*map_reg)(struct switchtec_dev *stdev,
>  				size_t offset, int index);
> -- 
> 2.14.1
> 

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

end of thread, other threads:[~2017-10-05 21:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-05 10:01 [PATCH] switchtec: make struct event_regs static Colin King
2017-10-05 10:01 ` Colin King
2017-10-05 15:37 ` Logan Gunthorpe
2017-10-05 15:37   ` Logan Gunthorpe
2017-10-05 21:09 ` Bjorn Helgaas
2017-10-05 21:09   ` Bjorn Helgaas

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.