mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
43f82a6a6e
commit
bf9aac535e
|
@ -648,7 +648,7 @@ struct r8180_priv {
|
||||||
BE_PRIORITY)
|
BE_PRIORITY)
|
||||||
|
|
||||||
short rtl8180_tx(struct net_device *dev, u8 *skbuf, int len, int 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);
|
u8 read_nic_byte(struct net_device *dev, int x);
|
||||||
u32 read_nic_dword(struct net_device *dev, int x);
|
u32 read_nic_dword(struct net_device *dev, int x);
|
||||||
|
|
|
@ -1679,7 +1679,7 @@ static void rtl8180_prepare_beacon(struct net_device *dev)
|
||||||
* it does the DMA transfer.
|
* it does the DMA transfer.
|
||||||
*/
|
*/
|
||||||
short rtl8180_tx(struct net_device *dev, u8 *txbuf, int len, int priority,
|
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);
|
struct r8180_priv *priv = ieee80211_priv(dev);
|
||||||
u32 *tail, *temp_tail;
|
u32 *tail, *temp_tail;
|
||||||
|
|
Loading…
Reference in New Issue