From: Dan Carpenter <dan.carpenter@linaro.org>
To: Soham Kute <officialsohamkute@gmail.com>
Cc: marvin24@gmx.de, gregkh@linuxfoundation.org,
ac100@lists.launchpad.net, linux-tegra@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: nvec: kbd: use -EINVAL instead of -1
Date: Mon, 2 Mar 2026 12:26:13 +0300 [thread overview]
Message-ID: <aaVXtbHMfUFJW_Tu@stanley.mountain> (raw)
In-Reply-To: <20260228202008.40063-1-officialsohamkute@gmail.com>
On Sun, Mar 01, 2026 at 01:50:08AM +0530, Soham Kute wrote:
> Return proper error code -EINVAL instead of -1 when
> the event type or code is not supported.
>
> Signed-off-by: Soham Kute <officialsohamkute@gmail.com>
> ---
Could you do some analysis to see if this affects runtime? You'll need
to review the callers to see what they do with error codes. In this
case they ignore them.
One thing which could help would be to build the Smatch cross function
DB. But it takes a long time so do it overnight.
https://github.com/error27/smatch
https://github.com/error27/smatch/blob/master/Documentation/smatch.rst
cd ~/path/to/kernel_dir ~/path/to/smatch_dir/smatch_scripts/build_kernel_data.sh
$ ~/progs/smatch/devel/smatch_data/db/smdb.py nvec_kbd_event | grep INTER
drivers/input/input.c | input_event_dispose | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int)
drivers/input/input.c | input_dev_toggle | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int)
drivers/input/input.c | input_dev_toggle | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int)
drivers/input/input.c | input_dev_toggle | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int)
drivers/input/input.c | input_dev_toggle | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int)
drivers/hid/hid-holtek-kbd.c | holtek_kbd_input_event | (struct input_dev)->event | INTERNAL | -1 | | int(*)(struct input_dev*, uint, uint, int)
$
regards,
dan carpenter
next prev parent reply other threads:[~2026-03-02 9:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 20:20 [PATCH] staging: nvec: kbd: use -EINVAL instead of -1 Soham Kute
2026-03-02 9:26 ` Dan Carpenter [this message]
2026-03-04 7:43 ` Soham Kute
2026-03-04 8:07 ` Dan Carpenter
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=aaVXtbHMfUFJW_Tu@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=ac100@lists.launchpad.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=marvin24@gmx.de \
--cc=officialsohamkute@gmail.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