Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2218006ybc; Sun, 17 Nov 2019 16:23:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwY1NgWdk4QUIqKPZU6ykn+bLa7DIA2WB3OqsTsoYlMdx0Jy+WUd8WKXxPVm0/6JkpMoO7K X-Received: by 2002:a17:906:7042:: with SMTP id r2mr22187572ejj.166.1574036591957; Sun, 17 Nov 2019 16:23:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574036591; cv=none; d=google.com; s=arc-20160816; b=Eg5a2MU2OPG9XdBH+nZEYwDJOzkBCuPYr0Y/uKZM3IIPFNydGzhInW5ozIBwaW8s40 lzxQSmRX6hHQgtB5dv+OqupFzXFmO2ZHDZtt921cLcI85t/zNMx6RqxgC7oUjIVfh5p1 6QgvNMt/XTAHefo/9NRP0EiJzNHr/YfdWyp4uK7mhK08ylK6f3RNddD1MHzkoE8bohFe TzLiZRfv57W9iptpfpAHJ/7ik4SPfIHuDlofWdz6G/smOFeNzak6b/Qlk5vTOUdTXLan cUk/NT6Z3pdfIaAPUN20EcxozbUSl8nhmDITuC5R6FKhCixOAzmKs9uxxLgdWSsghAAt YXGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1Ovt6jbDPjyCR0/arOz9a+rgIf56RvTTsMB0ccBa1ek=; b=Jm26PC95SYXfjQH2KAF8V6pdgaAK9TJA356x0i/4ofos/EmW6ryNUUt3pUEk2F5f6g NunKqgAYaDdVYiewU1zAy8ZWpR93EUMq/f4yKb3ePXO6cSdR3hJgi6rF4gj8ddecz36v k7XPowyTtft7fvXf2qViDw7S2Pv6enC/0LA+nnqL5inMN0C1xx3yCVsTM9JkWsSzqbEg tyRncUXrTfStSepyfVLm0UH8eK62F3r2bQdDOtw982FaDvGqUfJRRKtrOylYM72PfR2f qkvM6dA4UnriiBljzvnrskWIbITuxkybN8RM2P36SXvfFgUL/CWIulF8RQibPW33x7pm xN/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fredlawl-com.20150623.gappssmtp.com header.s=20150623 header.b=DuZR75PE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id la17si10781611ejb.433.2019.11.17.16.22.48; Sun, 17 Nov 2019 16:23:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fredlawl-com.20150623.gappssmtp.com header.s=20150623 header.b=DuZR75PE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726284AbfKRAVS (ORCPT + 99 others); Sun, 17 Nov 2019 19:21:18 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:33953 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbfKRAVQ (ORCPT ); Sun, 17 Nov 2019 19:21:16 -0500 Received: by mail-ot1-f67.google.com with SMTP id 19so3078359otz.1 for ; Sun, 17 Nov 2019 16:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fredlawl-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1Ovt6jbDPjyCR0/arOz9a+rgIf56RvTTsMB0ccBa1ek=; b=DuZR75PETpq9SHSgVGX4A7aW1VbYfbZpBNrGJMQG94ixdnUnssFw8RwbbiqCZWa/ad Ib1io05cexSPa9pmwdrRDzgcgZ7FNsfNhleHAGvS7g/SNVm3GEQbn9XIt7fJ2WUDrVnJ vF71JXj/NIpCafPIliMJxG0OjI3A+r//g0kJ1s4eIn0bHDy/Ci0Z4Q1M3TrxGD/1CccX T1TcO83huhJL5HXu/UTUdSTCduX4v83PJKYlEktUQgpXvRMqcB+xsHT6QeIEwdHcQVrc h6YVSw4gQ3rPaPuT4mzbVcReI8r5mdt90esAKNQ+uXv4Bw6Mxkb+mFPAmxGtbP57LSnB wnyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1Ovt6jbDPjyCR0/arOz9a+rgIf56RvTTsMB0ccBa1ek=; b=UoHSgpVHBARax058j7YffdMERbn8doQrFAq1IBnnastldiILGcoOtMOn1d4Za2gt9t 4KrWGobC2RizwkY9GUuUfNeV8cKMUGsZf/N1zKyV0me9/WIlVb8qdGCGd2bw7U4bDjM0 8Goj5K7oealFbapxs09KTEFL5/f6nd/QLsNvt6pAKBXKrI5neGY2fesLeihzsadI1HiD QTb/3AsbYcTlIvYsR9UGHZtglwuqw6j7E8pTmNmVsKxzzRpLy0k2jVGOzaweOy2OijTs tLbeFLBmEqa0TE8HOJbrmV3MMd3vFBI2v0Aedrs57BLit07MPyBhC37NVKHrGXxpqmtd oaZQ== X-Gm-Message-State: APjAAAXwboOlVoUNrpBetK1dTGeB0H3TRmAZFiotKZ+ea1Z8U37mMqQX hD1eSOvfw3LL6jscomn/fUIoTQ== X-Received: by 2002:a9d:6288:: with SMTP id x8mr21052106otk.170.1574036476012; Sun, 17 Nov 2019 16:21:16 -0800 (PST) Received: from com.attlocal.net ([2600:1700:4870:71e0::10]) by smtp.gmail.com with ESMTPSA id 65sm5532194oie.50.2019.11.17.16.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Nov 2019 16:21:15 -0800 (PST) From: Frederick Lawler To: axboe@kernel.dk Cc: Frederick Lawler , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, bvanassche@acm.org Subject: [PATCH v2 4/4] mtip32xx: Replace magic numbers with PCI constants Date: Sun, 17 Nov 2019 18:20:57 -0600 Message-Id: <20191118002057.9596-5-fred@fredlawl.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191118002057.9596-1-fred@fredlawl.com> References: <20191118002057.9596-1-fred@fredlawl.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Readability was improved by replacing pci_read_config_word() with pcie_capability_read_word(). Take that a step further by replacing magic numbers with PCI reg constants. No functional change intended. Signed-off-by: Frederick Lawler --- v2: - Added this patch --- drivers/block/mtip32xx/mtip32xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 35703dc98e25..225c6ae62385 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -3942,8 +3942,8 @@ static void mtip_disable_link_opts(struct driver_data *dd, struct pci_dev *pdev) return; pcie_capability_read_word(pdev, PCI_EXP_DEVCTL, &pcie_dev_ctrl); - if (pcie_dev_ctrl & (1 << 11) || - pcie_dev_ctrl & (1 << 4)) { + if (pcie_dev_ctrl & PCI_EXP_DEVCTL_NOSNOOP_EN || + pcie_dev_ctrl & PCI_EXP_DEVCTL_RELAX_EN) { dev_info(&dd->pdev->dev, "Disabling ERO/No-Snoop on bridge device %04x:%04x\n", pdev->vendor, pdev->device); -- 2.20.1