From: Nam Cao <namcaov@gmail.com>
To: gregkh@linuxfoundation.org
Cc: dan.carpenter@oracle.com, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev, namcaov@gmail.com,
phil@philpotter.co.uk, Larry.Finger@lwfinger.net,
paskripkin@gmail.com
Subject: [PATCH v3 2/2] staging: r8188eu: remove unused macros
Date: Tue, 14 Jun 2022 17:58:45 +0200 [thread overview]
Message-ID: <a7f700c0688a16bb697fb693894f4c16594fd483.1655220367.git.namcaov@gmail.com> (raw)
In-Reply-To: <cover.1655220367.git.namcaov@gmail.com>
Remove LE_BITS_TO_1BYTE and relevant macros because they are not used
anywhere.
Signed-off-by: Nam Cao <namcaov@gmail.com>
---
drivers/staging/r8188eu/include/basic_types.h | 31 -------------------
1 file changed, 31 deletions(-)
diff --git a/drivers/staging/r8188eu/include/basic_types.h b/drivers/staging/r8188eu/include/basic_types.h
index cfd15ac1d9c0..0b71e2c6e41a 100644
--- a/drivers/staging/r8188eu/include/basic_types.h
+++ b/drivers/staging/r8188eu/include/basic_types.h
@@ -13,37 +13,6 @@ typedef void (*proc_t)(void *);
/* TODO: Macros Below are Sync from SD7-Driver. It is necessary
* to check correctness */
-/*
- * Call endian free function when
- * 1. Read/write packet content.
- * 2. Before write integer to IO.
- * 3. After read integer from IO.
-*/
-
-/* Convert little data endian to host ordering */
-#define EF1BYTE(_val) \
- ((u8)(_val))
-
-/* Create a bit mask */
-#define BIT_LEN_MASK_8(__bitlen) \
- (0xFF >> (8 - (__bitlen)))
-
-/*Description:
- * Return 4-byte value in host byte ordering from
- * 4-byte pointer in little-endian system.
- */
-#define LE_P1BYTE_TO_HOST_1BYTE(__pstart) \
- (EF1BYTE(*((u8 *)(__pstart))))
-
-/*Description:
-Translate subfield (continuous bits in little-endian) of 4-byte
-value to host byte ordering.*/
-#define LE_BITS_TO_1BYTE(__pstart, __bitoffset, __bitlen) \
- ( \
- (LE_P1BYTE_TO_HOST_1BYTE(__pstart) >> (__bitoffset)) & \
- BIT_LEN_MASK_8(__bitlen) \
- )
-
#define N_BYTE_ALIGMENT(__value, __aligment) ((__aligment == 1) ? \
(__value) : (((__value + __aligment - 1) / __aligment) * __aligment))
--
2.25.1
next prev parent reply other threads:[~2022-06-14 15:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-12 1:05 [PATCH 0/2] Clean up some macros Nam Cao
2022-06-12 1:05 ` [PATCH 1/2] staging: r8188eu: simplify " Nam Cao
2022-06-12 4:56 ` Greg KH
2022-06-12 8:11 ` [PATCH v2 0/2] " Nam Cao
2022-06-12 8:11 ` [PATCH v2 1/2] staging: r8188eu: replace LE_BITS_TO_1BYTE with clearer codes Nam Cao
2022-06-13 14:30 ` Dan Carpenter
2022-06-14 9:34 ` Greg KH
2022-06-14 15:58 ` [PATCH v3 0/2] get rid of confusing macros Nam Cao
2022-06-14 15:58 ` [PATCH v3 1/2] staging: r8188eu: replace " Nam Cao
2022-06-14 15:58 ` Nam Cao [this message]
2022-06-15 8:29 ` [PATCH v3 0/2] get rid of " Dan Carpenter
2022-06-12 8:11 ` [PATCH v2 2/2] staging: r8188eu: remove unused macros Nam Cao
2022-06-12 1:05 ` [PATCH 2/2] staging: r8188eu: replace FIELD_OFFSET with offsetof Nam Cao
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=a7f700c0688a16bb697fb693894f4c16594fd483.1655220367.git.namcaov@gmail.com \
--to=namcaov@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
/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®