From: Niklas Cassel Date: Tue, 18 Oct 2022 19:10:52 +0000 (+0200) Subject: ata: remove unused helper ata_id_lba48_enabled() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=67776a9ee69512b144250f1b9fbce4db76c0f3f8;p=linux.git ata: remove unused helper ata_id_lba48_enabled() Not only is this function unused, but even worse, the bit it is checking is actually used for signaling if the feature is supported, not enabled. Therefore, remove the unused helper function ata_id_lba48_enabled(). ata_id_has_lba48() is left unmodified, since this extra supported bit (Bit 10 of word 86) is simply a copy of the bit that ata_id_has_lba48() already checks (Bit 10 of word 83), see ACS-5 r10: 7.13.6.41 Words 85..87, 120: Commands and feature sets supported or enabled Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal --- diff --git a/include/linux/ata.h b/include/linux/ata.h index e3050e153a716..c04aca58448aa 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -698,15 +698,6 @@ static inline bool ata_id_has_lba48(const u16 *id) return id[ATA_ID_COMMAND_SET_2] & (1 << 10); } -static inline bool ata_id_lba48_enabled(const u16 *id) -{ - if (ata_id_has_lba48(id) == 0) - return false; - if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) - return false; - return id[ATA_ID_CFS_ENABLE_2] & (1 << 10); -} - static inline bool ata_id_hpa_enabled(const u16 *id) { /* Yes children, word 83 valid bits cover word 82 data */