public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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: Wed, 4 Mar 2026 11:07:26 +0300	[thread overview]
Message-ID: <aafoPlld7S2Nq76W@stanley.mountain> (raw)
In-Reply-To: <CAFxoRw0yZM8opXig2vgnFZR6mTPFgj0JFxKYx4vtv2VyqUWSJw@mail.gmail.com>

On Wed, Mar 04, 2026 at 01:13:05PM +0530, Soham Kute wrote:
> Hi Dan,
> 
> Thanks for pointing me to smatch. I built the DB and ran the queries.
> 
> >From what I can see, dev->event() is called in input_handle_event()
> but the return value is not propagated back up. The smatch caller_info
> table shows type INTERNAL for that call which I understand means the
> return value stays internal and never reaches the caller of
> input_event().
> 
> So yes, this patch has no runtime effect. The reason I sent it was
> that pcspkr.c uses -EINVAL in the same type of event callback, so I
> thought nvec_kbd should be consistent with that.

Put that kind of thing in the commit message.

"This patch has no effect on runtime but returning proper error codes
is the correct thing and it makes it more consistent with other functions
that implement it such whatever_function() in pcspkr.c"

> 
> Also noticed atkbd.c has the same -1 in its event callback. Should I
> send a fix for that too?

If you want to do that, then sure, absolutely.

regards,
dan carpenter


      reply	other threads:[~2026-03-04  8:07 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
2026-03-04  7:43   ` Soham Kute
2026-03-04  8:07     ` Dan Carpenter [this message]

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=aafoPlld7S2Nq76W@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