[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240614224256.43131-1-jain.abhinav177@gmail.com>
Date: Fri, 14 Jun 2024 22:42:56 +0000
From: Abhinav Jain <jain.abhinav177@...il.com>
To: gregkh@...uxfoundation.org,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: skhan@...uxfoundation.org,
javier.carrasco.cruz@...il.com,
jain.abhinav177@...il.com
Subject: [PATCH] staging: rtl8723bs: Align address to 4-byte boundary
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@...il.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);
--
2.34.1
Powered by blists - more mailing lists