From patchwork Fri Nov 11 13:54:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 18750 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp752515wru; Fri, 11 Nov 2022 05:56:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf52WaPfzjtS0OAYxD67Uf23P0C4XQ71fcPXAvl8qFEwN8ZnMAvtl9mQkMAFov51MxoH7AC9 X-Received: by 2002:a17:906:1613:b0:7a2:fa90:924 with SMTP id m19-20020a170906161300b007a2fa900924mr1885480ejd.674.1668174973282; Fri, 11 Nov 2022 05:56:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668174973; cv=none; d=google.com; s=arc-20160816; b=g69ubUtGBdJrfud3Or3nOsaQSwh7Ou2muY6hyxLjtny+CgAI//fPrpgwNmkkv36Q1K 6Mj4mpDze3Or5AD1brXPq0Ta7jlJpBzGea7Cfl4DlRh09H12FLUaCFFRuAEyHF3JbTTd MuUUXMbXB/vS2NdnZDKaU3pfcxy5+fApzTyjxamMkXwhszaVrQHYMrnQHr4XpE81P/D/ L23otOZ27quQjcWRlEBSTzKbOOAatda4CZmp2fxSAXyYGa/XmGfW7cvsQwmSLZx+bv32 0h2DiD3y6e/LGy/BlO6ma3XK9WGC9YSchVsG0MHFtR3TW2RFZj7Sw/ttVT+ojwQuRitY J4gQ== 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=hXGyAAuT/IU9qjkYv54P57CF8Kg9D2gsGu3taE3+4kw=; b=rtHXZ2Ct1ATFNH3Jk8dQrCdF1L/Jj03U+9nqaplf3qywU8sWPVao+qvKQQUJWHf4OV Q2DF+ABSU2QtDmUg6xKX5y//1wROf2AmeTqSpgUUaWpSWlPTUmmMGAhAgY5LIOrtDKvN FLGUHy6089/ywYv+idpC70SQW7u6E4fYYmfivnhvtABguTqRPGqT6VELExHKjNVwhnny 4MFU//K9ouFzCTIPGGbs/s/VEmaeidOOJzlcL2Bx2CMif5Pj8nRblZVrv50lWgAhj8xC 4vWo3VcL40pirI+vSZ3J9v3n3dTxoGJmGIOuiB4Ingpio7PSTqPi7c9KM3LrtVCnuO+2 8pQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Q+w7rfhi; 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 qb24-20020a1709077e9800b0078db5170767si2397297ejc.18.2022.11.11.05.55.49; Fri, 11 Nov 2022 05:56:13 -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=Q+w7rfhi; 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 S233552AbiKKNyl (ORCPT + 99 others); Fri, 11 Nov 2022 08:54:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233483AbiKKNyX (ORCPT ); Fri, 11 Nov 2022 08:54:23 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 849DD6B380; Fri, 11 Nov 2022 05:54:22 -0800 (PST) Message-ID: <20221111122013.831151822@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668174861; 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=hXGyAAuT/IU9qjkYv54P57CF8Kg9D2gsGu3taE3+4kw=; b=Q+w7rfhi1CD/id8ozBrg2Q21W5nVKor55fq9WBt8lCSQOVHcaMdncE2KL8ROw5Fn3DJ9Wy C6Gq/MFoG/TdPdL4180NCcfok/4hREfFzaUBJ2BmjZ4CE+WN7WxTwWtSOLaJ3+LD9kYY1j TeMFKUGxFAbHhfzCAwnA3C119hea+KSW+lcpY1H4pdCjjM97PrlqTIGom3CT1l9I0ocFXD G10ovxb7yJ25ZsdRupfmuMU0Sra+dE3GF4bYWQ/7cPGDS+UTUyJkHMxazfENu7wjY2KpoV n9hEYT+9jQQ5Lr1oLQSUrUgQfs9mO1k5gyzHqyjF8kOdb1h0q7MIXG+o1lSBMA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668174861; 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=hXGyAAuT/IU9qjkYv54P57CF8Kg9D2gsGu3taE3+4kw=; b=cdP8Z8xVU6B5EEH8jHzk7TfeiPxnZMmWed+TgxJS3tdmgdVHc4X28EdbDT2icsz8tJCHaq CTp0kZmpTRg7YJAA== 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 , Michael Ellerman , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, "Ahmed S. Darwish" , Reinette Chatre Subject: [patch 04/39] genirq/msi: Use MSI_DESC_ALL in msi_add_simple_msi_descs() References: <20221111120501.026511281@linutronix.de> MIME-Version: 1.0 Date: Fri, 11 Nov 2022 14:54:20 +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?1749208240541448530?= X-GMAIL-MSGID: =?utf-8?q?1749208240541448530?= There are no associated MSI descriptors in the requested range when the MSI descriptor allocation fails. Use MSI_DESC_ALL as the filter which prepares the next step to get rid of the filter for freeing. Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Jason Gunthorpe --- kernel/irq/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -120,7 +120,7 @@ static int msi_add_simple_msi_descs(stru fail_mem: ret = -ENOMEM; fail: - msi_free_msi_descs_range(dev, MSI_DESC_NOTASSOCIATED, index, last); + msi_free_msi_descs_range(dev, MSI_DESC_ALL, index, last); return ret; }