[PATCH 3/4] Staging: brcm80211: fix coding style issues Fixes up lots of coding style issues, like brace issues Signed-off-by: Guilherme Salazar <salazartux at gmail.com>
Roland Vossen
rvossen at broadcom.com
Mon May 9 23:55:36 PDT 2011
In the patch below I see lines being removed and replaced by the same
line. That does not hurt, but you may want to take a look at the tool
chain you use to create patches.
Acked-by: Roland Vossen <rvossen at broadcom.com>
On 05/07/2011 04:34 PM, Guilherme Salazar wrote:
> ---
> drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | 69 +++++++++------------
> 1 files changed, 30 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
> index 555b056..cb309b7 100644
> --- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
> +++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
> @@ -19,7 +19,7 @@
> #include<bcmutils.h>
> -#include<asm/uaccess.h>
> +#include<linux/uaccess.h>
> #include<dngl_stats.h>
> #include<dhd.h>
> @@ -330,14 +330,14 @@ static void wl_set_mpc(struct net_device *ndev, int mpc);
> static int wl_debugfs_add_netdev_params(struct wl_priv *wl);
> static void wl_debugfs_remove_netdev(struct wl_priv *wl);
> -#define WL_PRIV_GET() \
> +#define WL_PRIV_GET() \
> ({ \
> struct wl_iface *ci; \
> - if (unlikely(!(wl_cfg80211_dev&& \
> + if (unlikely(!(wl_cfg80211_dev&& \
> (ci = wl_get_drvdata(wl_cfg80211_dev))))) { \
> WL_ERR("wl_cfg80211_dev is unavailable\n"); \
> BUG(); \
> - } \
> + } \
> ci_to_wl(ci); \
> })
> @@ -713,11 +713,10 @@ wl_run_iscan(struct wl_iscan_ctrl *iscan, struct wlc_ssid *ssid, u16 action)
> err = wl_dev_iovar_setbuf(iscan->dev, "iscan", params, params_size,
> iscan->ioctl_buf, WLC_IOCTL_SMLEN);
> if (unlikely(err)) {
> - if (err == -EBUSY) {
> + if (err == -EBUSY)
> WL_INFO("system busy : iscan canceled\n");
> - } else {
> + else
> WL_ERR("error (%d)\n", err);
> - }
> }
> kfree(params);
> return err;
> @@ -875,9 +874,8 @@ static s32 wl_dev_intvar_set(struct net_device *dev, s8 *name, s32 val)
> BUG_ON(!len);
>
> err = wl_dev_ioctl(dev, WLC_SET_VAR, buf, len);
> - if (unlikely(err)) {
> + if (unlikely(err))
> WL_ERR("error (%d)\n", err);
> - }
>
> return err;
> }
> @@ -898,9 +896,8 @@ wl_dev_intvar_get(struct net_device *dev, s8 *name, s32 *retval)
> sizeof(var.buf));
> BUG_ON(!len);
> err = wl_dev_ioctl(dev, WLC_GET_VAR,&var, len);
> - if (unlikely(err)) {
> + if (unlikely(err))
> WL_ERR("error (%d)\n", err);
> - }
> *retval = le32_to_cpu(var.val);
> return err;
> @@ -976,9 +973,8 @@ static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
> && (wl->conf->retry_short != wiphy->retry_short)) {
> wl->conf->retry_short = wiphy->retry_short;
> err = wl_set_retry(ndev, wl->conf->retry_short, false);
> - if (!err) {
> + if (!err)
> return err;
> - }
> }
>
> return err;
> @@ -1511,9 +1507,8 @@ wl_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *dev,
> index = cpu_to_le32(index);
> err = wl_dev_ioctl(dev, WLC_SET_KEY_PRIMARY,&index,
> sizeof(index));
> - if (unlikely(err)) {
> + if (unlikely(err))
> WL_ERR("error (%d)\n", err);
> - }
> }
> return err;
> }
> @@ -2001,9 +1996,8 @@ wl_update_pmklist(struct net_device *dev, struct wl_pmk_list *pmk_list,
> for (i = 0; i< pmk_list->pmkids.npmkid; i++) {
> WL_DBG("PMKID[%d]: %pM =\n", i,
> &pmk_list->pmkids.pmkid[i].BSSID);
> - for (j = 0; j< WLAN_PMKID_LEN; j++) {
> + for (j = 0; j< WLAN_PMKID_LEN; j++)
> WL_DBG("%02x\n", pmk_list->pmkids.pmkid[i].PMKID[j]);
> - }
> }
> if (likely(!err)) {
> err = wl_dev_bufvar_set(dev, "pmkid_info", (char *)pmk_list,
> @@ -2064,9 +2058,8 @@ wl_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
>
> WL_DBG("del_pmksa,IW_PMKSA_REMOVE - PMKID: %pM =\n",
> &pmkid.pmkid[0].BSSID);
> - for (i = 0; i< WLAN_PMKID_LEN; i++) {
> + for (i = 0; i< WLAN_PMKID_LEN; i++)
> WL_DBG("%02x\n", pmkid.pmkid[0].PMKID[i]);
> - }
>
> for (i = 0; i< wl->pmk_list->pmkids.npmkid; i++)
> if (!memcmp
> @@ -2342,9 +2335,8 @@ static bool wl_is_linkup(struct wl_priv *wl, const wl_event_msg_t *e)
> if (wl_is_ibssmode(wl)) {
> if (wl_is_ibssstarter(wl)) {
> }
> - } else {
> + } else
> return true;
> - }
> }
> }
> @@ -3421,9 +3413,9 @@ static s32 wl_dongle_up(struct net_device *ndev, u32 up)
> s32 err = 0;
> err = wl_dev_ioctl(ndev, WLC_UP,&up, sizeof(up));
> - if (unlikely(err)) {
> + if (unlikely(err))
> WL_ERR("WLC_UP error (%d)\n", err);
> - }
> +
> return err;
> }
> @@ -3432,9 +3424,9 @@ static s32 wl_dongle_power(struct net_device *ndev, u32 power_mode)
> s32 err = 0;
>
> err = wl_dev_ioctl(ndev, WLC_SET_PM,&power_mode, sizeof(power_mode));
> - if (unlikely(err)) {
> + if (unlikely(err))
> WL_ERR("WLC_SET_PM error (%d)\n", err);
> - }
> +
> return err;
> }
> @@ -3552,21 +3544,21 @@ wl_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time,
> err = wl_dev_ioctl(ndev, WLC_SET_SCAN_CHANNEL_TIME,&scan_assoc_time,
> sizeof(scan_assoc_time));
> if (err) {
> - if (err == -EOPNOTSUPP) {
> + if (err == -EOPNOTSUPP)
> WL_INFO("Scan assoc time is not supported\n");
> - } else {
> + else
> WL_ERR("Scan assoc time error (%d)\n", err);
> - }
> +
> goto dongle_scantime_out;
> }
> err = wl_dev_ioctl(ndev, WLC_SET_SCAN_UNASSOC_TIME,&scan_unassoc_time,
> sizeof(scan_unassoc_time));
> if (err) {
> - if (err == -EOPNOTSUPP) {
> + if (err == -EOPNOTSUPP)
> WL_INFO("Scan unassoc time is not supported\n");
> - } else {
> + else
> WL_ERR("Scan unassoc time error (%d)\n", err);
> - }
> +
> goto dongle_scantime_out;
> }
>
> @@ -3696,11 +3688,11 @@ static s32 wl_dongle_filter(struct net_device *ndev, u32 filter_mode)
>
> err = wl_dev_ioctl(ndev, WLC_SET_VAR, buf, buf_len);
> if (err) {
> - if (err == -EOPNOTSUPP) {
> + if (err == -EOPNOTSUPP)
> WL_INFO("filter not supported\n");
> - } else {
> + else
> WL_ERR("filter (%d)\n", err);
> - }
> +
> goto dongle_filter_out;
> }
>
> @@ -3709,11 +3701,11 @@ static s32 wl_dongle_filter(struct net_device *ndev, u32 filter_mode)
> sizeof(iovbuf));
> err = wl_dev_ioctl(ndev, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
> if (err) {
> - if (err == -EOPNOTSUPP) {
> + if (err == -EOPNOTSUPP)
> WL_INFO("filter_mode not supported\n");
> - } else {
> + else
> WL_ERR("filter_mode (%d)\n", err);
> - }
> +
> goto dongle_filter_out;
> }
>
> @@ -4151,9 +4143,8 @@ void *wl_cfg80211_request_fw(s8 *file_name)
> }
>
> req_fw_out:
> - if (unlikely(err)) {
> + if (unlikely(err))
> return NULL;
> - }
> wl->fw->ptr = 0;
> return (void *)fw_entry->data;
> }
> --
> 1.7.2.5
>
>
More information about the devel
mailing list