Skip to contentSkip to conversation

ata: pata_pdc202xx_old: make make static read-only array pio_timing const

PATCH Applied Colin Ian King 3 participants 5 messages Jan 23, 2022 – Jan 27, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: pata_pdc202xx_old: make make static read-only array pio_timing const

The static array pio_timing is read-only so it make sense to make it const.

---
 drivers/ata/pata_pdc202xx_old.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/pata_pdc202xx_old.c +1 -1
index b99849095853..f894ff2de0a9 100644
@@ -78,7 +78,7 @@ static void pdc202xx_configure_piomode(struct ata_port *ap, struct ata_device *a
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 	int port = 0x60 + 8 * ap->port_no + 4 * adev->devno;
-	static u16 pio_timing[5] = {
+	static const u16 pio_timing[5] = {
 		0x0913, 0x050C , 0x0308, 0x0206, 0x0104
 	};
 	u8 r_ap, r_bp;
Signature · 1 line
2.33.1
#2 lore raw
Quoted 3 lines · Sergey Shtylyov

Hello!

Too many verbs in the subject. :-)

Yep. I will fix that when applying. No need to resend !

Quoted 11 lines · Colin Ian King
Quoted 5 lines

The static array pio_timing is read-only so it make sense to make it const.

With that fixed:

Thanks for the review.

Quoted 4 lines

[...]

MBR, Sergey

Signature · 2 lines
Damien Le Moal
Western Digital Research
#3 lore raw
Quoted 6 lines · Damien Le Moal
Quoted 3 lines · Sergey Shtylyov

Hello!

Too many verbs in the subject. :-)

Yep. I will fix that when applying. No need to resend !

Thanks for fixing this up. Much appreciated.

Quoted 21 lines
Quoted 12 lines · Colin Ian King
Quoted 5 lines

The static array pio_timing is read-only so it make sense to make it const.

With that fixed:

Thanks for the review.

Quoted 4 lines

[...]

MBR, Sergey