Re: [PATCH 9/21] MSI: Expand pci_msi_supported()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michael Ellerman
Date: Tuesday, March 27, 2007 - 10:01 pm

On Tue, 2007-03-27 at 22:45 -0600, Eric W. Biederman wrote:

I don't think it's that confusing. I agree it was a bit weird that
previously it was explicitly checking for < 0, so I fixed that.


There aren't any useful return values as it's currently written, but
there code be. And I'd like to keep that possibility.

My next patch allows the arch routine to propagate its return value out
to the caller, which is useful.

And I don't think making it return 0/1 makes it any clearer. As it is
now it's just:

If MSI is supported we return 0.
If MSI is not supported we return some error code which is !=3D 0.

The caller just does:

if (pci_msi_supported(blah ..))
	error;

Which is exactly the same whether it's 0/1 or 0/<error code>. And we
have the option of returning a useful return value.

cheers

--=20
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 9/21] MSI: Expand pci_msi_supported(), Eric W. Biederman, (Tue Mar 27, 9:45 pm)
Re: [PATCH 9/21] MSI: Expand pci_msi_supported(), Michael Ellerman, (Tue Mar 27, 10:01 pm)
Re: [PATCH 9/21] MSI: Expand pci_msi_supported(), Eric W. Biederman, (Tue Mar 27, 10:20 pm)
Re: [PATCH 9/21] MSI: Expand pci_msi_supported(), Eric W. Biederman, (Tue Mar 27, 10:30 pm)
Re: [PATCH 9/21] MSI: Expand pci_msi_supported(), Michael Ellerman, (Tue Mar 27, 10:39 pm)