* [PATCH 1/2] brcmsmac: Downgrade d11hdrs_mac80211 error messages to warnings. @ 2013-02-14 1:33 Joe Perches 2013-02-14 1:33 ` [PATCH 2/2] brcmsmac: Remove unnecessary memset casts Joe Perches 2013-02-14 19:54 ` [PATCH 1/2] brcmsmac: Downgrade d11hdrs_mac80211 error messages to warnings Arend van Spriel 0 siblings, 2 replies; 4+ messages in thread From: Joe Perches @ 2013-02-14 1:33 UTC (permalink / raw) To: Arend van Spriel Cc: Pieter-Paul Giesberts, brcm80211-dev-list, linux-wireless These messages don't seem to be errors but notifications that some attribute isn't quite right. Don't mark them as errors. Signed-off-by: Joe Perches <joe@perches.com> --- drivers/net/wireless/brcm80211/brcmsmac/main.c | 29 ++++++++++++-------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index e80825e..b3ea15e 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c @@ -6443,10 +6443,9 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, if ((txrate[k]->flags & IEEE80211_TX_RC_MCS) && (!is_mcs_rate(rspec[k]))) { - brcms_err(wlc->hw->d11core, - "wl%d: %s: IEEE80211_TX_" - "RC_MCS != is_mcs_rate(rspec)\n", - wlc->pub->unit, __func__); + brcms_warn(wlc->hw->d11core, + "wl%d: %s: IEEE80211_TX_RC_MCS != is_mcs_rate(rspec)\n", + wlc->pub->unit, __func__); } if (is_mcs_rate(rspec[k])) { @@ -6838,21 +6837,19 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, wlc->fragthresh[queue] = (u16) newfragthresh; } else { - brcms_err(wlc->hw->d11core, - "wl%d: %s txop invalid " - "for rate %d\n", - wlc->pub->unit, fifo_names[queue], - rspec2rate(rspec[0])); + brcms_warn(wlc->hw->d11core, + "wl%d: %s txop invalid for rate %d\n", + wlc->pub->unit, fifo_names[queue], + rspec2rate(rspec[0])); } if (dur > wlc->edcf_txop[ac]) - brcms_err(wlc->hw->d11core, - "wl%d: %s: %s txop " - "exceeded phylen %d/%d dur %d/%d\n", - wlc->pub->unit, __func__, - fifo_names[queue], - phylen, wlc->fragthresh[queue], - dur, wlc->edcf_txop[ac]); + brcms_warn(wlc->hw->d11core, + "wl%d: %s: %s txop exceeded phylen %d/%d dur %d/%d\n", + wlc->pub->unit, __func__, + fifo_names[queue], + phylen, wlc->fragthresh[queue], + dur, wlc->edcf_txop[ac]); } } -- 1.8.1.2.459.gbcd45b4.dirty ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] brcmsmac: Remove unnecessary memset casts 2013-02-14 1:33 [PATCH 1/2] brcmsmac: Downgrade d11hdrs_mac80211 error messages to warnings Joe Perches @ 2013-02-14 1:33 ` Joe Perches 2013-02-14 19:56 ` Arend van Spriel 2013-02-14 19:54 ` [PATCH 1/2] brcmsmac: Downgrade d11hdrs_mac80211 error messages to warnings Arend van Spriel 1 sibling, 1 reply; 4+ messages in thread From: Joe Perches @ 2013-02-14 1:33 UTC (permalink / raw) To: Arend van Spriel Cc: Pieter-Paul Giesberts, brcm80211-dev-list, linux-wireless Remove the casts of the first argument of memset. Neaten the style by using the sizeof the actual variable being memset not the sizeof the type of variable. Signed-off-by: Joe Perches <joe@perches.com> --- drivers/net/wireless/brcm80211/brcmsmac/main.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index b3ea15e..8ef02dc 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c @@ -3138,8 +3138,7 @@ void brcms_c_reset(struct brcms_c_info *wlc) brcms_c_statsupd(wlc); /* reset our snapshot of macstat counters */ - memset((char *)wlc->core->macstat_snapshot, 0, - sizeof(struct macstat)); + memset(wlc->core->macstat_snapshot, 0, sizeof(struct macstat)); brcms_b_reset(wlc->hw); } @@ -4052,7 +4051,7 @@ void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci, return; } - memset((char *)&acp_shm, 0, sizeof(struct shm_acparams)); + memset(&acp_shm, 0, sizeof(struct shm_acparams)); /* fill in shm ac params struct */ acp_shm.txop = params->txop; /* convert from units of 32us to us for ucode */ @@ -4768,7 +4767,7 @@ static void brcms_c_bss_default_init(struct brcms_c_info *wlc) struct brcms_bss_info *bi = wlc->default_bss; /* init default and target BSS with some sane initial values */ - memset((char *)(bi), 0, sizeof(struct brcms_bss_info)); + memset(bi, 0, sizeof(*bi)); bi->beacon_period = BEACON_INTERVAL_DEFAULT; /* fill the default channel as the first valid channel @@ -5297,7 +5296,7 @@ int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config) brcms_c_protection_upd(wlc, BRCMS_PROT_G_USER, gmode); /* Clear rateset override */ - memset(&rs, 0, sizeof(struct brcms_c_rateset)); + memset(&rs, 0, sizeof(rs)); switch (gmode) { case GMODE_LEGACY_B: @@ -5520,7 +5519,7 @@ int brcms_c_set_rateset(struct brcms_c_info *wlc, struct brcm_rateset *rs) if (rs->count > BRCMS_NUMRATES) return -ENOBUFS; - memset(&internal_rs, 0, sizeof(struct brcms_c_rateset)); + memset(&internal_rs, 0, sizeof(internal_rs)); /* Copy only legacy rateset section */ internal_rs.count = rs->count; @@ -5623,7 +5622,7 @@ int brcms_c_module_unregister(struct brcms_pub *pub, const char *name, for (i = 0; i < BRCMS_MAXMODULES; i++) { if (!strcmp(wlc->modulecb[i].name, name) && (wlc->modulecb[i].hdl == hdl)) { - memset(&wlc->modulecb[i], 0, sizeof(struct modulecb)); + memset(&wlc->modulecb[i], 0, sizeof(wlc->modulecb[i])); return 0; } } @@ -6678,11 +6677,9 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, (struct ofdm_phy_hdr *) rts_plcp) : rts_plcp[0]) << 8; } else { - memset((char *)txh->RTSPhyHeader, 0, D11_PHY_HDR_LEN); - memset((char *)&txh->rts_frame, 0, - sizeof(struct ieee80211_rts)); - memset((char *)txh->RTSPLCPFallback, 0, - sizeof(txh->RTSPLCPFallback)); + memset(txh->RTSPhyHeader, 0, D11_PHY_HDR_LEN); + memset(&txh->rts_frame, 0, sizeof(struct ieee80211_rts)); + memset(txh->RTSPLCPFallback, 0, sizeof(txh->RTSPLCPFallback)); txh->RTSDurFallback = 0; } @@ -7324,7 +7321,7 @@ brcms_c_bcn_prb_template(struct brcms_c_info *wlc, u16 type, *len = hdr_len + body_len; /* format PHY and MAC headers */ - memset((char *)buf, 0, hdr_len); + memset(buf, 0, hdr_len); plcp = (struct cck_phy_hdr *) buf; -- 1.8.1.2.459.gbcd45b4.dirty ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] brcmsmac: Remove unnecessary memset casts 2013-02-14 1:33 ` [PATCH 2/2] brcmsmac: Remove unnecessary memset casts Joe Perches @ 2013-02-14 19:56 ` Arend van Spriel 0 siblings, 0 replies; 4+ messages in thread From: Arend van Spriel @ 2013-02-14 19:56 UTC (permalink / raw) To: Joe Perches; +Cc: Pieter-Paul Giesberts, brcm80211-dev-list, linux-wireless On 02/14/2013 02:33 AM, Joe Perches wrote: > Remove the casts of the first argument of memset. > > Neaten the style by using the sizeof the actual variable > being memset not the sizeof the type of variable. Acked-by: Arend van Spriel <arend@broadcom.com> > Signed-off-by: Joe Perches <joe@perches.com> > --- > drivers/net/wireless/brcm80211/brcmsmac/main.c | 23 ++++++++++------------- > 1 file changed, 10 insertions(+), 13 deletions(-) For new code we try to stick to that style. Thanks for going through the existing code. Gr. AvS ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] brcmsmac: Downgrade d11hdrs_mac80211 error messages to warnings. 2013-02-14 1:33 [PATCH 1/2] brcmsmac: Downgrade d11hdrs_mac80211 error messages to warnings Joe Perches 2013-02-14 1:33 ` [PATCH 2/2] brcmsmac: Remove unnecessary memset casts Joe Perches @ 2013-02-14 19:54 ` Arend van Spriel 1 sibling, 0 replies; 4+ messages in thread From: Arend van Spriel @ 2013-02-14 19:54 UTC (permalink / raw) To: Joe Perches; +Cc: Pieter-Paul Giesberts, brcm80211-dev-list, linux-wireless On 02/14/2013 02:33 AM, Joe Perches wrote: > These messages don't seem to be errors but notifications > that some attribute isn't quite right. > > Don't mark them as errors. > Acked-by: Arend van Spriel <arend@broadcom.com> > Signed-off-by: Joe Perches <joe@perches.com> > --- > drivers/net/wireless/brcm80211/brcmsmac/main.c | 29 ++++++++++++-------------- > 1 file changed, 13 insertions(+), 16 deletions(-) ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-14 19:56 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-14 1:33 [PATCH 1/2] brcmsmac: Downgrade d11hdrs_mac80211 error messages to warnings Joe Perches 2013-02-14 1:33 ` [PATCH 2/2] brcmsmac: Remove unnecessary memset casts Joe Perches 2013-02-14 19:56 ` Arend van Spriel 2013-02-14 19:54 ` [PATCH 1/2] brcmsmac: Downgrade d11hdrs_mac80211 error messages to warnings Arend van Spriel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).