stdio_dev.h: Drop the video section as it is unused
PATCH v2 1/2 stdio_dev.h: Drop the video section as it is unused
With tighter build flags the fact that this header referenced uchar/ushort without including what typedefs it causes an error. Rather than add another include here, drop the section in question as it is unused.
---
Changes in v2:
- Reword slightly, add Tested-by
--- include/stdio_dev.h | 18 ------------------ 1 file changed, 18 deletions(-)
include/stdio_dev.h +0 -18
@@ -49,24 +49,6 @@ struct stdio_dev { };/* -* VIDEO EXTENSIONS -*/ -#define VIDEO_FORMAT_RGB_INDEXED 0x0000 -#define VIDEO_FORMAT_RGB_DIRECTCOLOR 0x0001 -#define VIDEO_FORMAT_YUYV_4_4_4 0x0010 -#define VIDEO_FORMAT_YUYV_4_2_2 0x0011 - -typedef struct { -void *address;/* Address of framebuffer */ -ushort width;/* Horizontal resolution */ -ushort height;/* Vertical resolution */ -uchar format;/* Format */ -uchar colors;/* Colors number or color depth */ -void (*setcolreg) (int ,int ,int ,int ); -void (*getcolreg) (int ,void *); -}video_ext_t ; - -/* * VARIABLES */ extern struct stdio_dev *stdio_devices[];
Signature · 1 line
2.7.4
PATCH v2 1/2 stdio_dev.h: Drop the video section as it is unused
Quoted 8 lines · Tom Rini
With tighter build flags the fact that this header referenced uchar/ushort without including what typedefs it causes an error. Rather than add another include here, drop the section in question as it is unused.
Reported-by Peter Robinson <[email protected]>Tested-by Peter Robinson <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180506/e72346ac/attachment.sig>
PATCH v2 2/2 stdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directly
In reply to Tom RiniWith tighter build flags the fact that <stdio_dev.h> doesn't have a reference back to MAX_NAMES causes an error. Include <stdio.h> here and then in common/console.c use MAX_NAMES rather than 3 when working with stdio_names.
---
Changes in v2:
- New patch
--- common/console.c | 4 ++-- include/stdio_dev.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
common/console.c +2 -2
@@ -847,7 +847,7 @@ done:#ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE /* set the environment variables (will overwrite previous env settings) */ -for (i =0 ; i <3 ; i++) { +for (i =0 ; i <MAX_NAMES ; i++) {env_set (stdio_names[i], stdio_devices[i]->name); }#endif /* CONFIG_SYS_CONSOLE_ENV_OVERWRITE */
@@ -926,7 +926,7 @@ int console_init_r(void)#endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ /* Setting environment variables */ -for (i =0 ; i <3 ; i++) { +for (i =0 ; i <MAX_NAMES ; i++) {env_set (stdio_names[i], stdio_devices[i]->name); }
include/stdio_dev.h +1 -0
@@ -8,6 +8,7 @@#ifndef _STDIO_DEV_H_#define _STDIO_DEV_H_ +#include <stdio.h> #include <linux/list.h> /*
Signature · 1 line
2.7.4
PATCH v2 2/2 stdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directly
Quoted 20 lines · Tom Rini
With tighter build flags the fact that <
stdio_dev.h> doesn't have a reference back toMAX_NAMEScauses an error. Include <stdio.h> here and then incommon/console.cuseMAX_NAMESrather than 3 when working withstdio_names.Reported-by Peter Robinson <[email protected]>Signed-off-by Tom Rini <[email protected]>---
Changes in v2:
- New patch--- common/console.c | 4 ++-- include/stdio_dev.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)common/console.c +0
-0
common/console.c done: · line 850
Quoted 5 lines
common/console.c +1
-1@@ -847,7 +847,7 @@ done:#ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE /* set the environment variables (will overwrite previous env settings) */ -for (i =0 ; i <3 ; i++) { +for (i =0 ; i <MAX_NAMES ; i++) {
I think you mean MAX_FILES? With MAX_NAMES it fails, with MAX_FILES it builds.
With the that change, if it's correct:
Quoted 31 lines
common/console.c +1
-1env_set(stdio_names[i], stdio_devices[i]->name); }#endif /* CONFIG_SYS_CONSOLE_ENV_OVERWRITE */ @@ -926,7 +926,7 @@ int console_init_r(void)#endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ /* Setting environment variables */ -for (i =0 ; i <3 ; i++) { +for (i =0 ; i <MAX_NAMES ; i++) {env_set (stdio_names[i], stdio_devices[i]->name); }include/stdio_dev.h +1
-1@@ -8,6 +8,7 @@#ifndef _STDIO_DEV_H_#define _STDIO_DEV_H_ +#include <stdio.h> #include <linux/list.h> /* -- 2.7.4
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v2 2/2 stdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directly
Quoted 29 lines · Peter Robinson
Quoted 20 lines · Tom Rini
With tighter build flags the fact that <
stdio_dev.h> doesn't have a reference back toMAX_NAMEScauses an error. Include <stdio.h> here and then incommon/console.cuseMAX_NAMESrather than 3 when working withstdio_names.Reported-by Peter Robinson <[email protected]>Signed-off-by Tom Rini <[email protected]>---
Changes in v2:
- New patch--- common/console.c | 4 ++-- include/stdio_dev.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)common/console.c +0
-0common/console.c done: · line 850
Quoted 5 lines
common/console.c +1
-1@@ -847,7 +847,7 @@ done:#ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE /* set the environment variables (will overwrite previous env settings) */ -for (i =0 ; i <3 ; i++) { +for (i =0 ; i <MAX_NAMES ; i++) {I think you mean
MAX_FILES? WithMAX_NAMESit fails, withMAX_FILESit builds.
Quoted 2 lines
With the that change, if it's correct:
Tested-by Peter Robinson <[email protected]>
If anyone is wonder if I'll ever learn to not post something I quickly did and was sure it was right, the answer is no. But I don't push those changes out (on purpose) at least! I'll fix it up before merging, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180503/c20eeaff/attachment.sig>
PATCH v2 2/2 stdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directly
In reply to Tom RiniQuoted 8 lines · Tom Rini
With tighter build flags the fact that <
stdio_dev.h> doesn't have a reference back toMAX_NAMEScauses an error. Include <stdio.h> here and then incommon/console.cuseMAX_NAMESrather than 3 when working withstdio_names.Reported-by Peter Robinson <[email protected]>Signed-off-by Tom Rini <[email protected]>Tested-by Peter Robinson <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180506/70a8d7df/attachment.sig>