* qustion about eeh_add_virt_device
@ 2017-08-13 14:54 Julia Lawall
2017-08-22 5:44 ` Russell Currey
0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2017-08-13 14:54 UTC (permalink / raw)
To: ruscur, benh, paulus, mpe, linuxppc-dev, linux-kernel; +Cc: hch
Hello,
At the suggestion of Christoph Hellwig, I am working on inlining the
functions stored in the err_handler field of a pci_driver structure into
the pci_driver structure itself. A number of functions in the file
arch/powerpc/kernel/eeh_driver.c have code like:
if (!driver->err_handler ||
!driver->err_handler->error_detected) {
eeh_pcid_put(dev);
return NULL;
}
This I would just convert to:
if (!driver->error_detected) {
eeh_pcid_put(dev);
return NULL;
}
But I am not sure what is best to do about eeh_add_virt_device, which
contains:
if (driver->err_handler)
return NULL;
Should I try to find a subfield of the err_handler that is guaranteed to
be there if anything is there? Or could the test just be dropped, leaving
a direct return NULL?
thanks,
julia
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: qustion about eeh_add_virt_device
2017-08-13 14:54 qustion about eeh_add_virt_device Julia Lawall
@ 2017-08-22 5:44 ` Russell Currey
0 siblings, 0 replies; 2+ messages in thread
From: Russell Currey @ 2017-08-22 5:44 UTC (permalink / raw)
To: Julia Lawall, benh, paulus, mpe, linuxppc-dev, linux-kernel; +Cc: hch
On Sun, 2017-08-13 at 16:54 +0200, Julia Lawall wrote:
> Hello,
Hello, sorry for the delayed response.
>
> At the suggestion of Christoph Hellwig, I am working on inlining the
> functions stored in the err_handler field of a pci_driver structure into
> the pci_driver structure itself. A number of functions in the file
> arch/powerpc/kernel/eeh_driver.c have code like:
>
> if (!driver->err_handler ||
> !driver->err_handler->error_detected) {
> eeh_pcid_put(dev);
> return NULL;
> }
>
> This I would just convert to:
>
> if (!driver->error_detected) {
> eeh_pcid_put(dev);
> return NULL;
> }
>
> But I am not sure what is best to do about eeh_add_virt_device, which
> contains:
>
> if (driver->err_handler)
> return NULL;
>
> Should I try to find a subfield of the err_handler that is guaranteed to
> be there if anything is there? Or could the test just be dropped, leaving
> a direct return NULL?
I believe the test can be dropped.
- Russell
>
> thanks,
> julia
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-22 5:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-13 14:54 qustion about eeh_add_virt_device Julia Lawall
2017-08-22 5:44 ` Russell Currey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).