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 99F35C0015E for ; Mon, 7 Aug 2023 03:08:19 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RK1VB0Mdfz3dDt for ; Mon, 7 Aug 2023 13:08:18 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=huawei.com (client-ip=45.249.212.187; helo=szxga01-in.huawei.com; envelope-from=wangxiongfeng2@huawei.com; receiver=lists.ozlabs.org) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (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 4RK1Sq3fK8z3cQr for ; Mon, 7 Aug 2023 13:07:07 +1000 (AEST) Received: from dggpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RK1Qq4Pr4zrSFF; Mon, 7 Aug 2023 11:05:23 +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; Mon, 7 Aug 2023 11:06:31 +0800 From: Xiongfeng Wang To: , , , , , , , , , Subject: [PATCH 0/2] introduce pci_find_next_dvsec_capability() to simplify the code Date: Mon, 7 Aug 2023 11:18:44 +0800 Message-ID: <20230807031846.77348-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: dggems706-chm.china.huawei.com (10.3.19.183) 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, linuxppc-dev@lists.ozlabs.org, jonathan.cameron@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. 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 | 37 ++++++++++++++++++--------- include/linux/pci.h | 2 ++ include/misc/ocxl-config.h | 4 --- 5 files changed, 35 insertions(+), 49 deletions(-) -- 2.20.1