Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1719097 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-08-24 12:00 +0200 |
| Last post | 2017-08-24 21:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/3] ata: ftide010: constify ata_port_info Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-24 12:00 +0200
Re: [PATCH 1/3] ata: ftide010: constify ata_port_info Linus Walleij <linus.walleij@linaro.org> - 2017-08-24 21:50 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-24 12:00 +0200 |
| Subject | [PATCH 1/3] ata: ftide010: constify ata_port_info |
| Message-ID | <uhX5E-4KB-29@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2017-08-24 21:50 +0200 |
| Message-ID | <ui6iC-2kS-21@gated-at.bofh.it> |
| In reply to | #1719097 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web