From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>,
linuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@kernel.org>, Kees Cook <kees@kernel.org>
Subject: Re: [PATCH] powerpc/powermac: Remove pmac_low_i2c_{lock,unlock}()
Date: Sat, 14 Mar 2026 08:46:27 +0100 [thread overview]
Message-ID: <95fdd9f7-f7b7-4ab4-9506-f952b9af3a33@kernel.org> (raw)
In-Reply-To: <20260313194430.2396286-1-bvanassche@acm.org>
Le 13/03/2026 à 20:44, Bart Van Assche a écrit :
> I haven't been able to find any callers of the functions mentioned in
> the subject in the kernel tree nor in the history of the kernel tree.
> Hence, remove these two functions.
As far as I can see it was used by i2c-keywest driver until commit
a28d3af2a26c ("[PATCH] 2/5 powerpc: Rework PowerMac i2c part 2")
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
if (pmac_low_i2c_lock(iface->node))
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
if (pmac_low_i2c_lock(iface->node))
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
if (pmac_low_i2c_lock(np))
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
if (pmac_low_i2c_lock(iface->node))
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(iface->node);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(iface->node);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(np);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(np);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(np);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(np);
a28d3af2a26c89aaa6470ca36edb212e05143d67~:drivers/i2c/busses/i2c-keywest.c:
pmac_low_i2c_unlock(iface->node);
>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
> ---
> arch/powerpc/include/asm/pmac_low_i2c.h | 4 ---
> arch/powerpc/platforms/powermac/low_i2c.c | 34 -----------------------
> 2 files changed, 38 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/pmac_low_i2c.h b/arch/powerpc/include/asm/pmac_low_i2c.h
> index 21bd7297c87f..fead8fae08ab 100644
> --- a/arch/powerpc/include/asm/pmac_low_i2c.h
> +++ b/arch/powerpc/include/asm/pmac_low_i2c.h
> @@ -79,10 +79,6 @@ extern int pmac_i2c_match_adapter(struct device_node *dev,
> struct i2c_adapter *adapter);
>
>
> -/* (legacy) Locking functions exposed to i2c-keywest */
> -extern int pmac_low_i2c_lock(struct device_node *np);
> -extern int pmac_low_i2c_unlock(struct device_node *np);
> -
> /* Access functions for platform code */
> extern int pmac_i2c_open(struct pmac_i2c_bus *bus, int polled);
> extern void pmac_i2c_close(struct pmac_i2c_bus *bus);
> diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
> index 73b7f4e8c047..da72a30ab865 100644
> --- a/arch/powerpc/platforms/powermac/low_i2c.c
> +++ b/arch/powerpc/platforms/powermac/low_i2c.c
> @@ -1058,40 +1058,6 @@ int pmac_i2c_match_adapter(struct device_node *dev, struct i2c_adapter *adapter)
> }
> EXPORT_SYMBOL_GPL(pmac_i2c_match_adapter);
>
> -int pmac_low_i2c_lock(struct device_node *np)
> -{
> - struct pmac_i2c_bus *bus, *found = NULL;
> -
> - list_for_each_entry(bus, &pmac_i2c_busses, link) {
> - if (np == bus->controller) {
> - found = bus;
> - break;
> - }
> - }
> - if (!found)
> - return -ENODEV;
> - return pmac_i2c_open(bus, 0);
> -}
> -EXPORT_SYMBOL_GPL(pmac_low_i2c_lock);
> -
> -int pmac_low_i2c_unlock(struct device_node *np)
> -{
> - struct pmac_i2c_bus *bus, *found = NULL;
> -
> - list_for_each_entry(bus, &pmac_i2c_busses, link) {
> - if (np == bus->controller) {
> - found = bus;
> - break;
> - }
> - }
> - if (!found)
> - return -ENODEV;
> - pmac_i2c_close(bus);
> - return 0;
> -}
> -EXPORT_SYMBOL_GPL(pmac_low_i2c_unlock);
> -
> -
> int pmac_i2c_open(struct pmac_i2c_bus *bus, int polled)
> {
> int rc;
next prev parent reply other threads:[~2026-03-14 7:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 19:44 [PATCH] powerpc/powermac: Remove pmac_low_i2c_{lock,unlock}() Bart Van Assche
2026-03-14 7:46 ` Christophe Leroy (CS GROUP) [this message]
2026-03-16 17:24 ` Bart Van Assche
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=95fdd9f7-f7b7-4ab4-9506-f952b9af3a33@kernel.org \
--to=chleroy@kernel.org \
--cc=bvanassche@acm.org \
--cc=kees@kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=tglx@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