iwlwifi: mvm: use ssize_t for len in iwl_debugfs_mem_read()
authorLuca Coelho <luciano.coelho@intel.com>
Wed, 28 Sep 2016 08:32:35 +0000 (11:32 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 19 Oct 2016 05:40:35 +0000 (08:40 +0300)
commit276c4b4b74b6d5bc3cab35534409f3ad32464b78
treecae9149e5e31511f2f8f7b2487ba0484fe14f5f8
parentfaead41cc7213ccef5a58c1bf518ac24816fe8a6
iwlwifi: mvm: use ssize_t for len in iwl_debugfs_mem_read()

In iwl_dbgfs_mem_read(), the len variable may become negative and is
compared to < 0 (an error case).  Comparing size_t (which is unsigned)
to < 0 causes a warning on certain platforms (like i386):

drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561:5-8: WARNING: Unsigned expression compared with zero: len < 0

To prevent that, use ssize_t for len instead.

Fixes: commit 2b55f43f8e47 ("iwlwifi: mvm: Add mem debugfs entry")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c