public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: zhaoxiao <zhaoxiao@uniontech.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb:mux:intel_pmc_mux: Use the helper acpi_dev_get_memory_resources()
Date: Wed, 31 Aug 2022 11:21:59 +0300	[thread overview]
Message-ID: <Yw8aJ8QC1BtBNBfx@kuha.fi.intel.com> (raw)
In-Reply-To: <20220831061126.25172-1-zhaoxiao@uniontech.com>

On Wed, Aug 31, 2022 at 02:11:26PM +0800, zhaoxiao wrote:
> It removes the need to check the resource data type separately.
> 
> Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>

Was this patch generated by yet another bot?

If that's the case, then I would appreciated that you clearly state
that here somehow, just like the other projects.

thanks,

> ---
>  drivers/usb/typec/mux/intel_pmc_mux.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c
> index 47b733f78fb0..6207c8f54240 100644
> --- a/drivers/usb/typec/mux/intel_pmc_mux.c
> +++ b/drivers/usb/typec/mux/intel_pmc_mux.c
> @@ -569,13 +569,6 @@ static int pmc_usb_register_port(struct pmc_usb *pmc, int index,
>  	return ret;
>  }
>  
> -static int is_memory(struct acpi_resource *res, void *data)
> -{
> -	struct resource r;
> -
> -	return !acpi_dev_resource_memory(res, &r);
> -}
> -
>  /* IOM ACPI IDs and IOM_PORT_STATUS_OFFSET */
>  static const struct acpi_device_id iom_acpi_ids[] = {
>  	/* TigerLake */
> @@ -606,7 +599,7 @@ static int pmc_usb_probe_iom(struct pmc_usb *pmc)
>  		return -ENODEV;
>  
>  	INIT_LIST_HEAD(&resource_list);
> -	ret = acpi_dev_get_resources(adev, &resource_list, is_memory, NULL);
> +	ret = acpi_dev_get_memory_resources(adev, &resource_list);
>  	if (ret < 0)
>  		return ret;
>  
> -- 
> 2.20.1

-- 
heikki

  reply	other threads:[~2022-08-31  8:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31  6:11 [PATCH] usb:mux:intel_pmc_mux: Use the helper acpi_dev_get_memory_resources() zhaoxiao
2022-08-31  8:21 ` Heikki Krogerus [this message]
2022-08-31  8:33   ` Greg KH
     [not found]     ` <tencent_4E7B2E1523A5D8801223AAB6@qq.com>
2022-09-01 11:19       ` Heikki Krogerus
2022-09-01 11:31         ` Heikki Krogerus

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=Yw8aJ8QC1BtBNBfx@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=zhaoxiao@uniontech.com \
    /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