* [PATCH 0/3] constify ata_port_info
@ 2017-08-24 9:49 Arvind Yadav
2017-08-24 9:49 ` [PATCH 1/3] ata: ftide010: " Arvind Yadav
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-24 9:49 UTC (permalink / raw)
To: tj, b.zolnierkie, linus.walleij; +Cc: linux-kernel, linux-ide
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.
Arvind Yadav (3):
[PATCH 1/3] ata: ftide010: constify ata_port_info
[PATCH 2/3] ata: pdc2027x: constify ata_port_info
[PATCH 3/3] ata: constify ata_port_info
drivers/ata/pata_ftide010.c | 2 +-
drivers/ata/pata_pdc2027x.c | 2 +-
drivers/ata/pdc_adma.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] ata: ftide010: constify ata_port_info
2017-08-24 9:49 [PATCH 0/3] constify ata_port_info Arvind Yadav
@ 2017-08-24 9:49 ` Arvind Yadav
2017-08-24 19:46 ` Linus Walleij
2017-08-24 9:50 ` [PATCH 2/3] ata: pdc2027x: " Arvind Yadav
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Arvind Yadav @ 2017-08-24 9:49 UTC (permalink / raw)
To: tj, b.zolnierkie, linus.walleij; +Cc: linux-kernel, linux-ide
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/pata_ftide010.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/pata_ftide010.c b/drivers/ata/pata_ftide010.c
index 5d4b72e..6c04495 100644
--- a/drivers/ata/pata_ftide010.c
+++ b/drivers/ata/pata_ftide010.c
@@ -256,7 +256,7 @@ static unsigned int ftide010_qc_issue(struct ata_queued_cmd *qc)
.qc_issue = ftide010_qc_issue,
};
-static struct ata_port_info ftide010_port_info[] = {
+static const struct ata_port_info ftide010_port_info[] = {
{
.flags = ATA_FLAG_SLAVE_POSS,
.mwdma_mask = ATA_MWDMA2,
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] ata: pdc2027x: constify ata_port_info
2017-08-24 9:49 [PATCH 0/3] constify ata_port_info Arvind Yadav
2017-08-24 9:49 ` [PATCH 1/3] ata: ftide010: " Arvind Yadav
@ 2017-08-24 9:50 ` Arvind Yadav
2017-08-24 9:50 ` [PATCH 3/3] ata: " Arvind Yadav
2017-08-24 14:23 ` [PATCH 0/3] " Tejun Heo
3 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-24 9:50 UTC (permalink / raw)
To: tj, b.zolnierkie, linus.walleij; +Cc: linux-kernel, linux-ide
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/pata_pdc2027x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index 82bfd51..62ae69a 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -154,7 +154,7 @@ enum {
.set_mode = pdc2027x_set_mode,
};
-static struct ata_port_info pdc2027x_port_info[] = {
+static const struct ata_port_info pdc2027x_port_info[] = {
/* PDC_UDMA_100 */
{
.flags = ATA_FLAG_SLAVE_POSS,
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] ata: constify ata_port_info
2017-08-24 9:49 [PATCH 0/3] constify ata_port_info Arvind Yadav
2017-08-24 9:49 ` [PATCH 1/3] ata: ftide010: " Arvind Yadav
2017-08-24 9:50 ` [PATCH 2/3] ata: pdc2027x: " Arvind Yadav
@ 2017-08-24 9:50 ` Arvind Yadav
2017-08-24 14:23 ` [PATCH 0/3] " Tejun Heo
3 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-24 9:50 UTC (permalink / raw)
To: tj, b.zolnierkie, linus.walleij; +Cc: linux-kernel, linux-ide
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] constify ata_port_info
2017-08-24 9:49 [PATCH 0/3] constify ata_port_info Arvind Yadav
` (2 preceding siblings ...)
2017-08-24 9:50 ` [PATCH 3/3] ata: " Arvind Yadav
@ 2017-08-24 14:23 ` Tejun Heo
2017-08-24 17:26 ` Tejun Heo
3 siblings, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2017-08-24 14:23 UTC (permalink / raw)
To: Arvind Yadav; +Cc: b.zolnierkie, linus.walleij, linux-kernel, linux-ide
On Thu, Aug 24, 2017 at 03:19:58PM +0530, Arvind Yadav wrote:
> 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.
Applied 1-3 to libata/for-4.14.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] constify ata_port_info
2017-08-24 14:23 ` [PATCH 0/3] " Tejun Heo
@ 2017-08-24 17:26 ` Tejun Heo
0 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2017-08-24 17:26 UTC (permalink / raw)
To: Arvind Yadav; +Cc: b.zolnierkie, linus.walleij, linux-kernel, linux-ide
On Thu, Aug 24, 2017 at 07:23:46AM -0700, Tejun Heo wrote:
> On Thu, Aug 24, 2017 at 03:19:58PM +0530, Arvind Yadav wrote:
> > 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.
>
> Applied 1-3 to libata/for-4.14.
Caused build warnings. Reverted. Please test before submitting
patches.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] ata: ftide010: constify ata_port_info
2017-08-24 9:49 ` [PATCH 1/3] ata: ftide010: " Arvind Yadav
@ 2017-08-24 19:46 ` Linus Walleij
0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2017-08-24 19:46 UTC (permalink / raw)
To: Arvind Yadav
Cc: Tejun Heo, Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide
On Thu, Aug 24, 2017 at 11:49 AM, Arvind Yadav
<arvind.yadav.cs@gmail.com> wrote:
> 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>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-08-24 19:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-24 9:49 [PATCH 0/3] constify ata_port_info Arvind Yadav
2017-08-24 9:49 ` [PATCH 1/3] ata: ftide010: " Arvind Yadav
2017-08-24 19:46 ` Linus Walleij
2017-08-24 9:50 ` [PATCH 2/3] ata: pdc2027x: " Arvind Yadav
2017-08-24 9:50 ` [PATCH 3/3] ata: " Arvind Yadav
2017-08-24 14:23 ` [PATCH 0/3] " Tejun Heo
2017-08-24 17:26 ` Tejun Heo
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).