From owner-svn-src-all@freebsd.org Wed May 22 16:20:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E67215B06A7; Wed, 22 May 2019 16:20:06 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3F8D8D5D9; Wed, 22 May 2019 16:20:05 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id B5A1317CAD; Wed, 22 May 2019 16:20:05 +0000 (UTC) Date: Wed, 22 May 2019 16:20:05 +0000 From: Alexey Dokuchaev To: Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r250609 - head/sys/dev/ath Message-ID: <20190522162005.GA82729@FreeBSD.org> References: <201305131903.r4DJ3DHm045333@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201305131903.r4DJ3DHm045333@svn.freebsd.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: C3F8D8D5D9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:20:06 -0000 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