LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: ruscur@russell.cc, benh@kernel.crashing.org, paulus@samba.org,
	mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Cc: hch@infradead.org
Subject: qustion about eeh_add_virt_device
Date: Sun, 13 Aug 2017 16:54:37 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1708131648480.13565@hadrien> (raw)

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

             reply	other threads:[~2017-08-13 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-13 14:54 Julia Lawall [this message]
2017-08-22  5:44 ` qustion about eeh_add_virt_device Russell Currey

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=alpine.DEB.2.20.1708131648480.13565@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=benh@kernel.crashing.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=ruscur@russell.cc \
    /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