Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1719094

[PATCH 3/3] ata: constify ata_port_info

From Arvind Yadav <arvind.yadav.cs@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/3] ata: constify ata_port_info
Date 2017-08-24 12:00 +0200
Message-ID <uhX5E-4KB-23@gated-at.bofh.it> (permalink)
References <uhX5D-4KB-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


ata_port_info are not supposed to change at runtime. All functions
working with ata_port_info provided by <linux/libata.h> work with
const ata_port_info. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/ata/pdc_adma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index f1e873a..77c21cb 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -162,7 +162,7 @@ static int adma_ata_init_one(struct pci_dev *pdev,
 	.port_stop		= adma_port_stop,
 };
 
-static struct ata_port_info adma_port_info[] = {
+static const struct ata_port_info adma_port_info[] = {
 	/* board_1841_idx */
 	{
 		.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_POLLING,
-- 
1.9.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 3/3] ata: constify ata_port_info Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-24 12:00 +0200

csiph-web