linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NTB: make idt_89hpes_cfg const
@ 2017-08-11 17:47 Bhumika Goyal
  2017-08-31 17:55 ` Jon Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-08-11 17:47 UTC (permalink / raw)
  To: julia.lawall, fancer.lancer, jdmason, dave.jiang, Allen.Hubbe,
	linux-ntb, linux-kernel
  Cc: Bhumika Goyal

Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/ntb/hw/idt/ntb_hw_idt.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c
index d44d7ef..0cd79f3 100644
--- a/drivers/ntb/hw/idt/ntb_hw_idt.c
+++ b/drivers/ntb/hw/idt/ntb_hw_idt.c
@@ -2628,35 +2628,35 @@ static void idt_pci_remove(struct pci_dev *pdev)
 /*
  * IDT PCIe-switch models ports configuration structures
  */
-static struct idt_89hpes_cfg idt_89hpes24nt6ag2_config = {
+static const struct idt_89hpes_cfg idt_89hpes24nt6ag2_config = {
 	.name = "89HPES24NT6AG2",
 	.port_cnt = 6, .ports = {0, 2, 4, 6, 8, 12}
 };
-static struct idt_89hpes_cfg idt_89hpes32nt8ag2_config = {
+static const struct idt_89hpes_cfg idt_89hpes32nt8ag2_config = {
 	.name = "89HPES32NT8AG2",
 	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
 };
-static struct idt_89hpes_cfg idt_89hpes32nt8bg2_config = {
+static const struct idt_89hpes_cfg idt_89hpes32nt8bg2_config = {
 	.name = "89HPES32NT8BG2",
 	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
 };
-static struct idt_89hpes_cfg idt_89hpes12nt12g2_config = {
+static const struct idt_89hpes_cfg idt_89hpes12nt12g2_config = {
 	.name = "89HPES12NT12G2",
 	.port_cnt = 3, .ports = {0, 8, 16}
 };
-static struct idt_89hpes_cfg idt_89hpes16nt16g2_config = {
+static const struct idt_89hpes_cfg idt_89hpes16nt16g2_config = {
 	.name = "89HPES16NT16G2",
 	.port_cnt = 4, .ports = {0, 8, 12, 16}
 };
-static struct idt_89hpes_cfg idt_89hpes24nt24g2_config = {
+static const struct idt_89hpes_cfg idt_89hpes24nt24g2_config = {
 	.name = "89HPES24NT24G2",
 	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
 };
-static struct idt_89hpes_cfg idt_89hpes32nt24ag2_config = {
+static const struct idt_89hpes_cfg idt_89hpes32nt24ag2_config = {
 	.name = "89HPES32NT24AG2",
 	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
 };
-static struct idt_89hpes_cfg idt_89hpes32nt24bg2_config = {
+static const struct idt_89hpes_cfg idt_89hpes32nt24bg2_config = {
 	.name = "89HPES32NT24BG2",
 	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
 };
-- 
1.9.1

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

* Re: [PATCH] NTB: make idt_89hpes_cfg const
  2017-08-11 17:47 [PATCH] NTB: make idt_89hpes_cfg const Bhumika Goyal
@ 2017-08-31 17:55 ` Jon Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Mason @ 2017-08-31 17:55 UTC (permalink / raw)
  To: Bhumika Goyal
  Cc: julia.lawall, fancer.lancer, dave.jiang, Allen.Hubbe, linux-ntb,
	linux-kernel

On Fri, Aug 11, 2017 at 11:17:43PM +0530, Bhumika Goyal wrote:
> Make these const as they are only used during a copy operation.
> Done using Coccinelle.

Pulled into my ntb-next branch

Thanks,
Jon

> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/ntb/hw/idt/ntb_hw_idt.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c
> index d44d7ef..0cd79f3 100644
> --- a/drivers/ntb/hw/idt/ntb_hw_idt.c
> +++ b/drivers/ntb/hw/idt/ntb_hw_idt.c
> @@ -2628,35 +2628,35 @@ static void idt_pci_remove(struct pci_dev *pdev)
>  /*
>   * IDT PCIe-switch models ports configuration structures
>   */
> -static struct idt_89hpes_cfg idt_89hpes24nt6ag2_config = {
> +static const struct idt_89hpes_cfg idt_89hpes24nt6ag2_config = {
>  	.name = "89HPES24NT6AG2",
>  	.port_cnt = 6, .ports = {0, 2, 4, 6, 8, 12}
>  };
> -static struct idt_89hpes_cfg idt_89hpes32nt8ag2_config = {
> +static const struct idt_89hpes_cfg idt_89hpes32nt8ag2_config = {
>  	.name = "89HPES32NT8AG2",
>  	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
>  };
> -static struct idt_89hpes_cfg idt_89hpes32nt8bg2_config = {
> +static const struct idt_89hpes_cfg idt_89hpes32nt8bg2_config = {
>  	.name = "89HPES32NT8BG2",
>  	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
>  };
> -static struct idt_89hpes_cfg idt_89hpes12nt12g2_config = {
> +static const struct idt_89hpes_cfg idt_89hpes12nt12g2_config = {
>  	.name = "89HPES12NT12G2",
>  	.port_cnt = 3, .ports = {0, 8, 16}
>  };
> -static struct idt_89hpes_cfg idt_89hpes16nt16g2_config = {
> +static const struct idt_89hpes_cfg idt_89hpes16nt16g2_config = {
>  	.name = "89HPES16NT16G2",
>  	.port_cnt = 4, .ports = {0, 8, 12, 16}
>  };
> -static struct idt_89hpes_cfg idt_89hpes24nt24g2_config = {
> +static const struct idt_89hpes_cfg idt_89hpes24nt24g2_config = {
>  	.name = "89HPES24NT24G2",
>  	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
>  };
> -static struct idt_89hpes_cfg idt_89hpes32nt24ag2_config = {
> +static const struct idt_89hpes_cfg idt_89hpes32nt24ag2_config = {
>  	.name = "89HPES32NT24AG2",
>  	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
>  };
> -static struct idt_89hpes_cfg idt_89hpes32nt24bg2_config = {
> +static const struct idt_89hpes_cfg idt_89hpes32nt24bg2_config = {
>  	.name = "89HPES32NT24BG2",
>  	.port_cnt = 8, .ports = {0, 2, 4, 6, 8, 12, 16, 20}
>  };
> -- 
> 1.9.1
> 

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

end of thread, other threads:[~2017-08-31 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-11 17:47 [PATCH] NTB: make idt_89hpes_cfg const Bhumika Goyal
2017-08-31 17:55 ` Jon Mason

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).