mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V2 3/3] arm_scpi: Rev last modify to support acpi
@ 2022-11-24  9:59 Wang Honghui
  2022-11-24 11:14 ` Sudeep Holla
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Honghui @ 2022-11-24  9:59 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, linux-arm-kernel, linux-kernel

Rev last modify to support acpi

Signed-off-by: Wang Honghui <honghui.wang@ucas.com.cn>
---
 drivers/firmware/arm_scpi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index e2e90dcc38bd..aca0a9780c12 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -908,7 +908,9 @@ static const struct of_device_id shmem_of_match[] __maybe_unused = {
 	{ }
 };
 
+#ifdef CONFIG_PHYTIUM_MBOX
 extern struct mbox_chan *phytium_mbox_request_channel(struct mbox_client *cl);
+#endif
 
 static int scpi_probe(struct platform_device *pdev)
 {
@@ -1047,6 +1049,7 @@ static int scpi_probe(struct platform_device *pdev)
 
                         ret = scpi_alloc_xfer_list(dev, pchan);
 
+#ifdef phytium_mbox_request_channel
                         if (!ret) {
                                 pchan->chan = phytium_mbox_request_channel(cl);
 
@@ -1058,6 +1061,7 @@ static int scpi_probe(struct platform_device *pdev)
                                         dev_err(dev, "failed to get channel%d err %d\n",
                                                 idx, ret);
                         }
+#endif
 
                         return ret;
                 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V2 3/3] arm_scpi: Rev last modify to support acpi
  2022-11-24  9:59 [PATCH V2 3/3] arm_scpi: Rev last modify to support acpi Wang Honghui
@ 2022-11-24 11:14 ` Sudeep Holla
  2022-11-24 12:26   ` 王洪辉
  0 siblings, 1 reply; 3+ messages in thread
From: Sudeep Holla @ 2022-11-24 11:14 UTC (permalink / raw)
  To: Wang Honghui; +Cc: Cristian Marussi, linux-arm-kernel, linux-kernel

On Thu, Nov 24, 2022 at 05:59:47PM +0800, Wang Honghui wrote:
> Rev last modify to support acpi
> 
> Signed-off-by: Wang Honghui <honghui.wang@ucas.com.cn>
> ---
>  drivers/firmware/arm_scpi.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
> index e2e90dcc38bd..aca0a9780c12 100644
> --- a/drivers/firmware/arm_scpi.c
> +++ b/drivers/firmware/arm_scpi.c
> @@ -908,7 +908,9 @@ static const struct of_device_id shmem_of_match[] __maybe_unused = {
>  	{ }
>  };
>  
> +#ifdef CONFIG_PHYTIUM_MBOX
>  extern struct mbox_chan *phytium_mbox_request_channel(struct mbox_client *cl);
> +#endif

I have already NACK the approach you have taken for SCPI + ACPI. Just forgot
to mention SCPI is old and deprecated protocol and SCMI replaced it. You
much be using that if possible.

Anyways, this kind of #ifdeffery is not allowed in any generic code even if
I agreed with the approach. So please don't change the code in such a way.

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V2 3/3] arm_scpi: Rev last modify to support acpi
  2022-11-24 11:14 ` Sudeep Holla
@ 2022-11-24 12:26   ` 王洪辉
  0 siblings, 0 replies; 3+ messages in thread
From: 王洪辉 @ 2022-11-24 12:26 UTC (permalink / raw)
  To: Sudeep Holla; +Cc: Cristian Maruss, linux-arm-kernel, linux-kernel

Ok!

Thanks,
Best Regards!

Wang Honghui

  ------------------ Original ------------------From:  "Sudeep Holla"<sudeep.holla@arm.com>;Date:  Thu, Nov 24, 2022 07:15 PMTo:  "Wang Honghui"<honghui.wang@ucas.com.cn>; Cc:  "Cristian Maruss"<cristian.marussi@arm.com>; "linux-arm-kernel"<linux-arm-kernel@lists.infradead.org>; "linux-kernel"<linux-kernel@vger.kernel.org>; Subject:  Re: [PATCH V2 3/3] arm_scpi: Rev last modify to support acpi On Thu, Nov 24, 2022 at 05:59:47PM +0800, Wang Honghui wrote:> Rev last modify to support acpi> > Signed-off-by: Wang Honghui <honghui.wang@ucas.com.cn>> --->  drivers/firmware/arm_scpi.c | 4 ++++>  1 file changed, 4 insertions(+)> > diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c> index e2e90dcc38bd..aca0a9780c12 100644> --- a/drivers/firmware/arm_scpi.c> +++ b/drivers/firmware/arm_scpi.c> @@ -908,7 +908,9 @@ static const struct of_device_id shmem_of_match[] __maybe_unused = {> { }>  };>  > +#ifdef CONFIG_PHYTIUM_MBOX>  extern struct mbox_chan *phytium_mbox_request_channel(struct mbox_client *cl);> +#endifI have already NACK the approach you have taken for SCPI + ACPI. Just forgotto mention SCPI is old and deprecated protocol and SCMI replaced it. Youmuch be using that if possible.Anyways, this kind of #ifdeffery is not allowed in any generic code even ifI agreed with the approach. So please don't change the code in such a way.-- Regards,Sudeep

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-24 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24  9:59 [PATCH V2 3/3] arm_scpi: Rev last modify to support acpi Wang Honghui
2022-11-24 11:14 ` Sudeep Holla
2022-11-24 12:26   ` 王洪辉

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®