All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: John Wood <john.wood@gmx.com>
To: Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
	Ryder Lee <ryder.lee@mediatek.com>
Cc: John Wood <john.wood@gmx.com>, Kalle Valo <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mt76/mt7915: Fix unsigned compared against zero
Date: Sat, 26 Jun 2021 16:30:10 +0200	[thread overview]
Message-ID: <20210626143010.GA2936@ubuntu> (raw)
In-Reply-To: <20210612143505.7637-1-john.wood@gmx.com>

On Sat, Jun 12, 2021 at 04:35:05PM +0200, John Wood wrote:
> The mt7915_dpd_freq_idx() function can return a negative value but this
> value is assigned to an unsigned variable named idx. Then, the code
> tests if this variable is less than zero. This can never happen with an
> unsigned type.
>
> So, change the idx type to a signed one.
>
> Addresses-Coverity-ID: 1484753 ("Unsigned compared against 0")
> Fixes: 495184ac91bb8 ("mt76: mt7915: add support for applying pre-calibration data")

Has anyone had time to review this patch?. Any comment on this?

Thanks,
John Wood

WARNING: multiple messages have this Message-ID (diff)
From: John Wood <john.wood@gmx.com>
To: Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
	Ryder Lee <ryder.lee@mediatek.com>
Cc: John Wood <john.wood@gmx.com>, Kalle Valo <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mt76/mt7915: Fix unsigned compared against zero
Date: Sat, 26 Jun 2021 16:30:10 +0200	[thread overview]
Message-ID: <20210626143010.GA2936@ubuntu> (raw)
In-Reply-To: <20210612143505.7637-1-john.wood@gmx.com>

On Sat, Jun 12, 2021 at 04:35:05PM +0200, John Wood wrote:
> The mt7915_dpd_freq_idx() function can return a negative value but this
> value is assigned to an unsigned variable named idx. Then, the code
> tests if this variable is less than zero. This can never happen with an
> unsigned type.
>
> So, change the idx type to a signed one.
>
> Addresses-Coverity-ID: 1484753 ("Unsigned compared against 0")
> Fixes: 495184ac91bb8 ("mt76: mt7915: add support for applying pre-calibration data")

Has anyone had time to review this patch?. Any comment on this?

Thanks,
John Wood

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: John Wood <john.wood@gmx.com>
To: Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
	Ryder Lee <ryder.lee@mediatek.com>
Cc: John Wood <john.wood@gmx.com>, Kalle Valo <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mt76/mt7915: Fix unsigned compared against zero
Date: Sat, 26 Jun 2021 16:30:10 +0200	[thread overview]
Message-ID: <20210626143010.GA2936@ubuntu> (raw)
In-Reply-To: <20210612143505.7637-1-john.wood@gmx.com>

On Sat, Jun 12, 2021 at 04:35:05PM +0200, John Wood wrote:
> The mt7915_dpd_freq_idx() function can return a negative value but this
> value is assigned to an unsigned variable named idx. Then, the code
> tests if this variable is less than zero. This can never happen with an
> unsigned type.
>
> So, change the idx type to a signed one.
>
> Addresses-Coverity-ID: 1484753 ("Unsigned compared against 0")
> Fixes: 495184ac91bb8 ("mt76: mt7915: add support for applying pre-calibration data")

Has anyone had time to review this patch?. Any comment on this?

Thanks,
John Wood

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-06-26 14:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12 14:35 [PATCH] mt76/mt7915: Fix unsigned compared against zero John Wood
2021-06-12 14:35 ` John Wood
2021-06-12 14:35 ` John Wood
2021-06-26 14:30 ` John Wood [this message]
2021-06-26 14:30   ` John Wood
2021-06-26 14:30   ` John Wood

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=20210626143010.GA2936@ubuntu \
    --to=john.wood@gmx.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi83@gmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=ryder.lee@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.