On 7/23/24 06:30, Igor Pylypiv wrote: >> static const struct ata_dev_horkage_entry ata_dev_horkages[] = { >> @@ -4266,21 +4329,24 @@ static const struct ata_dev_horkage_entry ata_dev_horkages[] = { >> { } >> }; >> >> -static unsigned long ata_dev_horkage(const struct ata_device *dev) >> +static unsigned int ata_dev_horkage(const struct ata_device *dev) >> { >> unsigned char model_num[ATA_ID_PROD_LEN + 1]; >> unsigned char model_rev[ATA_ID_FW_REV_LEN + 1]; >> const struct ata_dev_horkage_entry *ad = ata_dev_horkages; >> >> + /* dev->horkage is an unsigned int. */ >> + BUILD_BUG_ON(__ATA_HORKAGE_MAX > 31); > > Should this check be '__ATA_HORKAGE_MAX > 32'? > > When __ATA_HORKAGE_MAX is 32 then the last horkage bit will be 31. Oops... Yes, of course you are right. Good catch. >> +enum ata_horkage { >> + __ATA_HORKAGE_DIAGNOSTIC, /* Failed boot diag */ >> + __ATA_HORKAGE_NODMA, /* DMA problems */ >> + __ATA_HORKAGE_NONCQ, /* Don't use NCQ */ >> + __ATA_HORKAGE_MAX_SEC_128, /* Limit max sects to 128 */ >> + __ATA_HORKAGE_BROKEN_HPA, /* Broken HPA */ >> + __ATA_HORKAGE_DISABLE, /* Disable it */ >> + __ATA_HORKAGE_HPA_SIZE, /* native size off by one */ >> + __ATA_HORKAGE_IVB, /* cbl det validity bit bugs */ >> + __ATA_HORKAGE_STUCK_ERR, /* stuck ERR on next PACKET */ >> + __ATA_HORKAGE_BRIDGE_OK, /* no bridge limits */ >> + __ATA_HORKAGE_ATAPI_MOD16_DMA, /* use ATAPI DMA for commands >> + not multiple of 16 bytes */ >> + __ATA_HORKAGE_FIRMWARE_WARN, /* firmware update warning */ >> + __ATA_HORKAGE_1_5_GBPS, /* force 1.5 Gbps */ >> + __ATA_HORKAGE_NOSETXFER, /* skip SETXFER, SATA only */ > nit: extra tab ^^^^^^^^ Yep. Fixed. -- Damien Le Moal Western Digital Research