Linux Input/HID development
 help / color / mirror / Atom feed
From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Dan Carpenter" <error27@gmail.com>
Cc: "Even Xu" <even.xu@intel.com>,
	"Xinpeng Sun" <xinpeng.sun@intel.com>,
	"Jiri Kosina" <jikos@kernel.org>,
	"Benjamin Tissoires" <bentiss@kernel.org>,
	"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] HID: intel-thc-hid: Intel-quickspi: Fix some error codes
Date: Thu, 23 Apr 2026 11:32:47 -0400	[thread overview]
Message-ID: <6ac4045e-1c9e-437d-8efe-0bae43d00699@app.fastmail.com> (raw)
In-Reply-To: <aeo25zL_XIoFZ7uK@stanley.mountain>


On Thu, Apr 23, 2026, at 11:12 AM, Dan Carpenter wrote:
> On Thu, Apr 23, 2026 at 10:51:10AM -0400, Mark Pearson wrote:
>> Hi Dan,
>> 
>> On Thu, Apr 23, 2026, at 3:10 AM, Dan Carpenter wrote:
>> >  		dev_err_once(qsdev->dev, "RESET_RESPONSE body expected len = %u, 
>> > actual = %u\n",
>> >  			     read_len, actual_read_len);
>> > -		return ret;
>> > +		return ret ?: -EINVAL;
>> >  	}
>> > 
>> >  	input_rep_type = FIELD_GET(HIDSPI_IN_REP_BDY_HDR_REP_TYPE, reset_response);
>> > -- 
>> > 2.53.0
>> 
>> I think this would be throwing away other possible different return values from thc_tic_pio_read?
>> You'd be losing the -EINTR,-EBUSY, -ETIMEDOUT conditions that might be useful to the upper layers.
>> 
>> Should that block be split into two separate error conditions?
>
> It doesn't throw away any error codes.  Writing "return ret ?: -EINVAL;"
> is a short hand for "return ret ? ret : -EINVAL;".
>
Yeah, you're right - read it to fast. Sorry!

Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>

  reply	other threads:[~2026-04-23 15:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23  7:10 [PATCH] HID: intel-thc-hid: Intel-quickspi: Fix some error codes Dan Carpenter
2026-04-23 14:51 ` Mark Pearson
2026-04-23 15:12   ` Dan Carpenter
2026-04-23 15:32     ` Mark Pearson [this message]
2026-04-24  0:53 ` Xu, Even
2026-04-28 16:35 ` Jiri Kosina

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=6ac4045e-1c9e-437d-8efe-0bae43d00699@app.fastmail.com \
    --to=mpearson-lenovo@squebb.ca \
    --cc=bentiss@kernel.org \
    --cc=error27@gmail.com \
    --cc=even.xu@intel.com \
    --cc=jikos@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=xinpeng.sun@intel.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