Message ID | 1503568201-9991-2-git-send-email-arvind.yadav.cs@gmail.com |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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,
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(-)