From: Bryan Brattlof <hello@bryanbrattlof.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Bryan Brattlof <hello@bryanbrattlof.com> Subject: [PATCH] staging: rtl8723bs: remove custom endian conversion macros Date: Tue, 29 Jun 2021 14:02:52 +0000 [thread overview] Message-ID: <20210629135824.47749-1-hello@bryanbrattlof.com> (raw) The rtw_cpu_to_leXX() and rtw_leXX_to_cpu() family of macros are unnecessary and should be removed. Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com> --- drivers/staging/rtl8723bs/core/rtw_io.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c b/drivers/staging/rtl8723bs/core/rtw_io.c index 856e23398c03..4d3c30ec93b5 100644 --- a/drivers/staging/rtl8723bs/core/rtw_io.c +++ b/drivers/staging/rtl8723bs/core/rtw_io.c @@ -28,11 +28,6 @@ jackson@realtek.com.tw #include <drv_types.h> #include <rtw_debug.h> -#define rtw_le16_to_cpu(val) val -#define rtw_le32_to_cpu(val) val -#define rtw_cpu_to_le16(val) val -#define rtw_cpu_to_le32(val) val - u8 rtw_read8(struct adapter *adapter, u32 addr) { /* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */ @@ -47,7 +42,6 @@ u8 rtw_read8(struct adapter *adapter, u32 addr) u16 rtw_read16(struct adapter *adapter, u32 addr) { - u16 r_val; /* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */ struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); @@ -55,13 +49,11 @@ u16 rtw_read16(struct adapter *adapter, u32 addr) _read16 = pintfhdl->io_ops._read16; - r_val = _read16(pintfhdl, addr); - return rtw_le16_to_cpu(r_val); + return _read16(pintfhdl, addr); } u32 rtw_read32(struct adapter *adapter, u32 addr) { - u32 r_val; /* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */ struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); @@ -69,8 +61,7 @@ u32 rtw_read32(struct adapter *adapter, u32 addr) _read32 = pintfhdl->io_ops._read32; - r_val = _read32(pintfhdl, addr); - return rtw_le32_to_cpu(r_val); + return _read32(pintfhdl, addr); } -- 2.27.0
WARNING: multiple messages have this Message-ID (diff)
From: Bryan Brattlof <hello@bryanbrattlof.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Bryan Brattlof <hello@bryanbrattlof.com> Subject: [PATCH] staging: rtl8723bs: remove custom endian conversion macros Date: Tue, 29 Jun 2021 14:04:38 +0000 [thread overview] Message-ID: <20210629135824.47749-1-hello@bryanbrattlof.com> (raw) Message-ID: <20210629140438.vn2juAWW-gVOo5AAzk3-z-eUZ0S8wJdCByJH4mTGQTY@z> (raw) The rtw_cpu_to_leXX() and rtw_leXX_to_cpu() family of macros are unnecessary and should be removed. Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com> --- drivers/staging/rtl8723bs/core/rtw_io.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c b/drivers/staging/rtl8723bs/core/rtw_io.c index 856e23398c03..4d3c30ec93b5 100644 --- a/drivers/staging/rtl8723bs/core/rtw_io.c +++ b/drivers/staging/rtl8723bs/core/rtw_io.c @@ -28,11 +28,6 @@ jackson@realtek.com.tw #include <drv_types.h> #include <rtw_debug.h> -#define rtw_le16_to_cpu(val) val -#define rtw_le32_to_cpu(val) val -#define rtw_cpu_to_le16(val) val -#define rtw_cpu_to_le32(val) val - u8 rtw_read8(struct adapter *adapter, u32 addr) { /* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */ @@ -47,7 +42,6 @@ u8 rtw_read8(struct adapter *adapter, u32 addr) u16 rtw_read16(struct adapter *adapter, u32 addr) { - u16 r_val; /* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */ struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); @@ -55,13 +49,11 @@ u16 rtw_read16(struct adapter *adapter, u32 addr) _read16 = pintfhdl->io_ops._read16; - r_val = _read16(pintfhdl, addr); - return rtw_le16_to_cpu(r_val); + return _read16(pintfhdl, addr); } u32 rtw_read32(struct adapter *adapter, u32 addr) { - u32 r_val; /* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */ struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); @@ -69,8 +61,7 @@ u32 rtw_read32(struct adapter *adapter, u32 addr) _read32 = pintfhdl->io_ops._read32; - r_val = _read32(pintfhdl, addr); - return rtw_le32_to_cpu(r_val); + return _read32(pintfhdl, addr); } -- 2.27.0
next reply other threads:[~2021-06-29 14:03 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-29 14:02 Bryan Brattlof [this message] 2021-06-29 14:04 ` [PATCH] staging: rtl8723bs: remove custom endian conversion macros Bryan Brattlof
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=20210629135824.47749-1-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: linkBe 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; as well as URLs for NNTP newsgroup(s).