Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5006529pxb; Mon, 15 Feb 2021 07:11:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFSFKTjUt10k6bb/ykPEh7ppuJ2ifSLpq8jdUVGcmI6n2B7a9rMSKaVQPV9ki6pBDlkBGW X-Received: by 2002:a17:906:685a:: with SMTP id a26mr6807816ejs.503.1613401864392; Mon, 15 Feb 2021 07:11:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613401864; cv=none; d=google.com; s=arc-20160816; b=Vp5k/1zEBD+HDk8p/YuKuSwIgYzlYl0zIBJGQgQ1ilY99nDUX7lDb/hInKCwHmvsqH tjlwMrFlTgaZhwQe7U1cynW+bKu0rwF2tRqziVjCBVauLG73LCNDBWDYpq+MwwsUmMCo LYQ/0qvMMlNh+I1/38xCQpCrv0/M+kYWFJTBFb3Bn/Q+tHyQL3mDE7JRgdAbdFsZ19DR GgOh44qmb6JCII5EUIGO6uXyA2OuNgoUhRIDyiV0vPMMHcuN0kIJd8hdfaByb3WXKsI4 AH/HYKw7ObBqm5Uq7bc77OoBGg1qmSorR94l3d7vvdwDc/cLmJjJc9SEqC7FO7UJcdRn VHTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=TC76k1Y6MEUMK5bwvqZnuZ4cNnJ6i3Vn0Cs2byfJ32g=; b=ZZzegJscHMZlUl25OtizXYRLERZXXfbOhzvkJMsCmehPsBg2lNfunuIk5umwJYNEit HfbnJRTQwI3HgtlpK9oxlHyuwPOUSZcOIGDE1i+L1xrdGSukjC3W7qemGAshB1w/+T8N +uYr3pdvZwBBtPWhAxgabOIEkNhmfgZa8t4D1/ASf41Twp+/t4C1fRf42q0jlHOz1wsG fQHyxn8/DQGE4CAZ0CZUe2UoTg9JUL6Wvq1F7Swgd5LkYPZqHeKzOJDzDiqGajJpfiko AQVdsh3JmsO4FEw80ksqIrTOUSIQCGCUG3g6K/vFzusbtjvVlpm7MgzvlNO5i7hCjPSC +eZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j6DeoGWA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si11648904eje.331.2021.02.15.07.10.31; Mon, 15 Feb 2021 07:11:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j6DeoGWA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230425AbhBOPJf (ORCPT + 99 others); Mon, 15 Feb 2021 10:09:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230245AbhBOO5V (ORCPT ); Mon, 15 Feb 2021 09:57:21 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6742EC061574; Mon, 15 Feb 2021 06:56:05 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id t11so4338623pgu.8; Mon, 15 Feb 2021 06:56:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TC76k1Y6MEUMK5bwvqZnuZ4cNnJ6i3Vn0Cs2byfJ32g=; b=j6DeoGWARdpxArhNU0TsAnh8ZO1FyY4F3L8CA5ZLX5E2YTmMTCl+nduZBB/20quxel ogChmfFYU6Z/L+4U5WxhGnOTmTIFi4jX6JrThPMmhCzzgcbdwCokAUioqVFbC+Hxi7tg cra9whC14u/kPo7P80dbNs5frpyTGeNrkkPY4iCINCzRfEiIe88zUcu4H29N4n0BiSda tgymyKZ2UV93Qgx8L0BwdjX9CE7soahwKI/f7kAs6vqLtgbdDjMV3vB4fpovwtbtW9VL GIbg0fEKDnZQcl5wferHr9NtkSo0hEJcsbMnCKG3+w3/dE6VjucSpETZOqz3mzjy7TFk ubcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TC76k1Y6MEUMK5bwvqZnuZ4cNnJ6i3Vn0Cs2byfJ32g=; b=QN6TO5P0N69iE9/TMjMrx0bmG33rxnmubPwQIky4EyzQ1kT73MaH3a8IdjZp8Qsr+w s0uXD5N0lVXscS6xgtNpDIc2H0ZQPo71vrAUOkTf006oM2vc3psRvcdENofUiaOtydIt r++9vNLvacCJ65WvC/I9HoJA+Xo9gKLGMlDMr/9zHBu7NdUJkkue5bUH7an6lszdsCrd qK+8cLCXyyWTBlrgxd70GkpPIxGgaFn7PKfeCnQvilsoAXMYF2JPb6hJfbOyTf6AhfAB Y1dv1OLGCvq7UesyML0YEx3DcPswkMSGHqPSKXMwUC+XJ010WWgToiH2y6tu9TZhTYl6 5nZg== X-Gm-Message-State: AOAM532SLsJAGdyJcRPUxnunKQedD3Vzo/EuC/rMwJykryQ7HmooMolU 65rCZIOHKP/k7VG3Y5rHZfqdJVluscH8A4lpyNLNPOhu+1pPEQ== X-Received: by 2002:a63:3d0:: with SMTP id 199mr15238146pgd.4.1613400964989; Mon, 15 Feb 2021 06:56:04 -0800 (PST) MIME-Version: 1.0 References: <20210214145746.602770-1-zhengdejin5@gmail.com> <10fa1c64-6a7d-e995-f292-20dc6ce5ed62@siemens.com> In-Reply-To: <10fa1c64-6a7d-e995-f292-20dc6ce5ed62@siemens.com> From: Andy Shevchenko Date: Mon, 15 Feb 2021 16:55:48 +0200 Message-ID: Subject: Re: [PATCH] spi: pca2xx-pci: Fix an issue about missing call to 'pci_free_irq_vectors()' To: Jan Kiszka Cc: Andy Shevchenko , Dejin Zheng , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown , Jarkko Nikula , linux-spi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 15, 2021 at 3:52 PM Jan Kiszka wrote: > On 15.02.21 14:22, Andy Shevchenko wrote: > > On Sun, Feb 14, 2021 at 10:57:46PM +0800, Dejin Zheng wrote: > >> Call to 'pci_free_irq_vectors()' are missing both in the error handling > >> path of the probe function, and in the remove function. So add them. > > > > I'm wondering if you noticed that it's done by pcim_* API. > > Perhaps you can introduce pcim_alloc_irq_vectors() or so and do not add these > > calls at all? > > You mean as plain wrapper for pci_alloc_irq_vectors, just to document > it's managed? Last time we discussed that with Christoph Hellwig he was on the side that naming is problematic. So he insisted that it's pure luck that it works like this. And IIUC his point, we need to create an explicit managed version of pci_alloc_irq_vectorrs() that the caller will have clear understanding what it does. > >> Fixes: 64e02cb0bdfc7c ("spi: pca2xx-pci: Allow MSI") > > > > No, it doesn't fix anything. > > Ah, now I recall: imbalanced APIs. -- With Best Regards, Andy Shevchenko