Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: pata_atiixp: make static read-only arrays const

The static arrays pio_timings and mwdma_timings are read-only so
it make sense to make them const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

authored by

Colin Ian King and committed by
Damien Le Moal
9ab84425 8818a534

+2 -2
+2 -2
drivers/ata/pata_atiixp.c
··· 102 102 103 103 static void atiixp_set_pio_timing(struct ata_port *ap, struct ata_device *adev, int pio) 104 104 { 105 - static u8 pio_timings[5] = { 0x5D, 0x47, 0x34, 0x22, 0x20 }; 105 + static const u8 pio_timings[5] = { 0x5D, 0x47, 0x34, 0x22, 0x20 }; 106 106 107 107 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 108 108 int dn = 2 * ap->port_no + adev->devno; ··· 149 149 150 150 static void atiixp_set_dmamode(struct ata_port *ap, struct ata_device *adev) 151 151 { 152 - static u8 mwdma_timings[5] = { 0x77, 0x21, 0x20 }; 152 + static const u8 mwdma_timings[5] = { 0x77, 0x21, 0x20 }; 153 153 154 154 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 155 155 int dma = adev->dma_mode;