From: Damien Le Moal <dlemoal@kernel.org>
To: linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>
Subject: [PATCH v2 2/4] ata: libata-core: Make ata_dev_cleanup_cdl_resources() static
Date: Thu, 3 Jul 2025 19:36:20 +0900 [thread overview]
Message-ID: <20250703103622.291272-3-dlemoal@kernel.org> (raw)
In-Reply-To: <20250703103622.291272-1-dlemoal@kernel.org>
The function ata_dev_cleanup_cdl_resources() is called only from
ata_dev_init_cdl_resources() and ata_dev_free_resources() which are
both defined in drivers/ata/libata-core.c. So there is no need for
ata_dev_cleanup_cdl_resources() to be visible from outside of this
file. Change this function definition to be a static function.
No functional changes.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
---
drivers/ata/libata-core.c | 2 +-
drivers/ata/libata.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 30913bc6fe21..72abd2996e9c 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2516,7 +2516,7 @@ static void ata_dev_config_trusted(struct ata_device *dev)
dev->flags |= ATA_DFLAG_TRUSTED;
}
-void ata_dev_cleanup_cdl_resources(struct ata_device *dev)
+static void ata_dev_cleanup_cdl_resources(struct ata_device *dev)
{
kfree(dev->cdl);
dev->cdl = NULL;
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 8e68f4556962..767a61f8ff89 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -97,7 +97,6 @@ extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
extern const char *sata_spd_string(unsigned int spd);
extern unsigned int ata_read_log_page(struct ata_device *dev, u8 log,
u8 page, void *buf, unsigned int sectors);
-void ata_dev_cleanup_cdl_resources(struct ata_device *dev);
#define to_ata_port(d) container_of(d, struct ata_port, tdev)
--
2.50.0
next prev parent reply other threads:[~2025-07-03 10:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 10:36 [PATCH v2 0/4] Improve log directory handling and some cleanups Damien Le Moal
2025-07-03 10:36 ` [PATCH v2 1/4] ata: libata-core: Cache the general purpose log directory Damien Le Moal
2025-07-03 10:45 ` Niklas Cassel
2025-07-03 10:36 ` Damien Le Moal [this message]
2025-07-03 10:36 ` [PATCH v2 3/4] ata: libata-eh: Rename and make ata_set_mode() static Damien Le Moal
2025-07-03 10:48 ` Niklas Cassel
2025-07-03 10:36 ` [PATCH v2 4/4] ata: libata-core: Rename ata_do_set_mode() Damien Le Moal
2025-07-03 10:48 ` Niklas Cassel
2025-07-04 8:37 ` [PATCH v2 0/4] Improve log directory handling and some cleanups Niklas Cassel
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=20250703103622.291272-3-dlemoal@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@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).