public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: dlemoal@kernel.org
Cc: linux-ide@vger.kernel.org, wolf@yoxt.cc,
	Niklas Cassel <cassel@kernel.org>
Subject: [PATCH v2 5/6] ata: libata: Add DIPM and HIPM to ata_dev_print_features() early return
Date: Mon, 12 Jan 2026 13:20:50 +0100	[thread overview]
Message-ID: <20260112122044.143637-13-cassel@kernel.org> (raw)
In-Reply-To: <20260112122044.143637-8-cassel@kernel.org>

ata_dev_print_features() is supposed to return early and not print anything
if there are no features supported.

However, commit b1f5af54f1f5 ("ata: libata-core: Advertize device support
for DIPM and HIPM features") added additional features to
ata_dev_print_features() without updating the early return conditional.

Add the missing features to the early return conditional.

Fixes: b1f5af54f1f5 ("ata: libata-core: Advertize device support for DIPM and HIPM features")
Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
 drivers/ata/libata-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index d8397982144a..7656aea7663f 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2904,7 +2904,8 @@ static void ata_dev_config_lpm(struct ata_device *dev)
 
 static void ata_dev_print_features(struct ata_device *dev)
 {
-	if (!(dev->flags & ATA_DFLAG_FEATURES_MASK) && !dev->cpr_log)
+	if (!(dev->flags & ATA_DFLAG_FEATURES_MASK) && !dev->cpr_log &&
+	    !ata_id_has_hipm(dev->id) && !ata_id_has_dipm(dev->id))
 		return;
 
 	ata_dev_info(dev,
-- 
2.52.0


  parent reply	other threads:[~2026-01-12 12:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 12:20 [PATCH v2 0/6] misc LPM related fixes Niklas Cassel
2026-01-12 12:20 ` [PATCH v2 1/6] ata: ahci: Do not read the per port area for unimplemented ports Niklas Cassel
2026-01-12 12:20 ` [PATCH v2 2/6] ata: libata: Call ata_dev_config_lpm() for ATAPI devices Niklas Cassel
2026-01-12 12:20 ` [PATCH v2 3/6] ata: libata-sata: Improve link_power_management_supported sysfs attribute Niklas Cassel
2026-01-12 13:17   ` Damien Le Moal
2026-01-12 14:39     ` Niklas Cassel
2026-01-12 15:05       ` Damien Le Moal
2026-01-12 15:08         ` Niklas Cassel
2026-01-12 12:20 ` [PATCH v2 4/6] ata: libata: Add cpr_log to ata_dev_print_features() early return Niklas Cassel
2026-01-12 12:20 ` Niklas Cassel [this message]
2026-01-12 12:20 ` [PATCH v2 6/6] ata: libata: Print features also for ATAPI devices Niklas Cassel
2026-01-12 16:12 ` [PATCH v2 0/6] misc LPM related fixes wolf
2026-01-13 10:02 ` Damien Le Moal

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=20260112122044.143637-13-cassel@kernel.org \
    --to=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=wolf@yoxt.cc \
    /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