Linux Input/HID development
 help / color / mirror / Atom feed
From: Max Staudt <max@enpas.org>
To: Dan Carpenter <dan.carpenter@linaro.org>, Jiri Kosina <jikos@kernel.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Roderick Colenbrander <roderick.colenbrander@sony.com>
Subject: Re: [bug report] HID: playstation: DS4: Don't fail on calibration data request
Date: Mon, 8 Apr 2024 16:44:05 +0200	[thread overview]
Message-ID: <07848795-14e3-4020-9e60-e3221ff6ef80@enpas.org> (raw)
In-Reply-To: <d0e5bb97-3e18-44ac-89b0-503cfe16417f@moroto.mountain>

On 4/8/24 09:41, Dan Carpenter wrote:
> Hello Max Staudt,
> 
> Commit a48a7cd85f55 ("HID: playstation: DS4: Don't fail on
> calibration data request") from Feb 8, 2024 (linux-next), leads to
> the following Smatch static checker warning:
> 
> drivers/hid/hid-playstation.c:1904 dualshock4_get_calibration_data() error: uninitialized symbol 'acc_x_minus'.
> drivers/hid/hid-playstation.c:1904 dualshock4_get_calibration_data() error: uninitialized symbol 'acc_x_plus'.
> drivers/hid/hid-playstation.c:1910 dualshock4_get_calibration_data() error: uninitialized symbol 'acc_y_minus'.
> drivers/hid/hid-playstation.c:1910 dualshock4_get_calibration_data() error: uninitialized symbol 'acc_y_plus'.
> drivers/hid/hid-playstation.c:1916 dualshock4_get_calibration_data() error: uninitialized symbol 'acc_z_minus'.
> drivers/hid/hid-playstation.c:1916 dualshock4_get_calibration_data() error: uninitialized symbol 'acc_z_plus'.


Hi Dan, Jiri,

Thanks for the report!


Jiri, if you prefer to do so, please feel free to stop/revert this patch for now, and I'll send a better one soon.

The label "no_buffer_tail_check" was meant to jump straight to the sanity checks in order to have them write the fallback calibration values. But I missed that the part in between the two sanity checks can actually make the second sanity check pass with bogus values - as shown by Dan's check.


Max


  reply	other threads:[~2024-04-08 14:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  7:41 [bug report] HID: playstation: DS4: Don't fail on calibration data request Dan Carpenter
2024-04-08 14:44 ` Max Staudt [this message]
2024-04-12 14:57   ` Max Staudt
2024-04-12 15:01     ` Jiri Kosina
2024-04-12 15:23       ` Max Staudt

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=07848795-14e3-4020-9e60-e3221ff6ef80@enpas.org \
    --to=max@enpas.org \
    --cc=dan.carpenter@linaro.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roderick.colenbrander@sony.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