mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
b43legacy: Fix sparse warnings
Sparse yields the following warnings for b43legacy: CHECK drivers/net/wireless/b43legacy/phy.c drivers/net/wireless/b43legacy/phy.c:1304:31: warning: potentially expensive pointer subtraction drivers/net/wireless/b43legacy/phy.c:1304:31: warning: potentially expensive pointer subtraction drivers/net/wireless/b43legacy/phy.c:1304:31: warning: potentially expensive pointer subtraction CHECK drivers/net/wireless/b43legacy/debugfs.c drivers/net/wireless/b43legacy/debugfs.c:243:9: warning: memset with byte count of 131072 Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
c1db52b9d2
commit
d8004cb926
@ -211,7 +211,7 @@ static ssize_t b43legacy_debugfs_read(struct file *file, char __user *userbuf,
|
|||||||
struct b43legacy_dfs_file *dfile;
|
struct b43legacy_dfs_file *dfile;
|
||||||
ssize_t uninitialized_var(ret);
|
ssize_t uninitialized_var(ret);
|
||||||
char *buf;
|
char *buf;
|
||||||
const size_t bufsize = 1024 * 128;
|
const size_t bufsize = 1024 * 16; /* 16 KiB buffer */
|
||||||
const size_t buforder = get_order(bufsize);
|
const size_t buforder = get_order(bufsize);
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
|
@ -1296,12 +1296,10 @@ void b43legacy_lo_write(struct b43legacy_wldev *dev,
|
|||||||
/* Sanity check. */
|
/* Sanity check. */
|
||||||
if (pair->low < -8 || pair->low > 8 ||
|
if (pair->low < -8 || pair->low > 8 ||
|
||||||
pair->high < -8 || pair->high > 8) {
|
pair->high < -8 || pair->high > 8) {
|
||||||
struct b43legacy_phy *phy = &dev->phy;
|
|
||||||
b43legacydbg(dev->wl,
|
b43legacydbg(dev->wl,
|
||||||
"WARNING: Writing invalid LOpair "
|
"WARNING: Writing invalid LOpair "
|
||||||
"(low: %d, high: %d, index: %lu)\n",
|
"(low: %d, high: %d)\n",
|
||||||
pair->low, pair->high,
|
pair->low, pair->high);
|
||||||
(unsigned long)(pair - phy->_lo_pairs));
|
|
||||||
dump_stack();
|
dump_stack();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user