* [PATCH] Fix unsigned int compared against 0
@ 2024-10-04 14:10 Advait Dhamorikar
2024-10-04 14:50 ` Mark Brown
2024-10-05 3:51 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Advait Dhamorikar @ 2024-10-04 14:10 UTC (permalink / raw)
To: Shenghao Ding, Kevin Lu, Baojun Xu, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, linux-sound, linux-kernel, skhan, anupnewsmail,
Advait Dhamorikar
An unsigned value held by offset can never be
negative, so this test will always evaluate
the same way and is therefore redundant.
Signed-off-by: Advait Dhamorikar <advaitdhamorikar@gmail.com>
---
sound/soc/codecs/tlv320adc3xxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tlv320adc3xxx.c b/sound/soc/codecs/tlv320adc3xxx.c
index 7073b9d1cda8..868e8a91e05b 100644
--- a/sound/soc/codecs/tlv320adc3xxx.c
+++ b/sound/soc/codecs/tlv320adc3xxx.c
@@ -961,7 +961,7 @@ static int adc3xxx_gpio_request(struct gpio_chip *chip, unsigned int offset)
if (offset >= ADC3XXX_GPIOS_MAX)
return -EINVAL;
- if (offset >= 0 && offset < ADC3XXX_GPIO_PINS) {
+ if (offset < ADC3XXX_GPIO_PINS) {
/* GPIO1 is offset 0, GPIO2 is offset 1 */
/* We check here that the GPIO pins are either not configured
* in the DT, or that they purposely are set as outputs.
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Fix unsigned int compared against 0
2024-10-04 14:10 [PATCH] Fix unsigned int compared against 0 Advait Dhamorikar
@ 2024-10-04 14:50 ` Mark Brown
2024-10-05 3:51 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-10-04 14:50 UTC (permalink / raw)
To: Advait Dhamorikar
Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-sound,
linux-kernel, skhan, anupnewsmail
[-- Attachment #1: Type: text/plain, Size: 535 bytes --]
On Fri, Oct 04, 2024 at 07:40:46PM +0530, Advait Dhamorikar wrote:
> An unsigned value held by offset can never be
> negative, so this test will always evaluate
> the same way and is therefore redundant.
Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix unsigned int compared against 0
2024-10-04 14:10 [PATCH] Fix unsigned int compared against 0 Advait Dhamorikar
2024-10-04 14:50 ` Mark Brown
@ 2024-10-05 3:51 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-10-05 3:51 UTC (permalink / raw)
To: Shenghao Ding, Kevin Lu, Baojun Xu, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, Advait Dhamorikar
Cc: alsa-devel, linux-sound, linux-kernel, skhan, anupnewsmail
On Fri, 04 Oct 2024 19:40:46 +0530, Advait Dhamorikar wrote:
> An unsigned value held by offset can never be
> negative, so this test will always evaluate
> the same way and is therefore redundant.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] Fix unsigned int compared against 0
commit: 40ba40fa4e054c62507026454529e3d530e10456
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-05 3:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 14:10 [PATCH] Fix unsigned int compared against 0 Advait Dhamorikar
2024-10-04 14:50 ` Mark Brown
2024-10-05 3:51 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox