All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pata_pdc2027x : make pdc2027x_*_timing structures const
@ 2017-11-25 11:17 Arvind Yadav
  2017-11-27 19:49 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-11-25 11:17 UTC (permalink / raw)
  To: b.zolnierkie, tj, sergei.shtylyov; +Cc: linux-kernel, linux-ide

Make these pdc2027x_*_timing structures const as it is never modified.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/ata/pata_pdc2027x.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index d1e8b63..141bf81 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -82,7 +82,7 @@ static int pdc2027x_set_mode(struct ata_link *link, struct ata_device **r_failed
  * is issued to the device. However, if the controller clock is 133MHz,
  * the following tables must be used.
  */
-static struct pdc2027x_pio_timing {
+static const struct pdc2027x_pio_timing {
 	u8 value0, value1, value2;
 } pdc2027x_pio_timing_tbl[] = {
 	{ 0xfb, 0x2b, 0xac }, /* PIO mode 0 */
@@ -92,7 +92,7 @@ static struct pdc2027x_pio_timing {
 	{ 0x23, 0x09, 0x25 }, /* PIO mode 4, IORDY on, Prefetch off */
 };
 
-static struct pdc2027x_mdma_timing {
+static const struct pdc2027x_mdma_timing {
 	u8 value0, value1;
 } pdc2027x_mdma_timing_tbl[] = {
 	{ 0xdf, 0x5f }, /* MDMA mode 0 */
@@ -100,7 +100,7 @@ static struct pdc2027x_mdma_timing {
 	{ 0x69, 0x25 }, /* MDMA mode 2 */
 };
 
-static struct pdc2027x_udma_timing {
+static const struct pdc2027x_udma_timing {
 	u8 value0, value1, value2;
 } pdc2027x_udma_timing_tbl[] = {
 	{ 0x4a, 0x0f, 0xd5 }, /* UDMA mode 0 */
-- 
2.7.4


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

* Re: [PATCH] pata_pdc2027x : make pdc2027x_*_timing structures const
  2017-11-25 11:17 [PATCH] pata_pdc2027x : make pdc2027x_*_timing structures const Arvind Yadav
@ 2017-11-27 19:49 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2017-11-27 19:49 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: b.zolnierkie, sergei.shtylyov, linux-kernel, linux-ide

On Sat, Nov 25, 2017 at 04:47:35PM +0530, Arvind Yadav wrote:
> Make these pdc2027x_*_timing structures const as it is never modified.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Applied to libata/for-4.15-fixes.

Thanks.

-- 
tejun

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

end of thread, other threads:[~2017-11-27 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-25 11:17 [PATCH] pata_pdc2027x : make pdc2027x_*_timing structures const Arvind Yadav
2017-11-27 19:49 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.