Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: ngn <ngn@ngn.tf>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Nam Cao <namcao@linutronix.de>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] PCI: shpchp: Remove hpc_ops
Date: Thu, 1 Aug 2024 19:08:52 -0500	[thread overview]
Message-ID: <20240802000852.GA129961@bhelgaas> (raw)
In-Reply-To: <Zp-XXVW4hlcMASEc@archbtw>

On Tue, Jul 23, 2024 at 02:43:25PM +0300, ngn wrote:
> Remove the hpc_ops struct from shpchp. This struct is unnecessary as
> no other hotplug controller implements it. A similar thing has already
> been done in pciehp with commit 82a9e79ef132 ("PCI: pciehp: remove hpc_ops")

> +++ b/drivers/pci/hotplug/shpchp_hpc.c
> @@ -167,7 +167,6 @@
>  
>  static irqreturn_t shpc_isr(int irq, void *dev_id);
>  static void start_int_poll_timer(struct controller *ctrl, int sec);
> -static int hpc_check_cmd_status(struct controller *ctrl);
>  
>  static inline u8 shpc_readb(struct controller *ctrl, int reg)
>  {
> @@ -317,7 +316,7 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd)
>  	if (retval)
>  		goto out;
>  
> -	cmd_status = hpc_check_cmd_status(slot->ctrl);
> +	cmd_status = shpchp_check_cmd_status(slot->ctrl);

This rename looks like it should be a separate patch because it's not
part of removing hpc_ops.

>  	if (cmd_status) {
>  		ctrl_err(ctrl, "Failed to issued command 0x%x (error code = %d)\n",
>  			 cmd, cmd_status);
> @@ -328,7 +327,7 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd)
>  	return retval;
>  }
>  
> -static int hpc_check_cmd_status(struct controller *ctrl)
> +int shpchp_check_cmd_status(struct controller *ctrl)
>  {
>  	int retval = 0;
>  	u16 cmd_status = shpc_readw(ctrl, CMD_STATUS) & 0x000F;

  reply	other threads:[~2024-08-02  0:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 11:43 [PATCH v3] PCI: shpchp: Remove hpc_ops ngn
2024-08-02  0:08 ` Bjorn Helgaas [this message]
2024-08-02 13:06   ` ngn
2024-08-02 16:41     ` Bjorn Helgaas

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=20240802000852.GA129961@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=namcao@linutronix.de \
    --cc=ngn@ngn.tf \
    /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