Re: [PATCH] staging: rts5208: Fix coding style issues

From: Greg KH
Date: Thu Jan 18 2024 - 09:51:49 EST


On Thu, Jan 18, 2024 at 09:42:51AM -0500, Jacob Lott wrote:
> 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@xxxxxxxxx>
> ---
>  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
>
>

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
and can not be applied. Please read the file,
Documentation/process/email-clients.rst in order to fix this.

- Your patch did many different things all at once, making it difficult
to review. All Linux kernel patches need to only do one thing at a
time. If you need to do multiple things (such as clean up all coding
style issues in a file/driver), do it in a sequence of patches, each
one doing only one thing. This will make it easier to review the
patches to ensure that they are correct, and to help alleviate any
merge issues that larger patches can cause.

- You did not specify a description of why the patch is needed, or
possibly, any description at all, in the email body. Please read the
section entitled "The canonical patch format" in the kernel file,
Documentation/process/submitting-patches.rst for what is needed in
order to properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
and everyone else, to know what this patch is all about. Please read
the section entitled "The canonical patch format" in the kernel file,
Documentation/process/submitting-patches.rst for what a proper
Subject: line should look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot