Linux kernel staging patches
 help / color / mirror / Atom feed
From: Nam Cao <namcao@linutronix.de>
To: Abhinav Jain <jain.abhinav177@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, skhan@linuxfoundation.org,
	javier.carrasco.cruz@gmail.com
Subject: Re: [PATCH] staging: rtl8723bs: Align address to 4-byte boundary
Date: Sat, 15 Jun 2024 20:05:01 +0200	[thread overview]
Message-ID: <20240615180501.KINZFINu@linutronix.de> (raw)
In-Reply-To: <20240614224256.43131-1-jain.abhinav177@gmail.com>

On Fri, Jun 14, 2024 at 10:42:56PM +0000, Abhinav Jain wrote:
> Add address alignment in sdio_local_read, _sdio_local_read &
> sdio_local_write functions as per the TODO.
> 
> Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
> ---
>  drivers/staging/rtl8723bs/hal/sdio_ops.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> index 107f427ee4aa..caee2d2043b3 100644
> --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
> +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> @@ -478,9 +478,6 @@ void sdio_set_intf_ops(struct adapter *adapter, struct _io_ops *ops)
>  	ops->_write_port = &sdio_write_port;
>  }
>  
> -/*
> - * Todo: align address to 4 bytes.
> - */
>  static s32 _sdio_local_read(
>  	struct adapter *adapter,
>  	u32 addr,
> @@ -494,6 +491,7 @@ static s32 _sdio_local_read(
>  	u8 *tmpbuf;
>  	u32 n;
>  
> +	addr = addr & ~3;
>  	intfhdl = &adapter->iopriv.intf;
>  
>  	hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);
> @@ -516,9 +514,6 @@ static s32 _sdio_local_read(
>  	return err;
>  }
>  
> -/*
> - * Todo: align address to 4 bytes.
> - */
>  s32 sdio_local_read(
>  	struct adapter *adapter,
>  	u32 addr,
> @@ -532,6 +527,7 @@ s32 sdio_local_read(
>  	u8 *tmpbuf;
>  	u32 n;
>  
> +	addr = addr & ~3;
>  	intfhdl = &adapter->iopriv.intf;
>  
>  	hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);
> @@ -557,9 +553,6 @@ s32 sdio_local_read(
>  	return err;
>  }
>  
> -/*
> - * Todo: align address to 4 bytes.
> - */
>  s32 sdio_local_write(
>  	struct adapter *adapter,
>  	u32 addr,
> @@ -572,6 +565,7 @@ s32 sdio_local_write(
>  	s32 err;
>  	u8 *tmpbuf;
>  
> +	addr = addr & ~3;
>  	intfhdl = &adapter->iopriv.intf;
>  
>  	hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);

Tthese functions are never called with "addr" that is not 4-byte-aligned.
So I don't think this patch is what the Todo notes meant.

Best regards,
Nam

  reply	other threads:[~2024-06-15 18:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 22:42 [PATCH] staging: rtl8723bs: Align address to 4-byte boundary Abhinav Jain
2024-06-15 18:05 ` Nam Cao [this message]
2024-06-24 13:17 ` Greg KH

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=20240615180501.KINZFINu@linutronix.de \
    --to=namcao@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jain.abhinav177@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=skhan@linuxfoundation.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