Re: [PATCH] leds: lp5523: fix out-of-bounds bug in lp5523_selftest()

From: Maarten Zanders
Date: Wed Nov 02 2022 - 04:21:34 EST


Hi Pavel,

On 10/28/22 17:34, Pavel Machek wrote:
I wonder, should we do these kind of actions on attribute _read_? I'd
preffer some kind of write action to trigger this.

Yes I agree that doing these kind of things on a file read feels somehow strange. Strictly speaking, I guess you would implement an IOCTL to initiate the action and then perform a read to get the result. But that would needlessly complicate things on both ends? I'll keep it in mind and when I encounter similar interfaces in other drivers get back to this if needed.