[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4829012be7988318dcfe406a79cc5e35@mail.gmail.com>
Date: Fri, 12 Oct 2018 11:17:19 +0530
From: Sreekanth Reddy <sreekanth.reddy@...adcom.com>
To: Suganath Prabu Subramani <suganath-prabu.subramani@...adcom.com>,
helgaas@...nel.org
Cc: lukas@...ner.de, linux-scsi@...r.kernel.org,
linux-pci@...r.kernel.org,
Andy Shevchenko <andy.shevchenko@...il.com>,
Sathya Prakash Veerichetty <sathya.prakash@...adcom.com>,
linux-kernel@...r.kernel.org, benh@...nel.crashing.org,
ruscur@...sell.cc, sbobroff@...ux.ibm.com,
Oliver <oohall@...il.com>
Subject: RE: [PATCH v4 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available
HI Bjorn,
Please provide your valuable suggestion/reply here.
Thank you,
Sreekanth
-----Original Message-----
From: Suganath Prabu Subramani
[mailto:suganath-prabu.subramani@...adcom.com]
Sent: Monday, October 8, 2018 12:15 PM
To: helgaas@...nel.org
Cc: lukas@...ner.de; linux-scsi@...r.kernel.org; linux-pci@...r.kernel.org;
Andy Shevchenko; Sathya Prakash; Sreekanth Reddy;
linux-kernel@...r.kernel.org; benh@...nel.crashing.org; ruscur@...sell.cc;
sbobroff@...ux.ibm.com; Oliver
Subject: Re: [PATCH v4 1/6] mpt3sas: Introduce
mpt3sas_base_pci_device_is_available
On Tue, Oct 2, 2018 at 7:34 PM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> On Mon, Oct 01, 2018 at 03:40:51PM -0500, Bjorn Helgaas wrote:
> > I think the names "pci_device_is_present()" and
> > "mpt3sas_base_pci_device_is_available()" contribute to the problem
> > because they make promises that can't be kept -- all we can say is
> > that the device *was* present, but we know whether it is *still*
> > present.
Bjorn,
In the patch we are using '!' (i.e. not operation) of
pci_device_is_present(),
which is logically same as pci_device_is absent, and it is
same for mpt3sas_base_pci_device_is_available().
My understanding is that, you want us to rename these functions for
better readability
Is that correct ?
> Oops, I meant "we DON'T know whether it is still present."
>
> > I think it would be better if the interfaces were something
> > like "pci_device_is_absent()" because that gives a result we can rely
> > on. If that returns true, we know the device is definitely gone.
> >
> > Bjorn
Powered by blists - more mailing lists