From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5605CA0ECD for ; Mon, 11 Sep 2023 21:58:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354621AbjIKVyl (ORCPT ); Mon, 11 Sep 2023 17:54:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237292AbjIKM2K (ORCPT ); Mon, 11 Sep 2023 08:28:10 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33810CEB for ; Mon, 11 Sep 2023 05:28:05 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-41517088479so6616191cf.1 for ; Mon, 11 Sep 2023 05:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1694435284; x=1695040084; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=zn0VPuMCaZZ/Sf/x4SYpp1ksKQN06bPb7JpCjgEI2sE=; b=B05FJTJUZo5uh7ARxi2MN21gm18GqcbV2vFpeMM+EIaf7tjg8rJW0s7PQ7/2mVxA1T ELzKGDeDQ5xd+1Mumw0N/APzXyy78EkvlbARtR6Xr4P8xeyDjgSP6I9aXrcNYQdi/+Q8 Ohg4rUkQ79eva4bNcwZxphmqeczHPlc66aVjgDe1t/2MCFnC3p1eDyHHRHOC73NJAXHA dTu2ZT78jOjBa0i3s8MxS450KFKqMur8nfrAFwWMnGSmhDmkF5JL7EwzenP48zpmOrlj bQvb0BLfFgSUZW2MjsQQteMN/DAQKyr3v6O2mlD4k1nX8Vbr6435Eq2eRf4XDpTIySXG KiiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694435284; x=1695040084; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zn0VPuMCaZZ/Sf/x4SYpp1ksKQN06bPb7JpCjgEI2sE=; b=ZHSdFpH1S3gc1tidDSwPsm5+Np8On0jkiMnp2XXbFTtjBjisL9GU1mZrIYI6phtw18 KJSQe3lhs1kK6dpYJsMW9vRmXUn4uw7K9kOTao5k53rgWY1MaavGC5LG7eRGAE9ce89t herf1yT22Ix1BPNbQp3oDvxuy5KQQXf24wwuKWVHZ2tFhLkoogzpRoMXZEvVQjogLNZu jpEq7y7ypUDuOBJCCGJj+E6qeMiXnKuldR9UO4jtfm48JVlEudf2gG0yXLGI0/Rl+mA5 S/YWFeBBktmxfJEOESdO9y0tslJzrdk9fG49dINex0BcrtR1C3J//wBC/A8ru/LjCiYA k1Xw== X-Gm-Message-State: AOJu0Yyk9V4vjmVTjTC2eX3PFf08Qd56WrUjA9Ca4VVRcIlbI5+12ABH UHvQTv9lRuD9S73fX9Ik1LzoYA== X-Google-Smtp-Source: AGHT+IEuiBqhh8flWvXQjI9qVYyi7SQ+iMh9AbQCI6PHKvz8gvU9yEMKJFwQ3Xcbwzjo+nZxgEPrMw== X-Received: by 2002:a05:622a:2c42:b0:410:92ca:3dcd with SMTP id kl2-20020a05622a2c4200b0041092ca3dcdmr11567113qtb.9.1694435284073; Mon, 11 Sep 2023 05:28:04 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-134-41-202-196.dhcp-dynamic.fibreop.ns.bellaliant.net. [134.41.202.196]) by smtp.gmail.com with ESMTPSA id ih10-20020a05622a6a8a00b0041072408126sm2559963qtb.5.2023.09.11.05.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 05:28:03 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1qfg1K-001XgC-L8; Mon, 11 Sep 2023 09:28:02 -0300 Date: Mon, 11 Sep 2023 09:28:02 -0300 From: Jason Gunthorpe To: "Tian, Kevin" Cc: oushixiong , Yishai Hadas , Shameer Kolothum , Brett Creeley , Alex Williamson , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] vfio/pds: Using pci_physfn() to fix a compilation issue Message-ID: References: <20230911080828.635184-1-oushixiong@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 11, 2023 at 08:25:18AM +0000, Tian, Kevin wrote: > > From: oushixiong > > Sent: Monday, September 11, 2023 4:08 PM > > > > From: Shixiong Ou > > > > If PCI_ATS isn't set, then pdev->physfn is not defined. > > it causes a compilation issue: > > > > ../drivers/vfio/pci/pds/vfio_dev.c:165:30: error: ‘struct pci_dev’ has no > > member named ‘physfn’; did you mean ‘is_physfn’? > > 165 | __func__, pci_dev_id(pdev->physfn), pci_id, vf_id, > > | ^~~~~~ > > > > So using pci_physfn() rather than using pdev->physfn directly. > > > > Signed-off-by: Shixiong Ou > > Reviewed-by: Kevin Tian Yes, we should do both patches Reviewed-by: Jason Gunthorpe Jason