public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <corey@minyard.net>
To: Cosmo Chou <chou.cosmo@gmail.com>
Cc: minyard@acm.org, quan@os.amperecomputing.com,
	openipmi-developer@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, cosmo.chou@quantatw.com,
	potin.lai@quantatw.com
Subject: Re: [PATCH] ipmi: ssif_bmc: Move smbus_cmd assignment after cleanup
Date: Thu, 2 Jan 2025 21:20:08 -0600	[thread overview]
Message-ID: <Z3dXaMlZ1zTt5HHd@mail.minyard.net> (raw)
In-Reply-To: <20250101165431.2113407-1-chou.cosmo@gmail.com>

On Thu, Jan 02, 2025 at 12:54:31AM +0800, Cosmo Chou wrote:
> Move smbus_cmd assignment to the end of process_smbus_cmd() to ensure
> the new command is not lost when complete_response() is triggered.

Ok, I see, patch is applied.  Thank you.

Quan, I assume this is ok.  Please double-check it for me.

-corey

> 
> Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
> Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com>
> ---
>  drivers/char/ipmi/ssif_bmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/ipmi/ssif_bmc.c b/drivers/char/ipmi/ssif_bmc.c
> index a14fafc583d4..7a4f52987a7d 100644
> --- a/drivers/char/ipmi/ssif_bmc.c
> +++ b/drivers/char/ipmi/ssif_bmc.c
> @@ -579,7 +579,6 @@ static void process_request_part(struct ssif_bmc_ctx *ssif_bmc)
>  static void process_smbus_cmd(struct ssif_bmc_ctx *ssif_bmc, u8 *val)
>  {
>  	/* SMBUS command can vary (single or multi-part) */
> -	ssif_bmc->part_buf.smbus_cmd = *val;
>  	ssif_bmc->msg_idx = 1;
>  	memset(&ssif_bmc->part_buf.payload[0], 0, MAX_PAYLOAD_PER_TRANSACTION);
>  
> @@ -596,6 +595,7 @@ static void process_smbus_cmd(struct ssif_bmc_ctx *ssif_bmc, u8 *val)
>  		if (ssif_bmc->aborting)
>  			ssif_bmc->aborting = false;
>  	}
> +	ssif_bmc->part_buf.smbus_cmd = *val;
>  }
>  
>  static void on_read_requested_event(struct ssif_bmc_ctx *ssif_bmc, u8 *val)
> -- 
> 2.34.1
> 

  reply	other threads:[~2025-01-03  3:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-01 16:54 [PATCH] ipmi: ssif_bmc: Move smbus_cmd assignment after cleanup Cosmo Chou
2025-01-03  3:20 ` Corey Minyard [this message]
2025-01-03  3:49   ` Quan Nguyen
2025-01-03  3:44 ` Quan Nguyen
2025-01-03 13:01   ` Corey Minyard
2025-01-06  2:32     ` Quan Nguyen

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=Z3dXaMlZ1zTt5HHd@mail.minyard.net \
    --to=corey@minyard.net \
    --cc=chou.cosmo@gmail.com \
    --cc=cosmo.chou@quantatw.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=potin.lai@quantatw.com \
    --cc=quan@os.amperecomputing.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