[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZZ9CaiYCqDlSxiIb@google.com>
Date: Wed, 10 Jan 2024 17:20:42 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Anshul Dalal <anshulusr@...il.com>
Cc: linux-input@...r.kernel.org, devicetree@...r.kernel.org,
Conor Dooley <conor+dt@...nel.org>,
Thomas Weißschuh <linux@...ssschuh.net>,
linux-kernel@...r.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Conor Dooley <conor.dooley@...rochip.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Jeff LaBundy <jeff@...undy.com>,
linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH v12 2/2] input: joystick: driver for Adafruit Seesaw
Gamepad
Hi Anshul,
On Sat, Jan 06, 2024 at 07:21:00AM +0530, Anshul Dalal wrote:
> +
> + for_each_set_bit(i, (long *)&SEESAW_BUTTON_MASK,
> + BITS_PER_TYPE(SEESAW_BUTTON_MASK)) {
This is not really safe as it might not be aligned properly, and we can
potentially try to peek beyond the data element (even though we limit
how many bits we consider valid). I changed SEESAW_BUTTON_MASK to be
unsigned long.
I also dropped bunch of unneeded casts and applied, thank you.
Thanks.
--
Dmitry
Powered by blists - more mailing lists