Message ID | 20230323113318.9473-3-cai.huoqing@linux.dev |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2864139wrt; Thu, 23 Mar 2023 04:57:11 -0700 (PDT) Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ecVPWu74 X-Google-Smtp-Source: AK7set9Omg6GxqLOnnfm067aueTg+dQQBWK96TC0lvt4vzArMyn1JRYxdPPt8aaZx/CeJ2f3t1Sl X-Received: by 2002:a17:90b:1d10:b0:23f:582d:f45f with SMTP id on16-20020a17090b1d1000b0023f582df45fmr8038165pjb.1.1679572631074; Thu, 23 Mar 2023 04:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679572631; cv=none; d=google.com; s=arc-20160816; b=tmQlDifB4Ld0i8YcMcZCNInsY/Ci7Da7oFBCdKwrzUQyCXLsHlVv47jWUZn7x8o6h6 bKpZGMTF6MVOU9iQcFh8oTNqpU8hPmUgoEWwAvnzDny4uyDwV3yczVHAxswebCu3oavF J2Zuq1VpyqSP4KMMAZwsOcJPhGp223gaitbc7JwFv47eO61dFG11fJ2m3egOuQ6fc6it 9TJwBctfxFFBGSZu9tA2kQbPWfXJwNWrXdBoOzjGaEsOGU3TCGpGACnjhssD9WJRcqtX I9jrK0j4OKBLPWOXp1MXZwoyGs4JhcEXII8zj7WJTTTHIegQYJmpBcJC7/ABP3eYUOz7 O/Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sPZcqQ6jZu5o2Ndux434TvzXwFz3PedsAkujCq96hR8=; b=DnNAZfEjcQrWS7HuXRGWybmfkGb4vKOQFwhkpJAQx1qVNTuhvmtz4xgQpXga6lZCA3 qinpsCx9W19BjmeYDBKBcIyIolMR4uoEOCtUTpg2rbkfkFFmqDeqK6n41aolQyrpTc+q QGbFixgX3clvEtKbZUSkWKeg01Kk6XcGiJIqZZ4dODqGWQyK8McBMXWoDzw1YUGysH0v jhP0xNzapBvbiQCyu2SP8O1GXDLq1Kz2BitaVMhm19fQigfCDjhfc7TRrRb2e0KVL2oH iQ1Nbc98BCkbSzDAibsqe8aJIM9vQYxaQpCGx7Eidq/2Q+U4CEShhUZhE4xD+cjIkyAn 2SKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ecVPWu74; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a17090a408c00b0023f5ee62c13si1522531pjg.179.2023.03.23.04.56.58; Thu, 23 Mar 2023 04:57:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ecVPWu74; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231416AbjCWLdq (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Thu, 23 Mar 2023 07:33:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231393AbjCWLdl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Mar 2023 07:33:41 -0400 Received: from out-22.mta1.migadu.com (out-22.mta1.migadu.com [IPv6:2001:41d0:203:375::16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63CE3303E6 for <linux-kernel@vger.kernel.org>; Thu, 23 Mar 2023 04:33:36 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1679571214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sPZcqQ6jZu5o2Ndux434TvzXwFz3PedsAkujCq96hR8=; b=ecVPWu74WuL7+2PFUH7Yggg/nVH9pne8RIE1QVe5CJ+8Xq4ZFdLn1V0HqFE3lvuurDQtZj /9G2oowpgCtB9bnA1OZtIzXZ/mEtIi6N/0cFs0iop49hOy/BVtJe0XEfC2c1yomRzxucxt uUZZMapq1zx2JabFkDwGGQpqmfGYxL4= From: Cai Huoqing <cai.huoqing@linux.dev> To: cai.huoqing@linux.dev Cc: Wolfgang Grandegger <wg@grandegger.com>, Marc Kleine-Budde <mkl@pengutronix.de>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Pavel Pisa <pisa@cmp.felk.cvut.cz>, Ondrej Ille <ondrej.ille@gmail.com>, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] can: kvaser_pciefd: Remove redundant pci_clear_master Date: Thu, 23 Mar 2023 19:33:17 +0800 Message-Id: <20230323113318.9473-3-cai.huoqing@linux.dev> In-Reply-To: <20230323113318.9473-1-cai.huoqing@linux.dev> References: <20230323113318.9473-1-cai.huoqing@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TO_EQ_FM_DIRECT_MX autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761159551533658287?= X-GMAIL-MSGID: =?utf-8?q?1761159551533658287?= |
Series |
[1/3] can: c_can: Remove redundant pci_clear_master
|
|
Commit Message
Cai Huoqing
March 23, 2023, 11:33 a.m. UTC
Remove pci_clear_master to simplify the code,
the bus-mastering is also cleared in do_pci_disable_device,
like this:
./drivers/pci/pci.c:2197
static void do_pci_disable_device(struct pci_dev *dev)
{
u16 pci_command;
pci_read_config_word(dev, PCI_COMMAND, &pci_command);
if (pci_command & PCI_COMMAND_MASTER) {
pci_command &= ~PCI_COMMAND_MASTER;
pci_write_config_word(dev, PCI_COMMAND, pci_command);
}
pcibios_disable_device(dev);
}.
And dev->is_busmaster is set to 0 in pci_disable_device.
Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
---
drivers/net/can/kvaser_pciefd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c index bcad11709bc9..53e8a914c88b 100644 --- a/drivers/net/can/kvaser_pciefd.c +++ b/drivers/net/can/kvaser_pciefd.c @@ -1907,7 +1907,6 @@ static void kvaser_pciefd_remove(struct pci_dev *pdev) free_irq(pcie->pci->irq, pcie); - pci_clear_master(pdev); pci_iounmap(pdev, pcie->reg_base); pci_release_regions(pdev); pci_disable_device(pdev);