mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xu Yilun <yilun.xu@intel.com>
To: "Wu, Hao" <hao.wu@intel.com>
Cc: Tom Rix <trix@redhat.com>, "mdf@kernel.org" <mdf@kernel.org>,
	"linux-fpga@vger.kernel.org" <linux-fpga@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bhu@redhat.com" <bhu@redhat.com>
Subject: Re: [PATCH 1/2] fpga: dfl: pci: reduce the scope of variable 'ret'
Date: Fri, 17 Apr 2020 11:21:32 +0800	[thread overview]
Message-ID: <20200417032132.GA25293@yilunxu-OptiPlex-7050> (raw)
In-Reply-To: <DM6PR11MB381919B83DB49F937E3EDEEA85D90@DM6PR11MB3819.namprd11.prod.outlook.com>

On Fri, Apr 17, 2020 at 11:05:16AM +0800, Wu, Hao wrote:
> > -----Original Message-----
> > From: Xu, Yilun <yilun.xu@intel.com>
> > Sent: Friday, April 17, 2020 9:56 AM
> > To: Tom Rix <trix@redhat.com>
> > Cc: Wu, Hao <hao.wu@intel.com>; mdf@kernel.org; linux-
> > fpga@vger.kernel.org; linux-kernel@vger.kernel.org; bhu@redhat.com
> > Subject: Re: [PATCH 1/2] fpga: dfl: pci: reduce the scope of variable 'ret'
> >
> > Hi Rix:
> >
> > This patch is based on linux-next. There is an preceding patch
> > (3c2760b78f90 "fpga: dfl: pci: fix return value of cci_pci_sriov_configure",
> > Also see Fixes:) in linux-next but not merged in 5.7-rc1 yet.
> > This patch is to fix the lkp warning brought by the previous one.
> 
> Yilun
> 
> Is it possible that commit id may be different for master then?

It is possible if the previous patch need a little change when merging
to master.

I'm not sure how to handle this then. But the previous patch is simple
and is unlikely to change.

> 
> Thanks
> Hao
> 
> >
> > Thanks.
> >
> > On Thu, Apr 16, 2020 at 09:56:47AM -0700, Tom Rix wrote:
> > > Please check the scope.
> > >
> > > On linus/master, the result of this change looks like
> > >
> > > static int cci_pci_sriov_configure(struct pci_dev *pcidev, int num_vfs)
> > > {
> > >     struct cci_drvdata *drvdata = pci_get_drvdata(pcidev);
> > >     struct dfl_fpga_cdev *cdev = drvdata->cdev;
> > >
> > >     if (!num_vfs) {
> > >         /*
> > >          * disable SRIOV and then put released ports back to default
> > >          * PF access mode.
> > >          */
> > >         pci_disable_sriov(pcidev);
> > >
> > >         dfl_fpga_cdev_config_ports_pf(cdev);
> > >
> > >     } else {
> > >         int ret; <--- defined here
> > >
> > >         /*
> > >          * before enable SRIOV, put released ports into VF access mode
> > >          * first of all.
> > >          */
> > >         ret = dfl_fpga_cdev_config_ports_vf(cdev, num_vfs);
> > >         if (ret)
> > >             return ret;
> > >
> > >         ret = pci_enable_sriov(pcidev, num_vfs);
> > >         if (ret)
> > >             dfl_fpga_cdev_config_ports_pf(cdev);
> > >     }
> > >
> > >     return ret;  <---- not in scope, not defined here
> > > }
> > >
> > > Tom

  reply	other threads:[~2020-04-17  3:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16  3:11 [PATCH 0/2] Bug fixes for FPGA DFL Xu Yilun
2020-04-16  3:11 ` [PATCH 1/2] fpga: dfl: pci: reduce the scope of variable 'ret' Xu Yilun
2020-04-16  8:04   ` Wu, Hao
2020-04-16 16:56     ` Tom Rix
2020-04-17  1:56       ` Xu Yilun
2020-04-17  3:05         ` Wu, Hao
2020-04-17  3:21           ` Xu Yilun [this message]
2020-04-17  5:55             ` Wu, Hao
2020-04-16  3:11 ` [PATCH 2/2] fpga: dfl: fix bug in port reset handshake Xu Yilun
2020-04-16  8:06   ` Wu, Hao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200417032132.GA25293@yilunxu-OptiPlex-7050 \
    --to=yilun.xu@intel.com \
    --cc=bhu@redhat.com \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®