]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ata: declare ata_port_info structures as const
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 9 Jun 2017 11:45:08 +0000 (17:15 +0530)
committerTejun Heo <tj@kernel.org>
Mon, 12 Jun 2017 18:06:34 +0000 (14:06 -0400)
ata_port_info structures are either copied to other objects or their
references are stored in objects of type const. So, ata_port_info
structures having similar usage pattern can be made const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/pata_rdc.c
drivers/ata/pata_sch.c
drivers/ata/sata_inic162x.c
drivers/ata/sata_via.c

index 9ce5952216bc6e661da18bbba9b7db6730febd6e..959bb54fd80341eab450d8a017e8adf34d8ee9b0 100644 (file)
@@ -292,7 +292,7 @@ static struct ata_port_operations rdc_pata_ops = {
        .prereset               = rdc_pata_prereset,
 };
 
-static struct ata_port_info rdc_port_info = {
+static const struct ata_port_info rdc_port_info = {
 
        .flags          = ATA_FLAG_SLAVE_POSS,
        .pio_mask       = ATA_PIO4,
index b920c3407f8b26c8c10f73d9b7c58fc9fd056a2f..1b80a66caa542f12f5c24dd556a53a57a9d355a3 100644 (file)
@@ -81,7 +81,7 @@ static struct ata_port_operations sch_pata_ops = {
        .set_dmamode            = sch_set_dmamode,
 };
 
-static struct ata_port_info sch_port_info = {
+static const struct ata_port_info sch_port_info = {
        .flags          = ATA_FLAG_SLAVE_POSS,
        .pio_mask       = ATA_PIO4,
        .mwdma_mask     = ATA_MWDMA2,
index e81a8217f1ff7be37ea2c3d61d6d1326f9f55a5e..9b6d7930d1c7940025877657e9062723b40921d4 100644 (file)
@@ -737,7 +737,7 @@ static struct ata_port_operations inic_port_ops = {
        .port_start             = inic_port_start,
 };
 
-static struct ata_port_info inic_port_info = {
+static const struct ata_port_info inic_port_info = {
        .flags                  = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA,
        .pio_mask               = ATA_PIO4,
        .mwdma_mask             = ATA_MWDMA2,
index 22e96fc77d09baaf23e1fb56015f55bf6c9ca692..a3f6d330d106dd94840d9e6032bc0f72c3a133e8 100644 (file)
@@ -166,7 +166,7 @@ static const struct ata_port_info vt6420_port_info = {
        .port_ops       = &vt6420_sata_ops,
 };
 
-static struct ata_port_info vt6421_sport_info = {
+static const struct ata_port_info vt6421_sport_info = {
        .flags          = ATA_FLAG_SATA,
        .pio_mask       = ATA_PIO4,
        .mwdma_mask     = ATA_MWDMA2,
@@ -174,7 +174,7 @@ static struct ata_port_info vt6421_sport_info = {
        .port_ops       = &vt6421_sata_ops,
 };
 
-static struct ata_port_info vt6421_pport_info = {
+static const struct ata_port_info vt6421_pport_info = {
        .flags          = ATA_FLAG_SLAVE_POSS,
        .pio_mask       = ATA_PIO4,
        /* No MWDMA */
@@ -182,7 +182,7 @@ static struct ata_port_info vt6421_pport_info = {
        .port_ops       = &vt6421_pata_ops,
 };
 
-static struct ata_port_info vt8251_port_info = {
+static const struct ata_port_info vt8251_port_info = {
        .flags          = ATA_FLAG_SATA | ATA_FLAG_SLAVE_POSS,
        .pio_mask       = ATA_PIO4,
        .mwdma_mask     = ATA_MWDMA2,