* [PATCH] mailbox: Clean up the usage of mailbox_client.h
@ 2026-01-26 23:02 Peng Fan (OSS)
2026-01-27 11:14 ` Sudeep Holla
0 siblings, 1 reply; 6+ messages in thread
From: Peng Fan (OSS) @ 2026-01-26 23:02 UTC (permalink / raw)
To: Jassi Brar, Sudeep Holla
Cc: Beleswar Padhi, Andrew Davis, Yuntao Dai, linux-kernel,
linux-acpi, mailbox, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
mailbox_client.h is should be used by consumer drivers, not mailbox
provider.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/mailbox/bcm-flexrm-mailbox.c | 1 -
drivers/mailbox/cv1800-mailbox.c | 1 -
drivers/mailbox/omap-mailbox.c | 1 -
drivers/mailbox/pcc.c | 1 -
4 files changed, 4 deletions(-)
diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-flexrm-mailbox.c
index 41f79e51d9e5a92089a3fd798e848d837fb2775a..5d278bb5a4c0635dfc46b4a6dc3addf0b3b5d1be 100644
--- a/drivers/mailbox/bcm-flexrm-mailbox.c
+++ b/drivers/mailbox/bcm-flexrm-mailbox.c
@@ -26,7 +26,6 @@
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mailbox_controller.h>
-#include <linux/mailbox_client.h>
#include <linux/mailbox/brcm-message.h>
#include <linux/module.h>
#include <linux/msi.h>
diff --git a/drivers/mailbox/cv1800-mailbox.c b/drivers/mailbox/cv1800-mailbox.c
index 4761191acf782654c1724df2c9cc619e1d7c985c..4bca9d8be4ba2c8debf6e48a5ddc2873f14b64fd 100644
--- a/drivers/mailbox/cv1800-mailbox.c
+++ b/drivers/mailbox/cv1800-mailbox.c
@@ -11,7 +11,6 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kfifo.h>
-#include <linux/mailbox_client.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/platform_device.h>
diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
index 17fe6545875d01606b80e678fca82bf44f6eaffa..d9f100c18895224cf323b073db93ce94d7e16d18 100644
--- a/drivers/mailbox/omap-mailbox.c
+++ b/drivers/mailbox/omap-mailbox.c
@@ -21,7 +21,6 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/mailbox_controller.h>
-#include <linux/mailbox_client.h>
#include "mailbox.h"
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 22e70af1ae5d14e6e8c684fe032c2864f6ae4d6c..6ca84596e7637114f66d32a95d12c863e942b756 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -55,7 +55,6 @@
#include <linux/log2.h>
#include <linux/platform_device.h>
#include <linux/mailbox_controller.h>
-#include <linux/mailbox_client.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <acpi/pcc.h>
---
base-commit: ca3a02fda4da8e2c1cb6baee5d72352e9e2cfaea
change-id: 20260127-mailbox-v1-1461cd2955fe
Best regards,
--
Peng Fan <peng.fan@nxp.com>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mailbox: Clean up the usage of mailbox_client.h
2026-01-26 23:02 [PATCH] mailbox: Clean up the usage of mailbox_client.h Peng Fan (OSS)
@ 2026-01-27 11:14 ` Sudeep Holla
2026-01-27 13:51 ` Peng Fan
0 siblings, 1 reply; 6+ messages in thread
From: Sudeep Holla @ 2026-01-27 11:14 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Jassi Brar, Sudeep Holla, Beleswar Padhi, Andrew Davis,
Yuntao Dai, linux-kernel, linux-acpi, mailbox, Peng Fan
On Tue, Jan 27, 2026 at 07:02:53AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> mailbox_client.h is should be used by consumer drivers, not mailbox
> provider.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/mailbox/bcm-flexrm-mailbox.c | 1 -
> drivers/mailbox/cv1800-mailbox.c | 1 -
> drivers/mailbox/omap-mailbox.c | 1 -
> drivers/mailbox/pcc.c | 1 -
> 4 files changed, 4 deletions(-)
>
[...]
>
> diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
> index 22e70af1ae5d14e6e8c684fe032c2864f6ae4d6c..6ca84596e7637114f66d32a95d12c863e942b756 100644
> --- a/drivers/mailbox/pcc.c
> +++ b/drivers/mailbox/pcc.c
> @@ -55,7 +55,6 @@
> #include <linux/log2.h>
> #include <linux/platform_device.h>
> #include <linux/mailbox_controller.h>
> -#include <linux/mailbox_client.h>
> #include <linux/io-64-nonatomic-lo-hi.h>
> #include <acpi/pcc.h>
>
There is a call to mbox_bind_client() in pcc.c that is declared in
linux/mailbox_client.h
You didn't see any build warning or errors with this change ? Esp if build
as module.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] mailbox: Clean up the usage of mailbox_client.h
2026-01-27 11:14 ` Sudeep Holla
@ 2026-01-27 13:51 ` Peng Fan
2026-01-27 14:47 ` Peng Fan
0 siblings, 1 reply; 6+ messages in thread
From: Peng Fan @ 2026-01-27 13:51 UTC (permalink / raw)
To: Sudeep Holla, Peng Fan (OSS)
Cc: Jassi Brar, Beleswar Padhi, Andrew Davis, Yuntao Dai,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
mailbox@lists.linux.dev
Hi Sudeep,
> Subject: Re: [PATCH] mailbox: Clean up the usage of mailbox_client.h
>
> On Tue, Jan 27, 2026 at 07:02:53AM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > mailbox_client.h is should be used by consumer drivers, not mailbox
> > provider.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> > drivers/mailbox/bcm-flexrm-mailbox.c | 1 -
> > drivers/mailbox/cv1800-mailbox.c | 1 -
> > drivers/mailbox/omap-mailbox.c | 1 -
> > drivers/mailbox/pcc.c | 1 -
> > 4 files changed, 4 deletions(-)
> >
>
> [...]
>
> >
> > diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index
> >
> 22e70af1ae5d14e6e8c684fe032c2864f6ae4d6c..6ca84596e7637114f6
> 6d32a95d12
> > c863e942b756 100644
> > --- a/drivers/mailbox/pcc.c
> > +++ b/drivers/mailbox/pcc.c
> > @@ -55,7 +55,6 @@
> > #include <linux/log2.h>
> > #include <linux/platform_device.h>
> > #include <linux/mailbox_controller.h> -#include
> > <linux/mailbox_client.h> #include <linux/io-64-nonatomic-lo-hi.h>
> > #include <acpi/pcc.h>
> >
>
> There is a call to mbox_bind_client() in pcc.c that is declared in
> linux/mailbox_client.h
Thanks for raising this.
>
> You didn't see any build warning or errors with this change ?
I not see build warning or errors with aarch64 yocto scarthgap
toolchain. Log as below:
~/l/linux-next (b4/mailbox-v1)> ./build.sh
*** Default configuration is based on 'defconfig'
#
# No change to .config
#
CALL scripts/checksyscalls.sh
CC drivers/mailbox/mailbox.o
CC drivers/mailbox/arm_mhu.o
CC drivers/mailbox/arm_mhu_db.o
CC drivers/mailbox/imx-mailbox.o
CC drivers/mailbox/platform_mhu.o
CC drivers/mailbox/pcc.o
CC drivers/mailbox/bcm2835-mailbox.o
Esp if
> build as module.
CONFIG_PCC could not be select as module.
TBH, per my understanding, pcc_mbox_request_channel
should be implemented in consumer driver.
drivers/mailbox/ is for mailbox controller.
Regards
Peng.
>
> --
> Regards,
> Sudeep
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] mailbox: Clean up the usage of mailbox_client.h
2026-01-27 13:51 ` Peng Fan
@ 2026-01-27 14:47 ` Peng Fan
2026-01-27 16:00 ` Sudeep Holla
0 siblings, 1 reply; 6+ messages in thread
From: Peng Fan @ 2026-01-27 14:47 UTC (permalink / raw)
To: Peng Fan, Sudeep Holla, Peng Fan (OSS)
Cc: Jassi Brar, Beleswar Padhi, Andrew Davis, Yuntao Dai,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
mailbox@lists.linux.dev
> Subject: RE: [PATCH] mailbox: Clean up the usage of mailbox_client.h
>
> Hi Sudeep,
>
> > Subject: Re: [PATCH] mailbox: Clean up the usage of mailbox_client.h
> >
> > On Tue, Jan 27, 2026 at 07:02:53AM +0800, Peng Fan (OSS) wrote:
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > mailbox_client.h is should be used by consumer drivers, not
> mailbox
> > > provider.
> > >
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > > drivers/mailbox/bcm-flexrm-mailbox.c | 1 -
> > > drivers/mailbox/cv1800-mailbox.c | 1 -
> > > drivers/mailbox/omap-mailbox.c | 1 -
> > > drivers/mailbox/pcc.c | 1 -
> > > 4 files changed, 4 deletions(-)
> > >
> >
> > [...]
> >
> > >
> > > diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index
> > >
> >
> 22e70af1ae5d14e6e8c684fe032c2864f6ae4d6c..6ca84596e7637114f6
> > 6d32a95d12
> > > c863e942b756 100644
> > > --- a/drivers/mailbox/pcc.c
> > > +++ b/drivers/mailbox/pcc.c
> > > @@ -55,7 +55,6 @@
> > > #include <linux/log2.h>
> > > #include <linux/platform_device.h>
> > > #include <linux/mailbox_controller.h> -#include
> > > <linux/mailbox_client.h> #include <linux/io-64-nonatomic-lo-hi.h>
> > > #include <acpi/pcc.h>
> > >
> >
> > There is a call to mbox_bind_client() in pcc.c that is declared in
> > linux/mailbox_client.h
>
> Thanks for raising this.
Check again.
include/acpi/pcc.h includes mailbox_client.h
Regards
Peng.
>
> >
> > You didn't see any build warning or errors with this change ?
>
> I not see build warning or errors with aarch64 yocto scarthgap
> toolchain. Log as below:
>
> ~/l/linux-next (b4/mailbox-v1)> ./build.sh
> *** Default configuration is based on 'defconfig'
> #
> # No change to .config
> #
> CALL scripts/checksyscalls.sh
> CC drivers/mailbox/mailbox.o
> CC drivers/mailbox/arm_mhu.o
> CC drivers/mailbox/arm_mhu_db.o
> CC drivers/mailbox/imx-mailbox.o
> CC drivers/mailbox/platform_mhu.o
> CC drivers/mailbox/pcc.o
> CC drivers/mailbox/bcm2835-mailbox.o
>
> Esp if
> > build as module.
>
> CONFIG_PCC could not be select as module.
>
> TBH, per my understanding, pcc_mbox_request_channel should be
> implemented in consumer driver.
> drivers/mailbox/ is for mailbox controller.
>
> Regards
> Peng.
>
> >
> > --
> > Regards,
> > Sudeep
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mailbox: Clean up the usage of mailbox_client.h
2026-01-27 14:47 ` Peng Fan
@ 2026-01-27 16:00 ` Sudeep Holla
2026-01-28 7:50 ` Peng Fan
0 siblings, 1 reply; 6+ messages in thread
From: Sudeep Holla @ 2026-01-27 16:00 UTC (permalink / raw)
To: Peng Fan
Cc: Peng Fan (OSS), Sudeep Holla, Jassi Brar, Beleswar Padhi,
Andrew Davis, Yuntao Dai, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, mailbox@lists.linux.dev
On Tue, Jan 27, 2026 at 02:47:33PM +0000, Peng Fan wrote:
> > Subject: RE: [PATCH] mailbox: Clean up the usage of mailbox_client.h
> >
> > Hi Sudeep,
> >
> > > Subject: Re: [PATCH] mailbox: Clean up the usage of mailbox_client.h
> > >
> > > On Tue, Jan 27, 2026 at 07:02:53AM +0800, Peng Fan (OSS) wrote:
> > > > From: Peng Fan <peng.fan@nxp.com>
> > > >
> > > > mailbox_client.h is should be used by consumer drivers, not
> > mailbox
> > > > provider.
> > > >
> > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > ---
> > > > drivers/mailbox/bcm-flexrm-mailbox.c | 1 -
> > > > drivers/mailbox/cv1800-mailbox.c | 1 -
> > > > drivers/mailbox/omap-mailbox.c | 1 -
> > > > drivers/mailbox/pcc.c | 1 -
> > > > 4 files changed, 4 deletions(-)
> > > >
> > >
> > > [...]
> > >
> > > >
> > > > diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index
> > > >
> > >
> > 22e70af1ae5d14e6e8c684fe032c2864f6ae4d6c..6ca84596e7637114f6
> > > 6d32a95d12
> > > > c863e942b756 100644
> > > > --- a/drivers/mailbox/pcc.c
> > > > +++ b/drivers/mailbox/pcc.c
> > > > @@ -55,7 +55,6 @@
> > > > #include <linux/log2.h>
> > > > #include <linux/platform_device.h>
> > > > #include <linux/mailbox_controller.h> -#include
> > > > <linux/mailbox_client.h> #include <linux/io-64-nonatomic-lo-hi.h>
> > > > #include <acpi/pcc.h>
> > > >
> > >
> > > There is a call to mbox_bind_client() in pcc.c that is declared in
> > > linux/mailbox_client.h
> >
> > Thanks for raising this.
>
> Check again.
>
> include/acpi/pcc.h includes mailbox_client.h
>
I see, I missed that. I’m fine with removing it, but the commit message
doesn’t really apply here since it’s getting included anyway. I don’t see
much point in removing it, but I’m fine either way.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mailbox: Clean up the usage of mailbox_client.h
2026-01-27 16:00 ` Sudeep Holla
@ 2026-01-28 7:50 ` Peng Fan
0 siblings, 0 replies; 6+ messages in thread
From: Peng Fan @ 2026-01-28 7:50 UTC (permalink / raw)
To: Sudeep Holla
Cc: Peng Fan, Jassi Brar, Beleswar Padhi, Andrew Davis, Yuntao Dai,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
mailbox@lists.linux.dev
On Tue, Jan 27, 2026 at 04:00:39PM +0000, Sudeep Holla wrote:
>On Tue, Jan 27, 2026 at 02:47:33PM +0000, Peng Fan wrote:
[...]
>> > > > #include <linux/mailbox_controller.h> -#include
>> > > > <linux/mailbox_client.h> #include <linux/io-64-nonatomic-lo-hi.h>
>> > > > #include <acpi/pcc.h>
>> > > >
>> > >
>> > > There is a call to mbox_bind_client() in pcc.c that is declared in
>> > > linux/mailbox_client.h
>> >
>> > Thanks for raising this.
>>
>> Check again.
>>
>> include/acpi/pcc.h includes mailbox_client.h
>>
>
>I see, I missed that. I’m fine with removing it, but the commit message
>doesn’t really apply here since it’s getting included anyway. I don’t see
>much point in removing it, but I’m fine either way.
I will remove the change to pcc.c in V2, since this driver uses
mbox_bind_client().
Thanks,
Peng
>--
>Regards,
>Sudeep
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-28 7:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-26 23:02 [PATCH] mailbox: Clean up the usage of mailbox_client.h Peng Fan (OSS)
2026-01-27 11:14 ` Sudeep Holla
2026-01-27 13:51 ` Peng Fan
2026-01-27 14:47 ` Peng Fan
2026-01-27 16:00 ` Sudeep Holla
2026-01-28 7:50 ` Peng Fan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox