mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Andrew Jeffery <andrew@aj.id.au>,
	Govert Overgaauw <govert.overgaauw@prodrive-technologies.com>
Cc: openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [Openipmi-developer] [PATCH] ipmi: ipmi-bmc: Improve errno returned to userspace
Date: Thu, 20 Apr 2023 07:10:58 -0500	[thread overview]
Message-ID: <ZEEr0r/6/lLiwlsy@minyard.net> (raw)
In-Reply-To: <20230419150032.3483229-1-govert.overgaauw@prodrive-technologies.com>

Andrew, what do you think?

-corey

On Wed, Apr 19, 2023 at 05:00:32PM +0200, Govert Overgaauw via Openipmi-developer wrote:
> While the KCS driver is not in KCS_PHASE_WAIT_READ state it returns
> -EINVAL to userspace on a write call. change this to -EAGAIN to indicate
> that the error is related to the state and not the argument.
> 
> Signed-off-by: Govert Overgaauw <govert.overgaauw@prodrive-technologies.com>
> ---
>  drivers/char/ipmi/kcs_bmc_cdev_ipmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
> index cf670e891966..4c7400faf333 100644
> --- a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
> +++ b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
> @@ -405,7 +405,7 @@ static ssize_t kcs_bmc_ipmi_write(struct file *filp, const char __user *buf,
>  		kcs_bmc_write_data(priv->client.dev, priv->data_out[0]);
>  		ret = count;
>  	} else {
> -		ret = -EINVAL;
> +		ret = -EAGAIN;
>  	}
>  	spin_unlock_irq(&priv->lock);
>  
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> Openipmi-developer mailing list
> Openipmi-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openipmi-developer

       reply	other threads:[~2023-04-20 12:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230419150032.3483229-1-govert.overgaauw@prodrive-technologies.com>
2023-04-20 12:10 ` Corey Minyard [this message]
2023-04-21  1:58   ` Andrew Jeffery

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=ZEEr0r/6/lLiwlsy@minyard.net \
    --to=minyard@acm.org \
    --cc=andrew@aj.id.au \
    --cc=govert.overgaauw@prodrive-technologies.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /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®