ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k:mac: disassoc dbg msg after return check
@ 2019-11-11  8:30 Eduardo Abinader
  2019-11-11  8:50 ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Abinader @ 2019-11-11  8:30 UTC (permalink / raw)
  To: linux-wireless; +Cc: Eduardo Abinader, ath10k, kvalo

Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 5e3450cfb07b..038d5c27bed7 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -6786,13 +6786,13 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
 		/*
 		 * Disassociation.
 		 */
-		ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM disassociated\n",
-			   sta->addr);
-
 		ret = ath10k_station_disassoc(ar, vif, sta);
 		if (ret)
 			ath10k_warn(ar, "failed to disassociate station: %pM vdev %i: %i\n",
 				    sta->addr, arvif->vdev_id, ret);
+		else
+			ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM disassociated\n",
+			   sta->addr);
 	}
 exit:
 	mutex_unlock(&ar->conf_mutex);
-- 
2.20.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath10k:mac: disassoc dbg msg after return check
  2019-11-11  8:30 [PATCH] ath10k:mac: disassoc dbg msg after return check Eduardo Abinader
@ 2019-11-11  8:50 ` Kalle Valo
       [not found]   ` <CAGoNHni94JihdS-XovcC_zZ9YkMhSeoupfsMn2ioh9koA0EwmQ@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2019-11-11  8:50 UTC (permalink / raw)
  To: Eduardo Abinader; +Cc: linux-wireless, ath10k

Eduardo Abinader <eduardoabinader@gmail.com> writes:

> Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com>

No empty commit logs, please.

> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -6786,13 +6786,13 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
>  		/*
>  		 * Disassociation.
>  		 */
> -		ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM disassociated\n",
> -			   sta->addr);
> -
>  		ret = ath10k_station_disassoc(ar, vif, sta);
>  		if (ret)
>  			ath10k_warn(ar, "failed to disassociate station: %pM vdev %i: %i\n",
>  				    sta->addr, arvif->vdev_id, ret);
> +		else
> +			ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM disassociated\n",
> +			   sta->addr);

I don't understand, how is this better?

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath10k:mac: disassoc dbg msg after return check
       [not found]   ` <CAGoNHni94JihdS-XovcC_zZ9YkMhSeoupfsMn2ioh9koA0EwmQ@mail.gmail.com>
@ 2019-11-11  9:22     ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2019-11-11  9:22 UTC (permalink / raw)
  To: Eduardo Abinader; +Cc: linux-wireless, ath10k

Eduardo Abinader <eduardoabinader@gmail.com> writes:

> On Mon, 11 Nov 2019 at 09:50, Kalle Valo <kvalo@codeaurora.org> wrote:
>
>> Eduardo Abinader <eduardoabinader@gmail.com> writes:
>>
>> > Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com>
>>
>> No empty commit logs, please.
>>
>> > --- a/drivers/net/wireless/ath/ath10k/mac.c
>> > +++ b/drivers/net/wireless/ath/ath10k/mac.c
>> > @@ -6786,13 +6786,13 @@ static int ath10k_sta_state(struct ieee80211_hw
>> *hw,
>> >               /*
>> >                * Disassociation.
>> >                */
>> > -             ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM
>> disassociated\n",
>> > -                        sta->addr);
>> > -
>> >               ret = ath10k_station_disassoc(ar, vif, sta);
>> >               if (ret)
>> >                       ath10k_warn(ar, "failed to disassociate station:
>> %pM vdev %i: %i\n",
>> >                                   sta->addr, arvif->vdev_id, ret);
>> > +             else
>> > +                     ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM
>> disassociated\n",
>> > +                        sta->addr);
>>
>> I don't understand, how is this better?
>>
>
> Either one msg or the other? I think a bit cleaner log.

I don't see it that way, the else branch makes the code harder to read
and for consistency it's better to always print the debug log.

> --000000000000b3b5a805970e8f8f
> Content-Type: text/html; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable

Please don't use HTML, I think the mailing lists drop all HTML mail
automatically.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-11  9:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-11  8:30 [PATCH] ath10k:mac: disassoc dbg msg after return check Eduardo Abinader
2019-11-11  8:50 ` Kalle Valo
     [not found]   ` <CAGoNHni94JihdS-XovcC_zZ9YkMhSeoupfsMn2ioh9koA0EwmQ@mail.gmail.com>
2019-11-11  9:22     ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox