mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: "Markus Schneider-Pargmann (TI.com)" <msp@baylibre.com>,
	Nishanth Menon <nm@ti.com>, Tero Kristo <kristo@kernel.org>,
	Santosh Shilimkar <ssantosh@kernel.org>
Cc: Vishal Mahaveer <vishalm@ti.com>,
	Kevin Hilman <khilman@baylibre.com>, Dhruva Gole <d-gole@ti.com>,
	Sebin Francis <sebin.francis@ti.com>,
	"Kendall Willis" <k-willis@ti.com>,
	Akashdeep Kaur <a-kaur@ti.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v9 1/3] firmware: ti_sci: Remove constant 0 function arguments
Date: Thu, 30 Oct 2025 09:13:19 -0500	[thread overview]
Message-ID: <1b3f183f-3923-4183-a237-861e4f886958@ti.com> (raw)
In-Reply-To: <20251030-topic-am62-partialio-v6-12-b4-v9-1-074f55d9c16b@baylibre.com>

On 10/30/25 4:26 AM, Markus Schneider-Pargmann (TI.com) wrote:
> ti_sci_cmd_prepare_sleep takes three arguments ctx_lo, ctx_hi and
> debug_flags which are always 0 for the caller. Remove these arguments as
> they are basically unused.
> 

They might not be used today, but the TI-SCI command does support
passing them, so why remove that ability from the wrapper function?

Andrew

> Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
> ---
>   drivers/firmware/ti_sci.c | 15 +++++----------
>   1 file changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> index 49fd2ae01055d0f425062147422471f0fd49e4bd..24ab392b4a5d0460153de76fe382371e319d8f2e 100644
> --- a/drivers/firmware/ti_sci.c
> +++ b/drivers/firmware/ti_sci.c
> @@ -1661,14 +1661,10 @@ static int ti_sci_cmd_clk_get_freq(const struct ti_sci_handle *handle,
>    * ti_sci_cmd_prepare_sleep() - Prepare system for system suspend
>    * @handle:		pointer to TI SCI handle
>    * @mode:		Device identifier
> - * @ctx_lo:		Low part of address for context save
> - * @ctx_hi:		High part of address for context save
> - * @debug_flags:	Debug flags to pass to firmware
>    *
>    * Return: 0 if all went well, else returns appropriate error value.
>    */
> -static int ti_sci_cmd_prepare_sleep(const struct ti_sci_handle *handle, u8 mode,
> -				    u32 ctx_lo, u32 ctx_hi, u32 debug_flags)
> +static int ti_sci_cmd_prepare_sleep(const struct ti_sci_handle *handle, u8 mode)
>   {
>   	struct ti_sci_info *info;
>   	struct ti_sci_msg_req_prepare_sleep *req;
> @@ -1696,9 +1692,9 @@ static int ti_sci_cmd_prepare_sleep(const struct ti_sci_handle *handle, u8 mode,
>   
>   	req = (struct ti_sci_msg_req_prepare_sleep *)xfer->xfer_buf;
>   	req->mode = mode;
> -	req->ctx_lo = ctx_lo;
> -	req->ctx_hi = ctx_hi;
> -	req->debug_flags = debug_flags;
> +	req->ctx_lo = 0;
> +	req->ctx_hi = 0;
> +	req->debug_flags = 0;
>   
>   	ret = ti_sci_do_xfer(info, xfer);
>   	if (ret) {
> @@ -3689,8 +3685,7 @@ static int ti_sci_prepare_system_suspend(struct ti_sci_info *info)
>   			 * internal use and can be 0
>   			 */
>   			return ti_sci_cmd_prepare_sleep(&info->handle,
> -							TISCI_MSG_VALUE_SLEEP_MODE_DM_MANAGED,
> -							0, 0, 0);
> +							TISCI_MSG_VALUE_SLEEP_MODE_DM_MANAGED);
>   		} else {
>   			/* DM Managed is not supported by the firmware. */
>   			dev_err(info->dev, "Suspend to memory is not supported by the firmware\n");
> 


  reply	other threads:[~2025-10-30 14:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30  9:26 [PATCH v9 0/3] firmware: ti_sci: Partial-IO support Markus Schneider-Pargmann (TI.com)
2025-10-30  9:26 ` [PATCH v9 1/3] firmware: ti_sci: Remove constant 0 function arguments Markus Schneider-Pargmann (TI.com)
2025-10-30 14:13   ` Andrew Davis [this message]
2025-10-30 16:57     ` Markus Schneider-Pargmann
2025-10-30  9:26 ` [PATCH v9 2/3] firmware: ti_sci: Support transfers without response Markus Schneider-Pargmann (TI.com)
2025-10-30  9:26 ` [PATCH v9 3/3] firmware: ti_sci: Partial-IO support Markus Schneider-Pargmann (TI.com)
2025-10-30 14:24   ` Andrew Davis
2025-11-03 10:31     ` Markus Schneider-Pargmann
2025-11-03 14:10       ` Andrew Davis
2025-11-01 16:25   ` kernel test robot

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=1b3f183f-3923-4183-a237-861e4f886958@ti.com \
    --to=afd@ti.com \
    --cc=a-kaur@ti.com \
    --cc=d-gole@ti.com \
    --cc=k-willis@ti.com \
    --cc=khilman@baylibre.com \
    --cc=kristo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msp@baylibre.com \
    --cc=nm@ti.com \
    --cc=sebin.francis@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=vishalm@ti.com \
    /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

all inboxes | Powered by JetHome®