From owner-svn-src-all@freebsd.org Wed Feb 17 21:13:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 963A4AAC036; Wed, 17 Feb 2016 21:13:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6548F1F0B; Wed, 17 Feb 2016 21:13:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1HLDXhi069773; Wed, 17 Feb 2016 21:13:33 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1HLDX3v069772; Wed, 17 Feb 2016 21:13:33 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201602172113.u1HLDX3v069772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 17 Feb 2016 21:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295719 - head/sys/dev/ata/chipsets X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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, 17 Feb 2016 21:13:34 -0000 Author: glebius Date: Wed Feb 17 21:13:33 2016 New Revision: 295719 URL: https://svnweb.freebsd.org/changeset/base/295719 Log: Ternary operator has lower priority than OR. Found by: PVS-Studio Modified: head/sys/dev/ata/chipsets/ata-serverworks.c Modified: head/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-serverworks.c Wed Feb 17 21:09:19 2016 (r295718) +++ head/sys/dev/ata/chipsets/ata-serverworks.c Wed Feb 17 21:13:33 2016 (r295719) @@ -162,9 +162,8 @@ ata_serverworks_chipinit(device_t dev) } } else { - pci_write_config(dev, 0x5a, - (pci_read_config(dev, 0x5a, 1) & ~0x40) | - (ctlr->chip->cfg1 == SWKS_100) ? 0x03 : 0x02, 1); + pci_write_config(dev, 0x5a, (pci_read_config(dev, 0x5a, 1) & ~0x40) | + ((ctlr->chip->cfg1 == SWKS_100) ? 0x03 : 0x02), 1); } ctlr->setmode = ata_serverworks_setmode; return 0;