From: "Pali Rohár" <pali@kernel.org>
To: W_Armin@gmx.de
Cc: linux@roeck-us.net, jdelvare@suse.com, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 3/5] hwmon: (dell-smm) Return -ENOIOCTLCMD instead of -EINVAL
Date: Thu, 21 Oct 2021 20:17:58 +0200 [thread overview]
Message-ID: <20211021181758.3udejerxhucsvaxl@pali> (raw)
In-Reply-To: <20211021175447.5380-4-W_Armin@gmx.de>
On Thursday 21 October 2021 19:54:45 W_Armin@gmx.de wrote:
> From: Armin Wolf <W_Armin@gmx.de>
>
> Returning -ENOIOCTLCMD gives the callers a better
> hint of what went wrong and is the recommended
> behavior.
>
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Acked-by: Pali Rohár <pali@kernel.org>
> ---
> drivers/hwmon/dell-smm-hwmon.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index b0c591bb761a..5f0338b4a717 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -18,6 +18,7 @@
> #include <linux/delay.h>
> #include <linux/dmi.h>
> #include <linux/err.h>
> +#include <linux/errno.h>
> #include <linux/hwmon.h>
> #include <linux/init.h>
> #include <linux/module.h>
> @@ -516,7 +517,7 @@ i8k_ioctl_unlocked(struct file *fp, struct dell_smm_data *data, unsigned int cmd
> break;
>
> default:
> - return -EINVAL;
> + return -ENOIOCTLCMD;
> }
>
> if (val < 0)
> --
> 2.20.1
>
next prev parent reply other threads:[~2021-10-21 18:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 17:54 [PATCH 0/5] hwmon: (dell-smm) Miscellaneous Improvments W_Armin
2021-10-21 17:54 ` [PATCH 1/5] hwmon: (dell-smm) Sort includes in alphabetical order W_Armin
2021-10-21 18:16 ` Pali Rohár
2021-10-21 17:54 ` [PATCH 2/5] hwmon: (dell-smm) Use strscpy_pad() W_Armin
2021-10-21 18:17 ` Pali Rohár
2021-10-21 17:54 ` [PATCH 3/5] hwmon: (dell-smm) Return -ENOIOCTLCMD instead of -EINVAL W_Armin
2021-10-21 18:17 ` Pali Rohár [this message]
2021-10-21 17:54 ` [PATCH 4/5] hwmon: (dell-smm) Add Dell Inspiron 3505 config data W_Armin
2021-10-21 18:05 ` Pali Rohár
2021-10-21 18:36 ` Armin Wolf
2021-10-21 18:42 ` Pali Rohár
2021-10-21 17:54 ` [PATCH 5/5] hwmon: (dell-smm) Speed up setting of fan speed W_Armin
2021-10-21 18:14 ` Pali Rohár
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=20211021181758.3udejerxhucsvaxl@pali \
--to=pali@kernel.org \
--cc=W_Armin@gmx.de \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.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