aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2007-06-20 23:56:15 -0400
committerGuido Guenther <agx@sigxcpu.org>2007-06-26 09:53:13 -0400
commitc02cd537c8eb070640a552f0d0d242a9eef05667 (patch)
tree6c46a30260a0016a4be69106aef9b17bf00a0012
parent88c06d9478f029403d759460fa27f3d40b43ed78 (diff)
[PATCH] Remove unneeded parentheses when taking an address
It's uncommon to see them in the kernel. Dereferencing a pointer has priority over taking an address, and it's well known. Parentheses don't make the code more readable if it looks differently from other drivers. Signed-off-by: Pavel Roskin <proski@gnu.org>
-rw-r--r--at76_usb.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/at76_usb.c b/at76_usb.c
index e48cd70..8ca14d2 100644
--- a/at76_usb.c
+++ b/at76_usb.c
@@ -2545,10 +2545,10 @@ static int at76_iw_handler_set_spy(struct net_device *netdev,
at76_dbg(DBG_IOCTL, "%s: SIOCSIWSPY - number of addresses %d",
netdev->name, data->length);
- spin_lock_bh(&(priv->spy_spinlock));
+ spin_lock_bh(&priv->spy_spinlock);
ret = iw_handler_set_spy(priv->netdev, info, (union iwreq_data *)data,
extra);
- spin_unlock_bh(&(priv->spy_spinlock));
+ spin_unlock_bh(&priv->spy_spinlock);
return ret;
}
@@ -2561,10 +2561,10 @@ static int at76_iw_handler_get_spy(struct net_device *netdev,
struct at76_priv *priv = netdev_priv(netdev);
int ret = 0;
- spin_lock_bh(&(priv->spy_spinlock));
+ spin_lock_bh(&priv->spy_spinlock);
ret = iw_handler_get_spy(priv->netdev, info,
(union iwreq_data *)data, extra);
- spin_unlock_bh(&(priv->spy_spinlock));
+ spin_unlock_bh(&priv->spy_spinlock);
at76_dbg(DBG_IOCTL, "%s: SIOCGIWSPY - number of addresses %d",
netdev->name, data->length);
@@ -2582,10 +2582,10 @@ static int at76_iw_handler_set_thrspy(struct net_device *netdev,
at76_dbg(DBG_IOCTL, "%s: SIOCSIWTHRSPY - number of addresses %d)",
netdev->name, data->length);
- spin_lock_bh(&(priv->spy_spinlock));
+ spin_lock_bh(&priv->spy_spinlock);
ret = iw_handler_set_thrspy(netdev, info, (union iwreq_data *)data,
extra);
- spin_unlock_bh(&(priv->spy_spinlock));
+ spin_unlock_bh(&priv->spy_spinlock);
return ret;
}
@@ -2597,10 +2597,10 @@ static int at76_iw_handler_get_thrspy(struct net_device *netdev,
struct at76_priv *priv = netdev_priv(netdev);
int ret;
- spin_lock_bh(&(priv->spy_spinlock));
+ spin_lock_bh(&priv->spy_spinlock);
ret = iw_handler_get_thrspy(netdev, info, (union iwreq_data *)data,
extra);
- spin_unlock_bh(&(priv->spy_spinlock));
+ spin_unlock_bh(&priv->spy_spinlock);
at76_dbg(DBG_IOCTL, "%s: SIOCGIWTHRSPY - number of addresses %d)",
netdev->name, data->length);
@@ -2677,14 +2677,14 @@ static int at76_iw_handler_set_scan(struct net_device *netdev,
priv->scan_state = SCAN_IN_PROGRESS;
/* stop pending management stuff */
- del_timer_sync(&(priv->mgmt_timer));
+ del_timer_sync(&priv->mgmt_timer);
- spin_lock_irqsave(&(priv->mgmt_spinlock), flags);
+ spin_lock_irqsave(&priv->mgmt_spinlock, flags);
if (priv->next_mgmt_bulk) {
kfree(priv->next_mgmt_bulk);
priv->next_mgmt_bulk = NULL;
}
- spin_unlock_irqrestore(&(priv->mgmt_spinlock), flags);
+ spin_unlock_irqrestore(&priv->mgmt_spinlock, flags);
if (netif_running(priv->netdev)) {
/* pause network activity */
@@ -2737,9 +2737,9 @@ static int at76_iw_handler_get_scan(struct net_device *netdev,
/* scan not yet finished */
return -EAGAIN;
- spin_lock_irqsave(&(priv->bss_list_spinlock), flags);
+ spin_lock_irqsave(&priv->bss_list_spinlock, flags);
- list_for_each_safe(lptr, nptr, &(priv->bss_list)) {
+ list_for_each_safe(lptr, nptr, &priv->bss_list) {
curr_bss = list_entry(lptr, struct bss_info, list);
iwe->cmd = SIOCGIWAP;
@@ -2833,7 +2833,7 @@ static int at76_iw_handler_get_scan(struct net_device *netdev,
}
- spin_unlock_irqrestore(&(priv->bss_list_spinlock), flags);
+ spin_unlock_irqrestore(&priv->bss_list_spinlock, flags);
data->length = (curr_pos - extra);
data->flags = 0;
@@ -5713,12 +5713,12 @@ static void at76_iwspy_update(struct at76_priv *priv,
qual.noise = 0;
at76_calc_level(priv, buf, &qual);
- spin_lock_bh(&(priv->spy_spinlock));
+ spin_lock_bh(&priv->spy_spinlock);
if (priv->spy_data.spy_number > 0) {
wireless_spy_update(priv->netdev, hdr->addr2, &qual);
}
- spin_unlock_bh(&(priv->spy_spinlock));
+ spin_unlock_bh(&priv->spy_spinlock);
}
static void at76_rx_tasklet(unsigned long param)