linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: rtsx_usb_sdmmc: make array 'width' static const
@ 2017-06-29 18:12 Colin King
  2017-07-11 14:43 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-06-29 18:12 UTC (permalink / raw)
  To: Colin Ian King, Linus Walleij, Wolfram Sang, Masahiro Yamada, linux-mmc
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

array width is on-stack and not modified and should be
made static const.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/mmc/host/rtsx_usb_sdmmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index 12d2fbe9c520..76da1687ab37 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -909,7 +909,7 @@ static int sd_set_bus_width(struct rtsx_usb_sdmmc *host,
 		unsigned char bus_width)
 {
 	int err = 0;
-	u8 width[] = {
+	static const u8 width[] = {
 		[MMC_BUS_WIDTH_1] = SD_BUS_WIDTH_1BIT,
 		[MMC_BUS_WIDTH_4] = SD_BUS_WIDTH_4BIT,
 		[MMC_BUS_WIDTH_8] = SD_BUS_WIDTH_8BIT,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc: rtsx_usb_sdmmc: make array 'width' static const
  2017-06-29 18:12 [PATCH] mmc: rtsx_usb_sdmmc: make array 'width' static const Colin King
@ 2017-07-11 14:43 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2017-07-11 14:43 UTC (permalink / raw)
  To: Colin King
  Cc: Linus Walleij, Wolfram Sang, Masahiro Yamada, linux-mmc,
	kernel-janitors, linux-kernel

On 29 June 2017 at 20:12, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> array width is on-stack and not modified and should be
> made static const.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/rtsx_usb_sdmmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
> index 12d2fbe9c520..76da1687ab37 100644
> --- a/drivers/mmc/host/rtsx_usb_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
> @@ -909,7 +909,7 @@ static int sd_set_bus_width(struct rtsx_usb_sdmmc *host,
>                 unsigned char bus_width)
>  {
>         int err = 0;
> -       u8 width[] = {
> +       static const u8 width[] = {
>                 [MMC_BUS_WIDTH_1] = SD_BUS_WIDTH_1BIT,
>                 [MMC_BUS_WIDTH_4] = SD_BUS_WIDTH_4BIT,
>                 [MMC_BUS_WIDTH_8] = SD_BUS_WIDTH_8BIT,
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-11 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 18:12 [PATCH] mmc: rtsx_usb_sdmmc: make array 'width' static const Colin King
2017-07-11 14:43 ` Ulf Hansson

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).