From: "Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
"Berg, Johannes" <johannes.berg@intel.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>,
Kalle Valo <kvalo@codeaurora.org>,
"Coelho, Luciano" <luciano.coelho@intel.com>,
Eliad Peller <eliad@wizery.com>,
"Kaufman, Liad" <liad.kaufman@intel.com>,
"Gottlieb, Matti" <matti.gottlieb@intel.com>,
"Bondar, Alexander" <alexander.bondar@intel.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [patch] iwlwifi: mvm: catch underflow error earlier
Date: Sat, 22 Aug 2015 17:25:48 +0000 [thread overview]
Message-ID: <0BA3FCBA62E2DC44AF3030971E174FB32E8271DF@hasmsx107.ger.corp.intel.com> (raw)
In-Reply-To: 20150821084821.GC25369@mwanda
Hi Dan,
On 08/21/2015 11:49 AM, Dan Carpenter wrote:
> My static checker complains that we don't check for underflows in
> iwl_dbgfs_fw_dbg_conf_write(). This is harmless because we have a
> sanity check in iwl_mvm_start_fw_dbg_conf(), but we may as well make
> this unsigned and silence the underflow warning.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Applied in our internal tree. Thanks.
> diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
> index ca4a1f8..7d69a55 100644
> --- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c
> +++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
> @@ -949,9 +949,10 @@ static ssize_t iwl_dbgfs_fw_dbg_conf_write(struct iwl_mvm *mvm,
> char *buf, size_t count,
> loff_t *ppos)
> {
> - int ret, conf_id;
> + unsigned int conf_id;
> + int ret;
>
> - ret = kstrtoint(buf, 0, &conf_id);
> + ret = kstrtouint(buf, 0, &conf_id);
> if (ret)
> return ret;
>
>
prev parent reply other threads:[~2015-08-22 17:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 8:48 [patch] iwlwifi: mvm: catch underflow error earlier Dan Carpenter
2015-08-22 17:25 ` Grumbach, Emmanuel [this message]
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=0BA3FCBA62E2DC44AF3030971E174FB32E8271DF@hasmsx107.ger.corp.intel.com \
--to=emmanuel.grumbach@intel.com \
--cc=alexander.bondar@intel.com \
--cc=dan.carpenter@oracle.com \
--cc=eliad@wizery.com \
--cc=ilw@linux.intel.com \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@codeaurora.org \
--cc=liad.kaufman@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=matti.gottlieb@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox