From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Anshul Dalal <anshulusr@gmail.com>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
"Conor Dooley" <conor+dt@kernel.org>,
"Thomas Weißschuh" <linux@weissschuh.net>,
linux-kernel@vger.kernel.org,
"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Jeff LaBundy" <jeff@labundy.com>,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH v12 2/2] input: joystick: driver for Adafruit Seesaw Gamepad
Date: Wed, 10 Jan 2024 17:20:42 -0800 [thread overview]
Message-ID: <ZZ9CaiYCqDlSxiIb@google.com> (raw)
In-Reply-To: <20240106015111.882325-2-anshulusr@gmail.com>
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
next prev parent reply other threads:[~2024-01-11 1:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-06 1:50 [PATCH v12 1/2] dt-bindings: input: bindings for Adafruit Seesaw Gamepad Anshul Dalal
2024-01-06 1:51 ` [PATCH v12 2/2] input: joystick: driver " Anshul Dalal
2024-01-11 1:20 ` Dmitry Torokhov [this message]
2024-01-11 1:20 ` [PATCH v12 1/2] dt-bindings: input: bindings " Dmitry Torokhov
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=ZZ9CaiYCqDlSxiIb@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=anshulusr@gmail.com \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=jeff@labundy.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=robh+dt@kernel.org \
/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