Message ID | 20230323115912.14443-1-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 j10csp2869811wrt; Thu, 23 Mar 2023 05:07:09 -0700 (PDT) X-Google-Smtp-Source: AK7set+aLOH4jrXQEkhqCcCIU8XQRzEwovc+5Cw+pJBu2z7AegiNHIZEPqUFsx93f2KMIVUXeWeM X-Received: by 2002:a17:906:720f:b0:88f:8a5:b4cd with SMTP id m15-20020a170906720f00b0088f08a5b4cdmr11249516ejk.1.1679573229474; Thu, 23 Mar 2023 05:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679573229; cv=none; d=google.com; s=arc-20160816; b=kK7thlRfKsQ+TQU4HLTDZ7/XZ3NnebVxcCUaO4ubY3UfQbI4QllmzxejFIh/rFmxDJ pMx48M6F4ac8OhlGgxh1Xn6Gg7N3uMFAYLuXrbjFh1FvrXDUF14VRINDory0ZUvnCTaI ZQZqTiNF2Zgw94buQa0hiEBEXF0/8IATnwMuXzT5vztCt3NoRDKj+RguJ/bQLSSg0Jol 5OLkmNYqbkkzWwSH91buGfRvmt4isPCtNQ8TP68AH7yPa9UDVdhGwMClaq79JPoF31YJ 4bBTmGe/gWxd8ij0LigyyymqUIOYy0WsIsMziYaQPS+n0Kl9YoxEHFNUrpITOwCrTDfw n91g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=uKvdKn+ZKiDobsjJ7G4fisgGAh/FDS+LYl6+K24JBfw=; b=ivI6alyZK+Rbos5T5KGQgvZePEV3520LqNIwfN2/2Fm2y6Iz+DSK+YqYkRIovB2uj7 8G817FKOLhb/r5VbYUlW1bQY9D83yBeJ8y11EQjqhyHthu+90OwBrPvXphaCqsgUgZic wJ8B41dnAd+74iZ392S3Zt7E2DBZ0Jnt/D/2VH05P3m6L8Q+uekE/PEwmGlyuSO6WFNb qiuj8cY82cIHEJbI5REi2zpjv5f2B3mjNtE3LeS9viFdS6fpSHtEiaI2D2Tc1Hf+NRah VqGtXf8AOdfJvpD/66Jx2D6F8w8v78QjEKO6QHrAt7i44II0NTKFE5PBkrlzE+BiJI5E zgyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=TqaYL49A; 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 i5-20020a170906114500b00930ce4af913si16344270eja.122.2023.03.23.05.06.45; Thu, 23 Mar 2023 05:07:09 -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=TqaYL49A; 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 S231375AbjCWMBU (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Thu, 23 Mar 2023 08:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231298AbjCWMA5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Mar 2023 08:00:57 -0400 Received: from out-56.mta0.migadu.com (out-56.mta0.migadu.com [91.218.175.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E17083669E for <linux-kernel@vger.kernel.org>; Thu, 23 Mar 2023 04:59:30 -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=1679572755; 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; bh=uKvdKn+ZKiDobsjJ7G4fisgGAh/FDS+LYl6+K24JBfw=; b=TqaYL49AWNaDEeyEUFkQMLxOqt2a9gwPqRb1DEv0OWemw4mXaYiiBzRFJTLaurC/Uuuf4k 0Li+10xGZppilNfCX6b7oBMlUMs30N7YW2YyeN4lKOozZ6XUhQAyYJcQyOiKH7ZDbwUzWm MtXEap5oKGy0Rc1vmsdefdCSbn+O/0A= From: Cai Huoqing <cai.huoqing@linux.dev> To: cai.huoqing@linux.dev Cc: Karsten Keil <isdn@linux-pingi.de>, Yang Yingliang <yangyingliang@huawei.com>, "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] isdn: mISDN: netjet: Remove redundant pci_clear_master Date: Thu, 23 Mar 2023 19:59:11 +0800 Message-Id: <20230323115912.14443-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?1761160178380210011?= X-GMAIL-MSGID: =?utf-8?q?1761160178380210011?= |
Series |
isdn: mISDN: netjet: Remove redundant pci_clear_master
|
|
Commit Message
Cai Huoqing
March 23, 2023, 11:59 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/isdn/hardware/mISDN/netjet.c | 1 -
1 file changed, 1 deletion(-)
Comments
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Thu, 23 Mar 2023 19:59:11 +0800 you wrote: > 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; > > [...] Here is the summary with links: - isdn: mISDN: netjet: Remove redundant pci_clear_master https://git.kernel.org/netdev/net-next/c/950bfdcf17ec You are awesome, thank you!
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index f8447135a902..566c790a9481 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c @@ -970,7 +970,6 @@ nj_release(struct tiger_hw *card) write_lock_irqsave(&card_lock, flags); list_del(&card->list); write_unlock_irqrestore(&card_lock, flags); - pci_clear_master(card->pdev); pci_disable_device(card->pdev); pci_set_drvdata(card->pdev, NULL); kfree(card);