All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Orlando Chamberlain <orlandoch.dev@gmail.com>
Cc: Mark Gross <markgross@kernel.org>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH 1/1] platform/x86: apple-gmux: don't use be32_to_cpu and cpu_to_be32
Date: Thu, 15 Jun 2023 14:39:12 +0200	[thread overview]
Message-ID: <aba1cfd5-e78c-ccbf-b8be-d4e668c5a589@redhat.com> (raw)
In-Reply-To: <20230614064931.3263-2-orlandoch.dev@gmail.com>

Hi,

On 6/14/23 08:49, Orlando Chamberlain wrote:
> Sparce doesn't seem to like using be32_to_cpu and cpu_to_be32 to convert
> values for the MMIO gmux to/from the host architecture.
> 
> Instead use iowrite32be and ioread32be to always convert, which should be
> fine because apple-gmux is only used on x86 with is always little endian.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202305161712.5l3f4iI4-lkp@intel.com/
> Signed-off-by: Orlando Chamberlain <orlandoch.dev@gmail.com>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans



> ---
>  drivers/platform/x86/apple-gmux.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
> index e02b4aea4f1e..cadbb557a108 100644
> --- a/drivers/platform/x86/apple-gmux.c
> +++ b/drivers/platform/x86/apple-gmux.c
> @@ -278,7 +278,7 @@ static u32 gmux_mmio_read32(struct apple_gmux_data *gmux_data, int port)
>  	iowrite8(GMUX_MMIO_READ | sizeof(val),
>  		gmux_data->iomem_base + GMUX_MMIO_COMMAND_SEND);
>  	gmux_mmio_wait(gmux_data);
> -	val = be32_to_cpu(ioread32(gmux_data->iomem_base));
> +	val = ioread32be(gmux_data->iomem_base);
>  	mutex_unlock(&gmux_data->index_lock);
>  
>  	return val;
> @@ -288,7 +288,7 @@ static void gmux_mmio_write32(struct apple_gmux_data *gmux_data, int port,
>  			       u32 val)
>  {
>  	mutex_lock(&gmux_data->index_lock);
> -	iowrite32(cpu_to_be32(val), gmux_data->iomem_base);
> +	iowrite32be(val, gmux_data->iomem_base);
>  	iowrite8(port & 0xff, gmux_data->iomem_base + GMUX_MMIO_PORT_SELECT);
>  	iowrite8(GMUX_MMIO_WRITE | sizeof(val),
>  		gmux_data->iomem_base + GMUX_MMIO_COMMAND_SEND);


      reply	other threads:[~2023-06-15 12:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  6:49 [PATCH 1/1] platform/x86: apple-gmux: don't use be32_to_cpu and cpu_to_be32 Orlando Chamberlain
2023-06-15 12:39 ` Hans de Goede [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=aba1cfd5-e78c-ccbf-b8be-d4e668c5a589@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=markgross@kernel.org \
    --cc=orlandoch.dev@gmail.com \
    --cc=platform-driver-x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.