• Arnd Bergmann's avatar
    ata: hpt366: fix constant cast warning · 6ec0a86c
    Arnd Bergmann authored
    gcc-5.x warns about a preexisting problem in the hpt36x pata driver:
    
    drivers/ata/pata_hpt366.c: In function 'hpt36x_init_one':
    drivers/ata/pata_hpt366.c:376:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers]
    
    Other ata drivers have the same problem, as ata_pci_bmdma_init_one
    takes a non-const pointer, and they solve it by using a cast to
    turn that pointer into a normal non-const pointer.
    
    I also tried to change the ata core code to make host->private_data
    a const pointer, but that quickly got out of hand, as some other
    drivers expect it to be writable, so I ended up using the same
    hack as the others here.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    6ec0a86c
pata_hpt366.c 10.7 KB