From patchwork Fri Nov 11 13:56:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 18807 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp756871wru; Fri, 11 Nov 2022 06:03:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf4zI7f9uE+KmOGr84b7lw7mkmdFaERlcmVnXhvoA21y1AlZ3CoUiz4RHe3WxBQmk/SNwaDi X-Received: by 2002:a17:90a:5992:b0:213:519d:fe51 with SMTP id l18-20020a17090a599200b00213519dfe51mr2002095pji.239.1668175430907; Fri, 11 Nov 2022 06:03:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668175430; cv=none; d=google.com; s=arc-20160816; b=eVfN87LXuMjrhBxxKwBcRbOWG/3Vu9BkkvN30DC67/sCa/9a3KEXph7jVH7pJchIBC 8rb/wF+rIMQr8MOPUFXVJHjvl+KsJPJ0HC2iuz9CglZ7c4lhg0A7Z7EEXKgrg7jLIZ0/ V/sXcoOXIidTH1rQuY60mbXfh0Vt9sM+0o6HwUXc25A0fL4PyuiIt2Yk1RVuaawodf47 rX6FBOzfayLqZW3pNpXGKHg4EfGe+Ki1fcQN4TMMRpa9M2lj44SLcJP8Q3vtxEckgikb +wHajmZix1oI0IUb23YBILu4aVP0g1NXA1QH/yply2E92vS/Nw3qWLbp5BGO9Bt9jbMz F2kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=ZAg32d9i/2td2oqLXP4twAnBQvJWwD8NcSLXlUrJbYg=; b=cS6eaa1j/DWLInxucyz2qJ+frNpA2xxGbdIDeyiG+mswseGrSpPEais5Q5261sSnch ZKhI3JgfaFnUAM6pVMCF2sN2Z3oCgQ1iopUl9cpg1SlS1WgUJHnKOGjt5PdT7QTZ6qyi y70Nu/9YqV+4t0nfxYE6SqYaTAmCtSeTTQLGE1+miAkqjQohHsriJKUpUKH33bxfP9yp rtgz8GlECGL9ghG3ZdDEIVKFm3ILMg1QpkVQJaMpmDOm6ZJJ0z268P9YLyqQsdhzWv00 OYszyNiRrGAFsy+4KAZ3R6OsbxSUCxdkn0E4Dg3AfOQ3p/oaCQRIEBbtCeHLWUKAcBCb 3BSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wTMg281e; dkim=neutral (no key) header.i=@linutronix.de header.b=Snso0XSv; 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 u14-20020a63790e000000b0046f915df515si2615471pgc.29.2022.11.11.06.03.16; Fri, 11 Nov 2022 06:03:50 -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=wTMg281e; dkim=neutral (no key) header.i=@linutronix.de header.b=Snso0XSv; 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 S234202AbiKKOB4 (ORCPT + 99 others); Fri, 11 Nov 2022 09:01:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234278AbiKKOBL (ORCPT ); Fri, 11 Nov 2022 09:01:11 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70DEF391D2; Fri, 11 Nov 2022 05:56:55 -0800 (PST) Message-ID: <20221111132706.612934166@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668175013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=ZAg32d9i/2td2oqLXP4twAnBQvJWwD8NcSLXlUrJbYg=; b=wTMg281eWp6mj4p8XCRYsGLuKaE18bBJPfh2mwDMgfgBIRGhzgaW5KoLmNiJ9Yi2sfgHvE J9n2fQpOecsWGH9hD1tiP8fayfvIJKg4xn8ck9M1HOXvrP/NN2Su3SNaOBENX/5yU2h6DE QkG5EqNjZEmxgyeRQTiXfXRjJl4fevozjBLTZgNFFnpC1GPgoZrU9Y+uY/sHFI5Esc4GXW coxMdGZzk7LurScp8P/AAJ4zDZduFW1awQQk3UUky5HbjaBUVGBTPa3VTS6hDJSQz0hAj/ 7jpr2mLZROQn7FP2LQxeF+nYEyn1uJB2K9oLB1HSxynXrmaJSr83/2clZ+pLsA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668175013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=ZAg32d9i/2td2oqLXP4twAnBQvJWwD8NcSLXlUrJbYg=; b=Snso0XSvIOhypHm6eejQQUk8CRZleoczwyIEvsFyEbzA9VmrArOSf7KE5UJ8Izdy89gkuy MiuJ5SHtSSSlczCA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Joerg Roedel , Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Marc Zyngier , Greg Kroah-Hartman , Jason Gunthorpe , Dave Jiang , Alex Williamson , Kevin Tian , Dan Williams , Logan Gunthorpe , Ashok Raj , Jon Mason , Allen Hubbe , "Ahmed S. Darwish" , Reinette Chatre Subject: [patch 10/20] genirq/msi: Rename msi_add_msi_desc() to msi_insert_msi_desc() References: <20221111131813.914374272@linutronix.de> MIME-Version: 1.0 Date: Fri, 11 Nov 2022 14:56:53 +0100 (CET) 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?1749208720518418032?= X-GMAIL-MSGID: =?utf-8?q?1749208720518418032?= This reflects the functionality better. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe --- 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(-) --- a/drivers/pci/msi/msi.c +++ b/drivers/pci/msi/msi.c @@ -308,7 +308,7 @@ static int msi_setup_msi_desc(struct pci 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 p 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; } --- 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(s 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; } } --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -274,7 +274,7 @@ static inline void msi_desc_set_iommu_co } #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); /** --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -100,13 +100,15 @@ static int msi_insert_desc(struct msi_de } /** - * 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;