summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-03-07 23:05:26 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-07 16:23:18 -0800
commitbf9aac535e3142f6a48c1695d06353fccc3bd6ad (patch)
treec63f010b9276fa5ff9c9731fe40b2b1859a9197b
parent43f82a6a6e8df4c8ee69e235cfe3dd625a725c6c (diff)
staging:rtl8187se: Change argument type in function to bool
Since the argument morefrag is being used as a booleon in the function rtl8180_tx, the type for the argument is changed to booleon in the function definition and declaration. This ensures that the variable morefrag is always in the range 0-1 and overflow dooes not cause errors if it is assigned a value. Also, this improves code readability. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8187se/r8180.h2
-rw-r--r--drivers/staging/rtl8187se/r8180_core.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers/staging/rtl8187se/r8180.h
index 59237a5cd135..00e38b5cb1be 100644
--- a/drivers/staging/rtl8187se/r8180.h
+++ b/drivers/staging/rtl8187se/r8180.h
@@ -648,7 +648,7 @@ struct r8180_priv {
BE_PRIORITY)
short rtl8180_tx(struct net_device *dev, u8 *skbuf, int len, int priority,
- short morefrag, short fragdesc, int rate);
+ bool morefrag, short fragdesc, int rate);
u8 read_nic_byte(struct net_device *dev, int x);
u32 read_nic_dword(struct net_device *dev, int x);
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index dc434b88dcc6..d19175057097 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -1679,7 +1679,7 @@ static void rtl8180_prepare_beacon(struct net_device *dev)
* it does the DMA transfer.
*/
short rtl8180_tx(struct net_device *dev, u8 *txbuf, int len, int priority,
- short morefrag, short descfrag, int rate)
+ bool morefrag, short descfrag, int rate)
{
struct r8180_priv *priv = ieee80211_priv(dev);
u32 *tail, *temp_tail;