From patchwork Mon Dec 5 18:25:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 29864 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2409845wrr; Mon, 5 Dec 2022 10:29:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf71vT3zghTI0PEMaav7IWk7XO1GLjRq8Pzu7Ur7TssuKaNG9OXEvOdsG3O7/hlIFps48W3i X-Received: by 2002:a63:e114:0:b0:478:7743:901e with SMTP id z20-20020a63e114000000b004787743901emr18030650pgh.375.1670264964132; Mon, 05 Dec 2022 10:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670264964; cv=none; d=google.com; s=arc-20160816; b=lYP7Wuikjt53YSmsIc42z79YnwpgPnNwWiQ/m9S5TwPLmdqXD5+4q+hBRtAJyKlYmK ILbW1L36bkSZUFFglLlZmVzNcIUV06jXwcx1S18Ox0S4VzIwbSDo9OoKIkPclCuV3kJp AhBMaBmYe/o30ZjzoNa50QT6ud/Q5pAOBv+2eMxutFL82nru+dvJtHRAm6GhOYdOg2vn hdtOXHSMWBtxwYyojyMh8r36XvA+cafFdEseEeY13h10SHnJ/QlUHkYEK6jj+2ZNYTKi GvdPWo1B5JI+vacNDsseRcbj3m1Q+OJcLAMcTGc6oNlHnlm1hAXMTZvbgqUSH1vwTrf0 pHEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=aWgKPvNoDOLLszWbifqTMsDZPMqGwEwGk0cp3+KN8Kw=; b=VGc9cpOQcWqMKsubnRGquunfBATCy6WA+NL/0tyt8XvEROiHeeeBDrYM3QML57rQW+ bx4eDnFdLY23RRan6BUxy8JW9pjrFmXOIkYtzxKcxUGAARAZxpzpWZXvusKh21Km8RzR 6vU1Ncb0FzpLVT8aAYt37VP2C0/irOCZjaX95IWM2zw9rmd3laI9aTH4o9RMWEkqzt5p YZ/ZV+8Nl/Se+P1d7bn8KPfX4XyNvyfOWOLKV1xZQO3EXrTpE+gNa+YcUeHVxQNyTa+u KjrtNCME03XneePWhBrfl5WRI4W5YPIfSHBPgn1YlUotJ7MY7qxzVB9nFJcbRttz3hFN Awaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=A4s+XDkO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o21-20020a170902779500b001870edc9b10si14401115pll.380.2022.12.05.10.29.10; Mon, 05 Dec 2022 10:29:24 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=A4s+XDkO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233451AbiLES2c (ORCPT + 99 others); Mon, 5 Dec 2022 13:28:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232575AbiLESZW (ORCPT ); Mon, 5 Dec 2022 13:25:22 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DD6E2124B; Mon, 5 Dec 2022 10:25:21 -0800 (PST) Date: Mon, 05 Dec 2022 18:25:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670264720; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aWgKPvNoDOLLszWbifqTMsDZPMqGwEwGk0cp3+KN8Kw=; b=A4s+XDkO+Tdr08Nqh9OKIfKcCqaOTNpvuRsBOmJLxAQ4q4QVxqR2Zz3F7ZvZF+Af88H3lR nduH1RkKvkVqkUblSAwBzj/iq3UdieY1k+PQvN92kmhAvv7FWgfUCkhfBn+8vP4zUPDAxX ZTMDdlq7O2jz1byc17RxIc3l/A2U2iOyRdpYC9DnKWZLIX2jezKAIVEh8EbcN82/5u4uhG Jodcu150OxAkEx6yNthMNFp+ZWzlGooiswSS8JKqgxxSe4HR3XKMeaTkrbIKtdC6mtKGrn RJtocsnv1wG7aoDEg3Gt8SsveWedcRENUy2zEDMLolsZpvNyVjPAJH7UkAqYzg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670264720; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aWgKPvNoDOLLszWbifqTMsDZPMqGwEwGk0cp3+KN8Kw=; b=+NxwUCe35agJLJt7Go+Reh7Q1ZpBPmHqeOyfBnLTv1cTWHg6RJw9/6ln4a5gnSxUjEoPEc wG+SBd3Ttkv0MzCw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] genirq/msi: Rename msi_add_msi_desc() to msi_insert_msi_desc() Cc: Thomas Gleixner , Jason Gunthorpe , Kevin Tian , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221124230314.103554618@linutronix.de> References: <20221124230314.103554618@linutronix.de> MIME-Version: 1.0 Message-ID: <167026471969.4906.2759058302151899562.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750421855018350454?= X-GMAIL-MSGID: =?utf-8?q?1751399755498475461?= The following commit has been merged into the irq/core branch of tip: Commit-ID: 1c89396300292da4e4a87db63bef45975461fa25 Gitweb: https://git.kernel.org/tip/1c89396300292da4e4a87db63bef45975461fa25 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:24:27 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 19:20:59 +01:00 genirq/msi: Rename msi_add_msi_desc() to msi_insert_msi_desc() This reflects the functionality better. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.103554618@linutronix.de --- drivers/pci/msi/msi.c | 4 ++-- drivers/soc/ti/ti_sci_inta_msi.c | 4 ++-- include/linux/msi.h | 2 +- kernel/irq/msi.c | 6 ++++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c index b94f6da..d107bde 100644 --- a/drivers/pci/msi/msi.c +++ b/drivers/pci/msi/msi.c @@ -308,7 +308,7 @@ static int msi_setup_msi_desc(struct pci_dev *dev, int nvec, if (desc.pci.msi_attrib.can_mask) pci_read_config_dword(dev, desc.pci.mask_pos, &desc.pci.msi_mask); - return msi_add_msi_desc(&dev->dev, &desc); + return msi_insert_msi_desc(&dev->dev, &desc); } static int msi_verify_entries(struct pci_dev *dev) @@ -591,7 +591,7 @@ static int msix_setup_msi_descs(struct pci_dev *dev, void __iomem *base, desc.pci.msix_ctrl = readl(addr + PCI_MSIX_ENTRY_VECTOR_CTRL); } - ret = msi_add_msi_desc(&dev->dev, &desc); + ret = msi_insert_msi_desc(&dev->dev, &desc); if (ret) break; } diff --git a/drivers/soc/ti/ti_sci_inta_msi.c b/drivers/soc/ti/ti_sci_inta_msi.c index 991c78b..255849c 100644 --- a/drivers/soc/ti/ti_sci_inta_msi.c +++ b/drivers/soc/ti/ti_sci_inta_msi.c @@ -73,13 +73,13 @@ static int ti_sci_inta_msi_alloc_descs(struct device *dev, for (set = 0; set < res->sets; set++) { for (i = 0; i < res->desc[set].num; i++, count++) { msi_desc.msi_index = res->desc[set].start + i; - if (msi_add_msi_desc(dev, &msi_desc)) + if (msi_insert_msi_desc(dev, &msi_desc)) goto fail; } for (i = 0; i < res->desc[set].num_sec; i++, count++) { msi_desc.msi_index = res->desc[set].start_sec + i; - if (msi_add_msi_desc(dev, &msi_desc)) + if (msi_insert_msi_desc(dev, &msi_desc)) goto fail; } } diff --git a/include/linux/msi.h b/include/linux/msi.h index 764a4e8..f8ba85a 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -286,7 +286,7 @@ static inline void msi_desc_set_iommu_cookie(struct msi_desc *desc, } #endif -int msi_add_msi_desc(struct device *dev, struct msi_desc *init_desc); +int msi_insert_msi_desc(struct device *dev, struct msi_desc *init_desc); void msi_free_msi_descs_range(struct device *dev, unsigned int first_index, unsigned int last_index); /** diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index e1593c1..33b8a6c 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -77,13 +77,15 @@ static int msi_insert_desc(struct msi_device_data *md, struct msi_desc *desc, un } /** - * msi_add_msi_desc - Allocate and initialize a MSI descriptor + * msi_insert_msi_desc - Allocate and initialize a MSI descriptor and + * insert it at @init_desc->msi_index + * * @dev: Pointer to the device for which the descriptor is allocated * @init_desc: Pointer to an MSI descriptor to initialize the new descriptor * * Return: 0 on success or an appropriate failure code. */ -int msi_add_msi_desc(struct device *dev, struct msi_desc *init_desc) +int msi_insert_msi_desc(struct device *dev, struct msi_desc *init_desc) { struct msi_desc *desc;