From: Bryan Brattlof <hello@bryanbrattlof.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Bryan Brattlof <hello@bryanbrattlof.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 2/6] staging: rtl8723bs: remove sdio_writeN()
Date: Sat, 21 Aug 2021 23:55:48 +0000 [thread overview]
Message-ID: <20210821235456.2502681-2-hello@bryanbrattlof.com> (raw)
The sdio_writeN() function is unused. We can remove it.
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
---
drivers/staging/rtl8723bs/hal/sdio_ops.c | 48 ----------------------
drivers/staging/rtl8723bs/include/rtw_io.h | 1 -
2 files changed, 49 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index b784a390c8e1..6bd662928ab6 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -299,53 +299,6 @@ static s32 sdio_write32(struct intf_hdl *intfhdl, u32 addr, u32 val)
return err;
}
-static s32 sdio_writeN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf)
-{
- struct adapter *adapter;
- u8 mac_pwr_ctrl_on;
- u8 device_id;
- u16 offset;
- u32 ftaddr;
- u8 shift;
- s32 err;
-
- adapter = intfhdl->padapter;
- err = 0;
-
- ftaddr = _cvrt2ftaddr(addr, &device_id, &offset);
-
- rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
- if (
- ((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
- (!mac_pwr_ctrl_on) ||
- (adapter_to_pwrctl(adapter)->fw_current_in_ps_mode)
- )
- return sd_cmd52_write(intfhdl, ftaddr, cnt, buf);
-
- shift = ftaddr & 0x3;
- if (shift == 0) {
- err = sd_write(intfhdl, ftaddr, cnt, buf);
- } else {
- u8 *tmpbuf;
- u32 n;
-
- ftaddr &= ~(u16)0x3;
- n = cnt + shift;
- tmpbuf = rtw_malloc(n);
- if (!tmpbuf)
- return -1;
- err = sd_read(intfhdl, ftaddr, 4, tmpbuf);
- if (err) {
- kfree(tmpbuf);
- return err;
- }
- memcpy(tmpbuf + shift, buf, cnt);
- err = sd_write(intfhdl, ftaddr, n, tmpbuf);
- kfree(tmpbuf);
- }
- return err;
-}
-
static void sdio_read_mem(
struct intf_hdl *intfhdl,
u32 addr,
@@ -463,7 +416,6 @@ void sdio_set_intf_ops(struct adapter *adapter, struct _io_ops *ops)
ops->_write8 = &sdio_write8;
ops->_write16 = &sdio_write16;
ops->_write32 = &sdio_write32;
- ops->_writeN = &sdio_writeN;
ops->_write_port = &sdio_write_port;
}
diff --git a/drivers/staging/rtl8723bs/include/rtw_io.h b/drivers/staging/rtl8723bs/include/rtw_io.h
index 87f36b7e880f..0753e20cfaa2 100644
--- a/drivers/staging/rtl8723bs/include/rtw_io.h
+++ b/drivers/staging/rtl8723bs/include/rtw_io.h
@@ -84,7 +84,6 @@ struct _io_ops {
int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
- int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
--
2.30.2
reply other threads:[~2021-08-21 23:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210821235456.2502681-2-hello@bryanbrattlof.com \
--to=hello@bryanbrattlof.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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
all inboxes | Powered by JetHome®