svn commit: r250609 - head/sys/dev/ath

Alexey Dokuchaev danfe at freebsd.org
Wed May 22 16:20:06 UTC 2019


On Mon, May 13, 2013 at 07:03:13PM +0000, Adrian Chadd wrote:
> New Revision: 250609
> URL: http://svnweb.freebsd.org/changeset/base/250609
> 
> Log:
>   Since the node state is 100% back under the TX lock, just kill the use
>   of atomics.
>   
> Modified:
>   head/sys/dev/ath/if_ath.c
> 
> @@ -6140,13 +6133,13 @@ ath_tx_update_tim(struct ath_softc *sc,
>  		/*
>  		 * Don't bother grabbing the lock unless the queue is empty.
>  		 */
> -		if (atomic_load_acq_int(&an->an_swq_depth) != 0)
> +		if (&an->an_swq_depth != 0)
>  			return;
>  
>  		if (an->an_is_powersave &&
>  		    an->an_stack_psq == 0 &&
>  		    an->an_tim_set == 1 &&
> -		    atomic_load_acq_int(&an->an_swq_depth) == 0) {
> +		    an->an_swq_depth == 0) {

PVS Studio complains here: warning: V560 A part of conditional expression
is always true: an->an_swq_depth == 0.  Which probably makes sense since
you return earlier if it's != 0.

./danfe


More information about the svn-src-all mailing list