Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2482134pxj; Sun, 13 Jun 2021 22:46:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhTR14FPlW350MFIUtDl0d+YSW55A/kHjZ0i95VcP8ZqBO+7mBBlo8K3/wpK3RRfx6z0Zu X-Received: by 2002:a17:906:d20b:: with SMTP id w11mr13028145ejz.242.1623649613946; Sun, 13 Jun 2021 22:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623649613; cv=none; d=google.com; s=arc-20160816; b=vrVz12udhrBglGKFt5JuzbPfqBfPeRrBOflQVn3rXledUoeUSBe/LZLGOBGPu2GtNW HFP95p3TcDDIIBJcgQWwNeuP0xJDOiR4l0xDNTMmmSg9kcCielYCx1QMYUlAav5TtRig DtGdwHYD+kOnkzKfwG9vzgXNR2SXJ843F2+ywn4T1fgjZUASOv2EsmQo1RrwVcLa2ws2 SoG2SyMVarZi8iRBxRJS2SKTs82FiGtrBEIrVWiInUGSen0MzraZxiqTN3YRb+bRU6in 3tr32AiUIy8X1rcjT57dkIfRAdsq8YKyMjhx0YKPo0sPWKp0SaYzBnCVGH/b49Fx2uzr uHEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=D2vwkZHeV1Mmvx+DKepIzag2hqp+Ued0hIaFPq9qKG4=; b=N+RmrnkZjOsJDorAIaQhPj6on+QLnu6MW6jU/BaDUO8y0ebKLoGxls5v5DXtWViZou y3EGt1uGmH4KCaTliNZNTcpQcieAN5FVT2GzT6zbs9KB+6CTu+wg9L0ryMY8D/cvTzHh FdnGobc+n0YHijkynpSLBsDtM+XQuXyAk4tvJDlycYq8FUh6HoHIYkXmEMXvkLCnD6aw nxrTxRvxXoNwI1SdRGjeC/gdTiqR1ttU48O/05o87VLksYZE3sMdJu0ujedz9LTnz0hX J4T1l5lSWilv2JVzfOqN4HuzoOP5Qfe8uIJ3s1yDk2uEaTFlEB3bKzisUgVOgUoEbHUH dp2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="Yakg1J/s"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r2si11126546ejp.248.2021.06.13.22.46.16; Sun, 13 Jun 2021 22:46:53 -0700 (PDT) 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=@infradead.org header.s=casper.20170209 header.b="Yakg1J/s"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231949AbhFNFmy (ORCPT + 99 others); Mon, 14 Jun 2021 01:42:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbhFNFmx (ORCPT ); Mon, 14 Jun 2021 01:42:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8CF1C061574; Sun, 13 Jun 2021 22:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=D2vwkZHeV1Mmvx+DKepIzag2hqp+Ued0hIaFPq9qKG4=; b=Yakg1J/sCs5ZVsvqSqoWCnxyPW ZgFm98pIUEZic5lMz9vZwQkr2beKbrKlZNbvLc1oAP8jtrevc6WW0aZgzqRUFAre4gC6+WcmS+qW+ V8ZJSl7maD7jHPiSaUVL+6gCroHSIY8NEfKrLiZ7m7WgIHHaFBFXClZroAzTmiGhsZOoQxmtCjUHC TJdi+j5BnV8tOcpfK1IUbBePLJCkBm0wzUMX1IYjvMdzpzL5NpTLY+Dnq6WW/YtCcCYC816X8SZNV HBBCgHutXpsie256AFhMna/UU25je4laURKmv8zCEdQQpxLWXlJ6tl4iNANsmFZvcZ85HAAyRZJc4 ujSrgwiw==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lsfKe-0053jJ-Ml; Mon, 14 Jun 2021 05:40:24 +0000 Date: Mon, 14 Jun 2021 06:40:20 +0100 From: Christoph Hellwig To: Max Gurtovoy Cc: Alex Williamson , Jason Gunthorpe , cohuck@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, aviadye@nvidia.com, oren@nvidia.com, shahafs@nvidia.com, parav@nvidia.com, artemp@nvidia.com, kwankhede@nvidia.com, ACurrid@nvidia.com, cjia@nvidia.com, yishaih@nvidia.com, kevin.tian@intel.com, hch@infradead.org, targupta@nvidia.com, shameerali.kolothum.thodi@huawei.com, liulongfang@huawei.com, yan.y.zhao@intel.com Subject: Re: [PATCH 09/11] PCI: add matching checks for driver_override binding Message-ID: References: <20210603160809.15845-1-mgurtovoy@nvidia.com> <20210603160809.15845-10-mgurtovoy@nvidia.com> <20210608152643.2d3400c1.alex.williamson@redhat.com> <20210608224517.GQ1002214@nvidia.com> <20210608192711.4956cda2.alex.williamson@redhat.com> <117a5e68-d16e-c146-6d37-fcbfe49cb4f8@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <117a5e68-d16e-c146-6d37-fcbfe49cb4f8@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 13, 2021 at 11:19:46AM +0300, Max Gurtovoy wrote: > what about the following code ? > > @@ -152,12 +152,28 @@ static const struct pci_device_id > *pci_match_device(struct pci_driver *drv, > ?????????????? } > ?????????????? spin_unlock(&drv->dynids.lock); > > -???????????? if (!found_id) > -???????????????????????????? found_id = pci_match_id(drv->id_table, dev); > +???????????? if (found_id) > +???????????????????????????? return found_id; Something is broken in your mailer because this does not look like code at all.