* [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c
@ 2018-09-07 21:54 Cedric Roux
2018-09-07 21:54 ` [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440 Cedric Roux
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Cedric Roux @ 2018-09-07 21:54 UTC (permalink / raw)
To: kgene, krzk, linux, linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: Cedric Roux
Running:
scripts/checkpatch.pl -f arch/arm/mach-s3c24xx/mach-mini2440.c
revealed several errors and warnings.
They were all removed, except one which is an #if 0 around the declaration
of a gpio pin. This needs some more investigation and I prefer to let it
here. This is not some dead code.
'printk' was replaced by 'pr_info'.
Signed-off-by: Cedric Roux <sed@free.fr>
---
arch/arm/mach-s3c24xx/mach-mini2440.c | 80 ++++++++++++++-------------
1 file changed, 43 insertions(+), 37 deletions(-)
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index f9fc1f8d2b28..4a0bf6abba8c 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -64,8 +64,8 @@ static struct map_desc mini2440_iodesc[] __initdata = {
};
#define UCON S3C2410_UCON_DEFAULT
-#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
-#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
+#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
+#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
static struct s3c2410_uartcfg mini2440_uartcfgs[] __initdata = {
@@ -104,8 +104,8 @@ static struct s3c2410_udc_mach_info mini2440_udc_cfg __initdata = {
/*
* This macro simplifies the table bellow
*/
-#define _LCD_DECLARE(_clock,_xres,margin_left,margin_right,hsync, \
- _yres,margin_top,margin_bottom,vsync, refresh) \
+#define _LCD_DECLARE(_clock, _xres, margin_left, margin_right, hsync, \
+ _yres, margin_top, margin_bottom, vsync, refresh) \
.width = _xres, \
.xres = _xres, \
.height = _yres, \
@@ -128,7 +128,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
[0] = { /* mini2440 + 3.5" TFT + touchscreen */
_LCD_DECLARE(
7, /* The 3.5 is quite fast */
- 240, 21, 38, 6, /* x timing */
+ 240, 21, 38, 6, /* x timing */
320, 4, 4, 2, /* y timing */
60), /* refresh rate */
.lcdcon5 = (S3C2410_LCDCON5_FRM565 |
@@ -140,7 +140,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
[1] = { /* mini2440 + 7" TFT + touchscreen */
_LCD_DECLARE(
10, /* the 7" runs slower */
- 800, 40, 40, 48, /* x timing */
+ 800, 40, 40, 48, /* x timing */
480, 29, 3, 3, /* y timing */
50), /* refresh rate */
.lcdcon5 = (S3C2410_LCDCON5_FRM565 |
@@ -148,7 +148,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN),
},
- /* The VGA shield can outout at several resolutions. All share
+ /* The VGA shield can outout at several resolutions. All share
* the same timings, however, anything smaller than 1024x768
* will only be displayed in the top left corner of a 1024x768
* XGA output unless you add optional dip switches to the shield.
@@ -158,9 +158,10 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
_LCD_DECLARE(
10,
1024, 1, 2, 2, /* y timing */
- 768, 200, 16, 16, /* x timing */
+ 768, 200, 16, 16, /* x timing */
24), /* refresh rate, maximum stable,
- tested with the FPGA shield */
+ * tested with the FPGA shield
+ */
.lcdcon5 = (S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_HWSWP),
},
@@ -196,7 +197,8 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
/* Enable VD[2..7], VD[10..15], VD[18..23] and VCLK, syncs, VDEN
* and disable the pull down resistors on pins we are using for LCD
- * data. */
+ * data.
+ */
.gpcup = (0xf << 1) | (0x3f << 10),
@@ -232,10 +234,10 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
/* MMC/SD */
static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
- .gpio_detect = S3C2410_GPG(8),
- .gpio_wprotect = S3C2410_GPH(8),
- .set_power = NULL,
- .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
+ .gpio_detect = S3C2410_GPG(8),
+ .gpio_wprotect = S3C2410_GPH(8),
+ .set_power = NULL,
+ .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
};
/* NAND Flash on MINI2440 board */
@@ -254,7 +256,8 @@ static struct mtd_partition mini2440_default_nand_part[] __initdata = {
[2] = {
.name = "kernel",
/* 5 megabytes, for a kernel with no modules
- * or a uImage with a ramdisk attached */
+ * or a uImage with a ramdisk attached
+ */
.size = 0x00500000,
.offset = SZ_256K + SZ_128K,
},
@@ -271,7 +274,7 @@ static struct s3c2410_nand_set mini2440_nand_sets[] __initdata = {
.nr_chips = 1,
.nr_partitions = ARRAY_SIZE(mini2440_default_nand_part),
.partitions = mini2440_default_nand_part,
- .flash_bbt = 1, /* we use u-boot to create a BBT */
+ .flash_bbt = 1, /* we use u-boot to create a BBT */
},
};
@@ -290,7 +293,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = {
static struct resource mini2440_dm9k_resource[] = {
[0] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE, 4),
[1] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE + 4, 4),
- [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ \
+ [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE),
};
@@ -362,7 +365,8 @@ static struct gpio_keys_button mini2440_buttons[] = {
},
#if 0
/* this pin is also known as TCLK1 and seems to already
- * marked as "in use" somehow in the kernel -- possibly wrongly */
+ * marked as "in use" somehow in the kernel -- possibly wrongly
+ */
{
.gpio = S3C2410_GPG(11), /* K6 */
.code = KEY_F6,
@@ -564,7 +568,8 @@ static char mini2440_features_str[12] __initdata = "0tb";
static int __init mini2440_features_setup(char *str)
{
if (str)
- strlcpy(mini2440_features_str, str, sizeof(mini2440_features_str));
+ strlcpy(mini2440_features_str, str,
+ sizeof(mini2440_features_str));
return 1;
}
@@ -583,10 +588,10 @@ struct mini2440_features_t {
};
static void __init mini2440_parse_features(
- struct mini2440_features_t * features,
- const char * features_str )
+ struct mini2440_features_t *features,
+ const char *features_str)
{
- const char * fp = features_str;
+ const char *fp = features_str;
features->count = 0;
features->done = 0;
@@ -598,13 +603,14 @@ static void __init mini2440_parse_features(
switch (f) {
case '0'...'9': /* tft screen */
if (features->done & FEATURE_SCREEN) {
- printk(KERN_INFO "MINI2440: '%c' ignored, "
- "screen type already set\n", f);
+ pr_info("MINI2440: '%c' ignored, screen type already set\n",
+ f);
} else {
int li = f - '0';
+
if (li >= ARRAY_SIZE(mini2440_lcd_cfg))
- printk(KERN_INFO "MINI2440: "
- "'%c' out of range LCD mode\n", f);
+ pr_info("MINI2440: '%c' out of range LCD mode\n",
+ f);
else {
features->optional[features->count++] =
&s3c_device_lcd;
@@ -615,8 +621,8 @@ static void __init mini2440_parse_features(
break;
case 'b':
if (features->done & FEATURE_BACKLIGHT)
- printk(KERN_INFO "MINI2440: '%c' ignored, "
- "backlight already set\n", f);
+ pr_info("MINI2440: '%c' ignored, backlight already set\n",
+ f);
else {
features->optional[features->count++] =
&mini2440_led_backlight;
@@ -624,13 +630,13 @@ static void __init mini2440_parse_features(
features->done |= FEATURE_BACKLIGHT;
break;
case 't':
- printk(KERN_INFO "MINI2440: '%c' ignored, "
- "touchscreen not compiled in\n", f);
+ pr_info("MINI2440: '%c' ignored, touchscreen not compiled in\n",
+ f);
break;
case 'c':
if (features->done & FEATURE_CAMERA)
- printk(KERN_INFO "MINI2440: '%c' ignored, "
- "camera already registered\n", f);
+ pr_info("MINI2440: '%c' ignored, camera already registered\n",
+ f);
else
features->optional[features->count++] =
&s3c_device_camif;
@@ -645,7 +651,7 @@ static void __init mini2440_init(void)
struct mini2440_features_t features = { 0 };
int i;
- printk(KERN_INFO "MINI2440: Option string mini2440=%s\n",
+ pr_info("MINI2440: Option string mini2440=%s\n",
mini2440_features_str);
/* Parse the feature string */
@@ -674,17 +680,17 @@ static void __init mini2440_init(void)
mini2440_fb_info.displays =
&mini2440_lcd_cfg[features.lcd_index];
- printk(KERN_INFO "MINI2440: LCD");
+ pr_info("MINI2440: LCD");
for (li = 0; li < ARRAY_SIZE(mini2440_lcd_cfg); li++)
if (li == features.lcd_index)
- printk(" [%d:%dx%d]", li,
+ pr_info(" [%d:%dx%d]", li,
mini2440_lcd_cfg[li].width,
mini2440_lcd_cfg[li].height);
else
- printk(" %d:%dx%d", li,
+ pr_info(" %d:%dx%d", li,
mini2440_lcd_cfg[li].width,
mini2440_lcd_cfg[li].height);
- printk("\n");
+ pr_info("\n");
s3c24xx_fb_set_platdata(&mini2440_fb_info);
}
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440
2018-09-07 21:54 [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c Cedric Roux
@ 2018-09-07 21:54 ` Cedric Roux
2018-09-10 10:23 ` Krzysztof Kozlowski
2018-09-10 17:22 ` Krzysztof Kozlowski
2018-09-10 17:06 ` [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c Krzysztof Kozlowski
2018-09-12 19:21 ` Joe Perches
2 siblings, 2 replies; 10+ messages in thread
From: Cedric Roux @ 2018-09-07 21:54 UTC (permalink / raw)
To: kgene, krzk, linux, linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: Cedric Roux
The mini2440 computer uses "active high" to signal that the "write protect"
of the inserted MMC is set. The current code uses the opposite, leading to
a wrong detection of write protection. The solution is simply to use
".wprotect_invert = 1" in the description of the MMC.
Signed-off-by: Cedric Roux <sed@free.fr>
---
arch/arm/mach-s3c24xx/mach-mini2440.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 4a0bf6abba8c..bfce7971d741 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -234,10 +234,11 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
/* MMC/SD */
static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
- .gpio_detect = S3C2410_GPG(8),
- .gpio_wprotect = S3C2410_GPH(8),
- .set_power = NULL,
- .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
+ .gpio_detect = S3C2410_GPG(8),
+ .gpio_wprotect = S3C2410_GPH(8),
+ .wprotect_invert = 1,
+ .set_power = NULL,
+ .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
};
/* NAND Flash on MINI2440 board */
--
2.18.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440
2018-09-07 21:54 ` [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440 Cedric Roux
@ 2018-09-10 10:23 ` Krzysztof Kozlowski
2018-09-10 16:55 ` Cedric Roux
2018-09-10 17:22 ` Krzysztof Kozlowski
1 sibling, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2018-09-10 10:23 UTC (permalink / raw)
To: sed; +Cc: kgene, linux, linux-arm-kernel, linux-samsung-soc, linux-kernel
On Fri, 7 Sep 2018 at 23:53, Cedric Roux <sed@free.fr> wrote:
>
> The mini2440 computer uses "active high" to signal that the "write protect"
> of the inserted MMC is set. The current code uses the opposite, leading to
> a wrong detection of write protection. The solution is simply to use
> ".wprotect_invert = 1" in the description of the MMC.
>
> Signed-off-by: Cedric Roux <sed@free.fr>
> ---
> arch/arm/mach-s3c24xx/mach-mini2440.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
> index 4a0bf6abba8c..bfce7971d741 100644
> --- a/arch/arm/mach-s3c24xx/mach-mini2440.c
> +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
> @@ -234,10 +234,11 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
> /* MMC/SD */
>
> static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
> - .gpio_detect = S3C2410_GPG(8),
> - .gpio_wprotect = S3C2410_GPH(8),
> - .set_power = NULL,
> - .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
> + .gpio_detect = S3C2410_GPG(8),
> + .gpio_wprotect = S3C2410_GPH(8),
> + .wprotect_invert = 1,
> + .set_power = NULL,
> + .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
This looks unexpected... after patch 1 there should be only one change
- one new line added. What happened here?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440
2018-09-10 10:23 ` Krzysztof Kozlowski
@ 2018-09-10 16:55 ` Cedric Roux
2018-09-10 16:57 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Cedric Roux @ 2018-09-10 16:55 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: kgene, linux, linux-arm-kernel, linux-samsung-soc, linux-kernel
On 09/10/2018 12:23 PM, Krzysztof Kozlowski wrote:
>> static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
>> - .gpio_detect = S3C2410_GPG(8),
>> - .gpio_wprotect = S3C2410_GPH(8),
>> - .set_power = NULL,
>> - .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
>> + .gpio_detect = S3C2410_GPG(8),
>> + .gpio_wprotect = S3C2410_GPH(8),
>> + .wprotect_invert = 1,
>> + .set_power = NULL,
>> + .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
>
> This looks unexpected... after patch 1 there should be only one change
> - one new line added. What happened here?
This is to align all the '='.
These were spaces before the '=' so I also used spaces.
Should I put TABs instead? I looked in the coding style
and didn't find anything about this specific thing
(maybe I read too fast though).
And if this ends up unaligned because 'wprotect_invert'
requires a second TAB for the others, should I do a separate
commit?
Thanks.
Regards,
Cédric.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440
2018-09-10 16:55 ` Cedric Roux
@ 2018-09-10 16:57 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2018-09-10 16:57 UTC (permalink / raw)
To: Cedric Roux
Cc: kgene, linux, linux-arm-kernel, linux-samsung-soc, linux-kernel
On Mon, Sep 10, 2018 at 06:55:09PM +0200, Cedric Roux wrote:
> On 09/10/2018 12:23 PM, Krzysztof Kozlowski wrote:
> >> static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
> >> - .gpio_detect = S3C2410_GPG(8),
> >> - .gpio_wprotect = S3C2410_GPH(8),
> >> - .set_power = NULL,
> >> - .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
> >> + .gpio_detect = S3C2410_GPG(8),
> >> + .gpio_wprotect = S3C2410_GPH(8),
> >> + .wprotect_invert = 1,
> >> + .set_power = NULL,
> >> + .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
> >
> > This looks unexpected... after patch 1 there should be only one change
> > - one new line added. What happened here?
>
> This is to align all the '='.
>
> These were spaces before the '=' so I also used spaces.
> Should I put TABs instead? I looked in the coding style
> and didn't find anything about this specific thing
> (maybe I read too fast though).
>
> And if this ends up unaligned because 'wprotect_invert'
> requires a second TAB for the others, should I do a separate
> commit?
Ah, I understand. It's okay, thanks!
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440
2018-09-07 21:54 ` [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440 Cedric Roux
2018-09-10 10:23 ` Krzysztof Kozlowski
@ 2018-09-10 17:22 ` Krzysztof Kozlowski
1 sibling, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2018-09-10 17:22 UTC (permalink / raw)
To: Cedric Roux
Cc: kgene, linux, linux-arm-kernel, linux-samsung-soc, linux-kernel
On Fri, Sep 07, 2018 at 11:54:46PM +0200, Cedric Roux wrote:
> The mini2440 computer uses "active high" to signal that the "write protect"
> of the inserted MMC is set. The current code uses the opposite, leading to
> a wrong detection of write protection. The solution is simply to use
> ".wprotect_invert = 1" in the description of the MMC.
>
> Signed-off-by: Cedric Roux <sed@free.fr>
> ---
> arch/arm/mach-s3c24xx/mach-mini2440.c | 9 +++++----
Thanks, applied.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c
2018-09-07 21:54 [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c Cedric Roux
2018-09-07 21:54 ` [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440 Cedric Roux
@ 2018-09-10 17:06 ` Krzysztof Kozlowski
2018-09-12 19:21 ` Joe Perches
2 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2018-09-10 17:06 UTC (permalink / raw)
To: Cedric Roux
Cc: kgene, linux, linux-arm-kernel, linux-samsung-soc, linux-kernel
On Fri, Sep 07, 2018 at 11:54:45PM +0200, Cedric Roux wrote:
> Running:
> scripts/checkpatch.pl -f arch/arm/mach-s3c24xx/mach-mini2440.c
> revealed several errors and warnings.
>
> They were all removed, except one which is an #if 0 around the declaration
> of a gpio pin. This needs some more investigation and I prefer to let it
> here. This is not some dead code.
>
> 'printk' was replaced by 'pr_info'.
>
> Signed-off-by: Cedric Roux <sed@free.fr>
> ---
> arch/arm/mach-s3c24xx/mach-mini2440.c | 80 ++++++++++++++-------------
Thanks, applied.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c
2018-09-07 21:54 [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c Cedric Roux
2018-09-07 21:54 ` [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440 Cedric Roux
2018-09-10 17:06 ` [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c Krzysztof Kozlowski
@ 2018-09-12 19:21 ` Joe Perches
2018-09-13 20:26 ` Cedric Roux
2 siblings, 1 reply; 10+ messages in thread
From: Joe Perches @ 2018-09-12 19:21 UTC (permalink / raw)
To: Cedric Roux, kgene, krzk, linux, linux-arm-kernel,
linux-samsung-soc, linux-kernel
On Fri, 2018-09-07 at 23:54 +0200, Cedric Roux wrote:
> Running:
> scripts/checkpatch.pl -f arch/arm/mach-s3c24xx/mach-mini2440.c
> revealed several errors and warnings.
>
> They were all removed, except one which is an #if 0 around the declaration
> of a gpio pin. This needs some more investigation and I prefer to let it
> here. This is not some dead code.
[]
> diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
[]
> @@ -674,17 +680,17 @@ static void __init mini2440_init(void)
> mini2440_fb_info.displays =
> &mini2440_lcd_cfg[features.lcd_index];
>
> - printk(KERN_INFO "MINI2440: LCD");
> + pr_info("MINI2440: LCD");
OK
> for (li = 0; li < ARRAY_SIZE(mini2440_lcd_cfg); li++)
> if (li == features.lcd_index)
> - printk(" [%d:%dx%d]", li,
> + pr_info(" [%d:%dx%d]", li,
> mini2440_lcd_cfg[li].width,
> mini2440_lcd_cfg[li].height);
pr_cont
> else
> - printk(" %d:%dx%d", li,
> + pr_info(" %d:%dx%d", li,
pr_cont
> mini2440_lcd_cfg[li].width,
> mini2440_lcd_cfg[li].height);
> - printk("\n");
> + pr_info("\n");
pr_cont
So only the first printk should use pr_info().
The subsequent printk uses should use pr_cont()
> s3c24xx_fb_set_platdata(&mini2440_fb_info);
> }
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c
2018-09-12 19:21 ` Joe Perches
@ 2018-09-13 20:26 ` Cedric Roux
2018-09-17 8:33 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Cedric Roux @ 2018-09-13 20:26 UTC (permalink / raw)
To: Joe Perches, kgene, krzk, linux, linux-arm-kernel,
linux-samsung-soc, linux-kernel
Hi,
On 09/12/2018 09:21 PM, Joe Perches wrote:
> On Fri, 2018-09-07 at 23:54 +0200, Cedric Roux wrote:
>> Running:
>> scripts/checkpatch.pl -f arch/arm/mach-s3c24xx/mach-mini2440.c
>> revealed several errors and warnings.
>>
>> They were all removed, except one which is an #if 0 around the declaration
>> of a gpio pin. This needs some more investigation and I prefer to let it
>> here. This is not some dead code.
> []
>> diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
> []
>> @@ -674,17 +680,17 @@ static void __init mini2440_init(void)
>> mini2440_fb_info.displays =
>> &mini2440_lcd_cfg[features.lcd_index];
>>
>> - printk(KERN_INFO "MINI2440: LCD");
>> + pr_info("MINI2440: LCD");
>
> OK
>
>> for (li = 0; li < ARRAY_SIZE(mini2440_lcd_cfg); li++)
>> if (li == features.lcd_index)
>> - printk(" [%d:%dx%d]", li,
>> + pr_info(" [%d:%dx%d]", li,
>> mini2440_lcd_cfg[li].width,
>> mini2440_lcd_cfg[li].height);
>
> pr_cont
>
>> else
>> - printk(" %d:%dx%d", li,
>> + pr_info(" %d:%dx%d", li,
>
> pr_cont
>
>> mini2440_lcd_cfg[li].width,
>> mini2440_lcd_cfg[li].height);
>> - printk("\n");
>> + pr_info("\n");
>
> pr_cont
>
> So only the first printk should use pr_info().
> The subsequent printk uses should use pr_cont()
at this point, I don't know what to do.
Should I resubmit the patches? Or is it in the hands of
Krzysztof (krzk@kernel.org)? I would say a git rebase -i
is enough to edit the patch and this rebase is obviously
not to be done by me, but I don't know the process.
Regards,
Cédric.
>
>> s3c24xx_fb_set_platdata(&mini2440_fb_info);
>> }
>>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c
2018-09-13 20:26 ` Cedric Roux
@ 2018-09-17 8:33 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2018-09-17 8:33 UTC (permalink / raw)
To: sed; +Cc: joe, kgene, linux, linux-arm-kernel, linux-samsung-soc, linux-kernel
On Thu, 13 Sep 2018 at 22:24, Cedric Roux <sed@free.fr> wrote:
>
> Hi,
>
> On 09/12/2018 09:21 PM, Joe Perches wrote:
> > On Fri, 2018-09-07 at 23:54 +0200, Cedric Roux wrote:
> >> Running:
> >> scripts/checkpatch.pl -f arch/arm/mach-s3c24xx/mach-mini2440.c
> >> revealed several errors and warnings.
> >>
> >> They were all removed, except one which is an #if 0 around the declaration
> >> of a gpio pin. This needs some more investigation and I prefer to let it
> >> here. This is not some dead code.
> > []
> >> diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
> > []
> >> @@ -674,17 +680,17 @@ static void __init mini2440_init(void)
> >> mini2440_fb_info.displays =
> >> &mini2440_lcd_cfg[features.lcd_index];
> >>
> >> - printk(KERN_INFO "MINI2440: LCD");
> >> + pr_info("MINI2440: LCD");
> >
> > OK
> >
> >> for (li = 0; li < ARRAY_SIZE(mini2440_lcd_cfg); li++)
> >> if (li == features.lcd_index)
> >> - printk(" [%d:%dx%d]", li,
> >> + pr_info(" [%d:%dx%d]", li,
> >> mini2440_lcd_cfg[li].width,
> >> mini2440_lcd_cfg[li].height);
> >
> > pr_cont
> >
> >> else
> >> - printk(" %d:%dx%d", li,
> >> + pr_info(" %d:%dx%d", li,
> >
> > pr_cont
> >
> >> mini2440_lcd_cfg[li].width,
> >> mini2440_lcd_cfg[li].height);
> >> - printk("\n");
> >> + pr_info("\n");
> >
> > pr_cont
> >
> > So only the first printk should use pr_info().
> > The subsequent printk uses should use pr_cont()
>
> at this point, I don't know what to do.
>
> Should I resubmit the patches? Or is it in the hands of
> Krzysztof (krzk@kernel.org)? I would say a git rebase -i
> is enough to edit the patch and this rebase is obviously
> not to be done by me, but I don't know the process.
Can you send a incremental fix for this, restoring the original
continued printks?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-09-17 8:33 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-07 21:54 [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c Cedric Roux
2018-09-07 21:54 ` [PATCH v3 2/2] ARM: s3c24xx: Correct SD card write protect detection on Mini2440 Cedric Roux
2018-09-10 10:23 ` Krzysztof Kozlowski
2018-09-10 16:55 ` Cedric Roux
2018-09-10 16:57 ` Krzysztof Kozlowski
2018-09-10 17:22 ` Krzysztof Kozlowski
2018-09-10 17:06 ` [PATCH v3 1/2] ARM: s3c24xx: formatting cleanup in mach-mini2440.c Krzysztof Kozlowski
2018-09-12 19:21 ` Joe Perches
2018-09-13 20:26 ` Cedric Roux
2018-09-17 8:33 ` Krzysztof Kozlowski
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).