aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lin <dlin@marvell.com>2016-06-06 17:57:36 +0800
committerDavid Lin <dlin@marvell.com>2016-06-06 17:57:36 +0800
commitaf294d17374f2acff09b0b8fc64668288b6e1dd4 (patch)
tree1722c3bf00dcbbec668d94d41294a5992fc211c0
parent193594f055103b96f357458ada6b768185ef9e47 (diff)
Modified the code to pass chackpatch.pl.
Signed-off-by: David Lin <dlin@marvell.com>
-rw-r--r--debugfs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/debugfs.c b/debugfs.c
index ecb7fd4..71ee4e0 100644
--- a/debugfs.c
+++ b/debugfs.c
@@ -255,7 +255,8 @@ static ssize_t mwl_debugfs_sta_read(struct file *file, char __user *ubuf,
}
len += scnprintf(p + len, size - len, "rx_bw: %d, rx_nss: %d\n",
sta->bandwidth, sta->rx_nss);
- len += scnprintf(p + len, size - len, "tdls: %d, tdls_init: %d\n",
+ len += scnprintf(p + len, size - len,
+ "tdls: %d, tdls_init: %d\n",
sta->tdls, sta->tdls_initiator);
len += scnprintf(p + len, size - len, "wme: %d, mfp: %d\n",
sta->wme, sta->mfp);
@@ -382,9 +383,7 @@ static ssize_t mwl_debugfs_tx_desc_write(struct file *file,
goto err;
}
- ret = sscanf(buf, "%d", &tx_desc_num);
-
- if (ret != 1) {
+ if (kstrtoint(buf, 0, &tx_desc_num)) {
ret = -EINVAL;
goto err;
}