lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200417032132.GA25293@yilunxu-OptiPlex-7050>
Date:   Fri, 17 Apr 2020 11:21:32 +0800
From:   Xu Yilun <yilun.xu@...el.com>
To:     "Wu, Hao" <hao.wu@...el.com>
Cc:     Tom Rix <trix@...hat.com>, "mdf@...nel.org" <mdf@...nel.org>,
        "linux-fpga@...r.kernel.org" <linux-fpga@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "bhu@...hat.com" <bhu@...hat.com>
Subject: Re: [PATCH 1/2] fpga: dfl: pci: reduce the scope of variable 'ret'

On Fri, Apr 17, 2020 at 11:05:16AM +0800, Wu, Hao wrote:
> > -----Original Message-----
> > From: Xu, Yilun <yilun.xu@...el.com>
> > Sent: Friday, April 17, 2020 9:56 AM
> > To: Tom Rix <trix@...hat.com>
> > Cc: Wu, Hao <hao.wu@...el.com>; mdf@...nel.org; linux-
> > fpga@...r.kernel.org; linux-kernel@...r.kernel.org; bhu@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ