From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 547E8C04A6A for ; Tue, 8 Aug 2023 03:57:39 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RKfXd3PpSz3cGC for ; Tue, 8 Aug 2023 13:57:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=huawei.com (client-ip=45.249.212.189; helo=szxga03-in.huawei.com; envelope-from=wangxiongfeng2@huawei.com; receiver=lists.ozlabs.org) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4RKfWv5BX6z2xsY for ; Tue, 8 Aug 2023 13:56:55 +1000 (AEST) Received: from dggpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4RKfSR5cbkz1hwCb; Tue, 8 Aug 2023 11:53:59 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 8 Aug 2023 11:56:47 +0800 From: Xiongfeng Wang To: , , , , , , , , Subject: [PATCH v2 0/2] Introduce pci_find_next_dvsec_capability() to simplify the code Date: Tue, 8 Aug 2023 12:08:56 +0800 Message-ID: <20230808040858.183568-1-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500002.china.huawei.com (7.185.36.229) X-CFilter-Loop: Reflected X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, yangyingliang@huawei.com, helgaas@kernel.org, david.e.box@linux.intel.com, jonathan.cameron@huawei.com, linuxppc-dev@lists.ozlabs.org, wangxiongfeng2@huawei.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Some devices may have several DVSEC (Designated Vendor-Specific Extended Capability) entries with the same DVSEC ID. Introduce pci_find_next_dvsec_capability() to simplify the code. ChangeLog: v1->v2: Add Reviewed-by and Acked-by tags Modify commit message and document a little for the first patch Xiongfeng Wang (2): PCI: Add pci_find_next_dvsec_capability to find next Designated VSEC ocxl: use pci_find_next_dvsec_capability() to simplify the code arch/powerpc/platforms/powernv/ocxl.c | 20 ++------------ drivers/misc/ocxl/config.c | 21 +++++---------- drivers/pci/pci.c | 39 ++++++++++++++++++--------- include/linux/pci.h | 2 ++ include/misc/ocxl-config.h | 4 --- 5 files changed, 36 insertions(+), 50 deletions(-) -- 2.20.1