From: Johan Hovold <johan@kernel.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
Johan Hovold <johan@kernel.org>
Subject: [PATCH 5/5] MIPS: ip22-gio: do not export device release function
Date: Fri, 24 Apr 2026 12:28:49 +0200 [thread overview]
Message-ID: <20260424102849.2616035-6-johan@kernel.org> (raw)
In-Reply-To: <20260424102849.2616035-1-johan@kernel.org>
There is no need to export the gio device release function as the
devices are reference counted.
Drop the export along with the unused inline wrapper.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
arch/mips/include/asm/gio_device.h | 6 ------
arch/mips/sgi-ip22/ip22-gio.c | 3 +--
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/arch/mips/include/asm/gio_device.h b/arch/mips/include/asm/gio_device.h
index 159087f5386e..f9c102f038d6 100644
--- a/arch/mips/include/asm/gio_device.h
+++ b/arch/mips/include/asm/gio_device.h
@@ -37,12 +37,6 @@ extern void gio_dev_put(struct gio_device *);
extern int gio_device_register(struct gio_device *);
extern void gio_device_unregister(struct gio_device *);
-extern void gio_release_dev(struct device *);
-
-static inline void gio_device_free(struct gio_device *dev)
-{
- gio_release_dev(&dev->dev);
-}
extern int gio_register_driver(struct gio_driver *);
extern void gio_unregister_driver(struct gio_driver *);
diff --git a/arch/mips/sgi-ip22/ip22-gio.c b/arch/mips/sgi-ip22/ip22-gio.c
index d29067430b44..54e17c8693e2 100644
--- a/arch/mips/sgi-ip22/ip22-gio.c
+++ b/arch/mips/sgi-ip22/ip22-gio.c
@@ -80,14 +80,13 @@ EXPORT_SYMBOL_GPL(gio_dev_put);
* Will be called only by the device core when all users of this gio device are
* done.
*/
-void gio_release_dev(struct device *dev)
+static void gio_release_dev(struct device *dev)
{
struct gio_device *giodev;
giodev = to_gio_device(dev);
kfree(giodev);
}
-EXPORT_SYMBOL_GPL(gio_release_dev);
int gio_device_register(struct gio_device *giodev)
{
--
2.53.0
prev parent reply other threads:[~2026-04-24 10:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 10:28 [PATCH 0/5] MIPS: ip22-gio: fix leaks and replace static root Johan Hovold
2026-04-24 10:28 ` [PATCH 1/5] MIPS: ip22-gio: fix kfree() of static object Johan Hovold
2026-04-24 10:28 ` [PATCH 2/5] MIPS: ip22-gio: fix gio device memory leak Johan Hovold
2026-04-24 10:28 ` [PATCH 3/5] MIPS: ip22-gio: fix device reference leak in probe Johan Hovold
2026-04-24 10:28 ` [PATCH 4/5] MIPS: ip22-gio: switch to dynamic root device Johan Hovold
2026-04-24 10:28 ` Johan Hovold [this message]
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=20260424102849.2616035-6-johan@kernel.org \
--to=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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