mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pci: consolidate typing of pci_error_handlers::error_detected()
Date: Tue, 30 Jun 2020 01:11:09 +0200	[thread overview]
Message-ID: <20200629231109.n7lrmrtn2cj75sb6@ltop.local> (raw)
In-Reply-To: <20200629212928.GA3296753@bjorn-Precision-5520>

On Mon, Jun 29, 2020 at 04:29:28PM -0500, Bjorn Helgaas wrote:
> On Sun, Jun 28, 2020 at 06:12:33PM +0200, Luc Van Oostenryck wrote:
> > The method struct pci_error_handlers::error_detected() is defined and
> > documented as taking an 'enum pci_channel_state' for the second
> > argument but most drivers use 'pci_channel_state_t' instead.
> > This 'pci_channel_state_t' is not a typedef for the enum but a typedef
> > for a bitwise type in order to have better/stricter typechecking.
> > 
> > So, consolidate everything by using the restricted type in the
> > method's definition, in the documentation and in the drivers not
> > using 'pci_channel_state_t'.
> 
>   $ git grep "\<pci_channel_state\>"
>   Documentation/PCI/pci-error-recovery.rst:	enum pci_channel_state {
>   Documentation/PCI/pci-error-recovery.rst:pci_channel_state value of pci_channel_io_perm_failure.
>   arch/powerpc/kernel/eeh_driver.c:static void eeh_set_channel_state(struct eeh_pe *root, enum pci_channel_state s)
>   drivers/net/ethernet/intel/ice/ice_main.c:ice_pci_err_detected(struct pci_dev *pdev, enum pci_channel_state err)
>   drivers/pci/pci.h:			enum pci_channel_state state,
>   drivers/pci/pcie/err.c:				 enum pci_channel_state state,
>   drivers/pci/pcie/err.c:			enum pci_channel_state state,
> 
> Should these be changed as well?  If not, why not?  Some of them look
> analogous to the ones changed below.

Oh yes, surely. This is in fact a resend of an old patch (Dec 2018)
and it seems that these are more recent. I'll check, update and send
a new version.

-- Luc

      reply	other threads:[~2020-06-29 23:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 16:12 Luc Van Oostenryck
2020-06-29 21:29 ` Bjorn Helgaas
2020-06-29 23:11   ` Luc Van Oostenryck [this message]

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=20200629231109.n7lrmrtn2cj75sb6@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®