From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Dan Carpenter <dan.carpenter@oracle.com>,
"John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH 3.4 06/13] p54: clamp properly instead of just truncating
Date: Fri, 28 Mar 2014 10:31:56 -0700 [thread overview]
Message-ID: <20140328173053.917264555@linuxfoundation.org> (raw)
In-Reply-To: <20140328173053.049244535@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit 608cfbe4abaf76e9d732efd7ed1cfa3998163d91 upstream.
The call to clamp_t() first truncates the variable signed 8 bit and as a
result, the actual clamp is a no-op.
Fixes: 0d78156eef1d ('p54: improve site survey')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/p54/txrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -583,7 +583,7 @@ static void p54_rx_stats(struct p54_comm
chan = priv->curchan;
if (chan) {
struct survey_info *survey = &priv->survey[chan->hw_value];
- survey->noise = clamp_t(s8, priv->noise, -128, 127);
+ survey->noise = clamp(priv->noise, -128, 127);
survey->channel_time = priv->survey_raw.active;
survey->channel_time_tx = priv->survey_raw.tx;
survey->channel_time_busy = priv->survey_raw.tx +
next prev parent reply other threads:[~2014-03-28 17:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 17:31 [PATCH 3.4 00/13] 3.4.85-stable review Greg Kroah-Hartman
2014-03-28 17:31 ` [PATCH 3.4 01/13] ALSA: compress: Pass through return value of open ops callback Greg Kroah-Hartman
2014-03-28 17:31 ` [PATCH 3.4 02/13] libceph: resend all writes after the osdmap loses the full flag Greg Kroah-Hartman
2014-03-28 17:31 ` [PATCH 3.4 03/13] iwlwifi: Complete backport of "iwlwifi: always copy first 16 bytes of commands" Greg Kroah-Hartman
2014-03-28 17:31 ` [PATCH 3.4 04/13] x86: bpf_jit: support negative offsets Greg Kroah-Hartman
2014-03-28 17:31 ` [PATCH 3.4 05/13] deb-pkg: Fix cross-building linux-headers package Greg Kroah-Hartman
2014-03-28 17:31 ` Greg Kroah-Hartman [this message]
2014-03-28 17:31 ` [PATCH 3.4 07/13] i7300_edac: Fix device reference count Greg Kroah-Hartman
2014-03-28 17:31 ` [PATCH 3.4 08/13] ARM: move outer_cache declaration out of ifdef Greg Kroah-Hartman
2014-03-28 17:31 ` [PATCH 3.4 09/13] Input: elantech - improve clickpad detection Greg Kroah-Hartman
2014-03-28 17:32 ` [PATCH 3.4 10/13] KVM: MMU: handle invalid root_hpa at __direct_map Greg Kroah-Hartman
2014-03-28 17:32 ` [PATCH 3.4 11/13] KVM: VMX: fix use after free of vmx->loaded_vmcs Greg Kroah-Hartman
2014-03-28 17:32 ` [PATCH 3.4 12/13] xhci: Fix resume issues on Renesas chips in Samsung laptops Greg Kroah-Hartman
2014-03-28 17:32 ` [PATCH 3.4 13/13] ipc/msg: fix race around refcount Greg Kroah-Hartman
2014-03-29 1:00 ` [PATCH 3.4 00/13] 3.4.85-stable review Guenter Roeck
2014-03-30 1:26 ` Shuah Khan
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=20140328173053.917264555@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=dan.carpenter@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).