2024-04-08 14:44:28

by Max Staudt

[permalink] [raw]
Subject: Re: [bug report] HID: playstation: DS4: Don't fail on calibration data request

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



2024-04-12 14:57:42

by Max Staudt

[permalink] [raw]
Subject: Re: [bug report] HID: playstation: DS4: Don't fail on calibration data request

On 4/8/24 23:44, Max Staudt wrote:
> 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:
>>
>> [...]
>
>
> 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.
>
> [...]

Jiri,

Would you like me to send a patch on top of the existing one, or a completely fresh one?


Max


2024-04-12 15:02:49

by Jiri Kosina

[permalink] [raw]
Subject: Re: [bug report] HID: playstation: DS4: Don't fail on calibration data request

On Fri, 12 Apr 2024, Max Staudt wrote:

> >> 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:
> >>
> >> [...]
> >
> >
> > 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.
> >
> > [...]
>
> Jiri,
>
> Would you like me to send a patch on top of the existing one, or a completely
> fresh one?

Max,

please send a followup one with proper Fixes: tag. We're generally not
rebasing the tree.

Thanks,

--
Jiri Kosina
SUSE Labs


2024-04-12 15:24:45

by Max Staudt

[permalink] [raw]
Subject: Re: [bug report] HID: playstation: DS4: Don't fail on calibration data request

On 4/13/24 00:01, Jiri Kosina wrote:
> Max,
>
> please send a followup one with proper Fixes: tag. We're generally not
> rebasing the tree.

Instead of rebasing, I was wondering whether you were intending to revert the faulty patch first :)

Thanks, will do!



Max