lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <03b524b7-8e66-4180-b22a-aa641acbaac3@gmail.com>
Date: Thu, 18 Jan 2024 09:42:51 -0500
From: Jacob Lott <jklott.git@...il.com>
To: gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
 linux-kernel@...r.kernel.org, wei_wang@...lsil.com.cn,
 micky_ching@...lsil.com.cn
Cc: jklott.git@...il.com
Subject: [PATCH] staging: rts5208: Fix coding style issues

Help text in a module should describe the module and give
some guidance on whether or not to enable it.

The BIT macro should be used instead of 1UL << n. This
makes the code more readable and easier to maintain.

Signed-off-by: Jacob Lott <jklott.git@...il.com>
---
  drivers/staging/rts5208/Kconfig     | 10 +++++++---
  drivers/staging/rts5208/rtsx_card.h |  4 ++--
  2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rts5208/Kconfig 
b/drivers/staging/rts5208/Kconfig
index b864023d3ccb..bb293cbf6230 100644
--- a/drivers/staging/rts5208/Kconfig
+++ b/drivers/staging/rts5208/Kconfig
@@ -3,7 +3,11 @@ config RTS5208
         tristate "Realtek PCI-E Card Reader RTS5208/5288 support"
         depends on PCI && SCSI
         help
-         Say Y here to include driver code to support the Realtek
-         PCI-E card reader rts5208/rts5288.
+      Choose Y here to enable support for the Realtek PCI-E card reader 
RTS5208/5288.
+         This driver facilitates communication between the Linux kernel 
and the Realtek
+         PCI-E card reader.

-         If this driver is compiled as a module, it will be named rts5208.
+         If you opt to compile this driver as a module, it will be 
named rts5208. Selecting
+         N will exclude this driver from the kernel build. Choose 
option Y if your system includes
+         the Realtek PCI-E card reader rts5208/rts5288. When in doubt, 
it is generally safe
+         to select N.
diff --git a/drivers/staging/rts5208/rtsx_card.h 
b/drivers/staging/rts5208/rtsx_card.h
index 39727371cd7a..9d2504fddb13 100644
--- a/drivers/staging/rts5208/rtsx_card.h
+++ b/drivers/staging/rts5208/rtsx_card.h
@@ -338,7 +338,7 @@
  #define DMA_DIR_FROM_CARD              0x02
  #define DMA_EN                         0x01
  #define DMA_128                                (0 << 4)
-#define DMA_256                                (1 << 4)
+#define DMA_256                                BIT(4)
  #define DMA_512                                (2 << 4)
  #define DMA_1024                       (3 << 4)
  #define DMA_PACK_SIZE_MASK             0x30
@@ -542,7 +542,7 @@

  #define BLINK_EN                       0x08
  #define LED_GPIO0                      (0 << 4)
-#define LED_GPIO1                      (1 << 4)
+#define LED_GPIO1                      BIT(4)
  #define LED_GPIO2                      (2 << 4)

  #define SDIO_BUS_CTRL          0x01
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ