From: Igor Pylypiv <ipylypiv@google.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>
Subject: Re: [PATCH v4 2/3] ata: libata: Rename ata_dev_blacklisted()
Date: Tue, 23 Jul 2024 19:29:05 +0000 [thread overview]
Message-ID: <ZqAEgbBuDx-KVc5l@google.com> (raw)
In-Reply-To: <20240723103406.294462-3-dlemoal@kernel.org>
On Tue, Jul 23, 2024 at 07:34:05PM +0900, Damien Le Moal wrote:
> Rename the function ata_dev_blacklisted() to ata_dev_horkage() as this
> new name:
> 1) Does not use an expression that can be considered as negatively loaded.
> 2) The name does not reflect what the function actually does, which is
> returning a set of horkage flag for the device, of which only one
> flag will completely disable the device.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
Thanks,
Igor
>
> ---
> drivers/ata/libata-core.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 286e1bc02540..ee958d2893e6 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -84,7 +84,7 @@ static unsigned int ata_dev_init_params(struct ata_device *dev,
> u16 heads, u16 sectors);
> static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
> static void ata_dev_xfermask(struct ata_device *dev);
> -static unsigned long ata_dev_blacklisted(const struct ata_device *dev);
> +static unsigned long ata_dev_horkage(const struct ata_device *dev);
>
> static DEFINE_IDA(ata_ida);
>
> @@ -2223,7 +2223,7 @@ static inline u8 ata_dev_knobble(struct ata_device *dev)
> {
> struct ata_port *ap = dev->link->ap;
>
> - if (ata_dev_blacklisted(dev) & ATA_HORKAGE_BRIDGE_OK)
> + if (ata_dev_horkage(dev) & ATA_HORKAGE_BRIDGE_OK)
> return 0;
>
> return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
> @@ -2830,7 +2830,7 @@ int ata_dev_configure(struct ata_device *dev)
> }
>
> /* set horkage */
> - dev->horkage |= ata_dev_blacklisted(dev);
> + dev->horkage |= ata_dev_horkage(dev);
> ata_force_horkage(dev);
>
> if (dev->horkage & ATA_HORKAGE_DISABLE) {
> @@ -3987,13 +3987,13 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
> return rc;
> }
>
> -struct ata_blacklist_entry {
> +struct ata_dev_horkage_entry {
> const char *model_num;
> const char *model_rev;
> unsigned long horkage;
> };
>
> -static const struct ata_blacklist_entry ata_device_blacklist [] = {
> +static const struct ata_dev_horkage_entry ata_dev_horkages[] = {
> /* Devices with DMA related problems under Linux */
> { "WDC AC11000H", NULL, ATA_HORKAGE_NODMA },
> { "WDC AC22100H", NULL, ATA_HORKAGE_NODMA },
> @@ -4111,7 +4111,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
>
> /* Devices which get the IVB wrong */
> { "QUANTUM FIREBALLlct10 05", "A03.0900", ATA_HORKAGE_IVB },
> - /* Maybe we should just blacklist TSSTcorp... */
> + /* Maybe we should just add all TSSTcorp devices... */
> { "TSSTcorp CDDVDW SH-S202[HJN]", "SB0[01]", ATA_HORKAGE_IVB },
>
> /* Devices that do not need bridging limits applied */
> @@ -4266,11 +4266,11 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
> { }
> };
>
> -static unsigned long ata_dev_blacklisted(const struct ata_device *dev)
> +static unsigned long 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_blacklist_entry *ad = ata_device_blacklist;
> + const struct ata_dev_horkage_entry *ad = ata_dev_horkages;
>
> ata_id_c_string(dev->id, model_num, ATA_ID_PROD, sizeof(model_num));
> ata_id_c_string(dev->id, model_rev, ATA_ID_FW_REV, sizeof(model_rev));
> @@ -4372,8 +4372,7 @@ static int cable_is_40wire(struct ata_port *ap)
> *
> * Compute supported xfermask of @dev and store it in
> * dev->*_mask. This function is responsible for applying all
> - * known limits including host controller limits, device
> - * blacklist, etc...
> + * known limits including host controller limits, device horkages, etc...
> *
> * LOCKING:
> * None.
> --
> 2.45.2
>
>
next prev parent reply other threads:[~2024-07-23 19:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 10:34 [PATCH v4 0/3] Some renaming and horkage improvements Damien Le Moal
2024-07-23 10:34 ` [PATCH v4 1/3] ata: libata: Rename ata_dma_blacklisted() Damien Le Moal
2024-07-23 13:34 ` John Garry
2024-07-23 19:28 ` Igor Pylypiv
2024-07-23 10:34 ` [PATCH v4 2/3] ata: libata: Rename ata_dev_blacklisted() Damien Le Moal
2024-07-23 19:29 ` Igor Pylypiv [this message]
2024-07-23 10:34 ` [PATCH v4 3/3] ata: libata: Print horkages applied to devices Damien Le Moal
2024-07-23 19:41 ` Igor Pylypiv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZqAEgbBuDx-KVc5l@google.com \
--to=ipylypiv@google.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).