microblaze: Correct build error in eth-uclass.c
Subsystems (2)
PATCH 1/6 microblaze: Correct build error in eth-uclass.c
This fixes the following error when building microblaze-generic:
net/eth-uclass.c: In function 'eth_post_probe':net/eth-uclass.c:466:18: error: 'gd' undeclared (first use in this function)
ops->start += gd->reloc_off;
---
net/eth-uclass.c | 2 ++ 1 file changed, 2 insertions(+)
net/eth-uclass.c +2 -0
@@ -14,6 +14,8 @@#include <dm/uclass-internal.h> #include "eth_internal.h" +DECLARE_GLOBAL_DATA_PTR ; +/** * struct eth_device_priv - private structure for each Ethernet device *
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 2/6 cmd: Fix control bmp_display()
All paths should share the same return.
---
cmd/bmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
cmd/bmp.c +1 -2
@@ -259,7 +259,6 @@ int bmp_display(ulong addr, int x, int y) ret = video_bmp_display(dev, addr, x, y, align); } } -return ret ?CMD_RET_FAILURE :0 ;#elif defined(CONFIG_LCD) ret =lcd_display_bitmap (addr, x, y);#elif defined(CONFIG_VIDEO)
@@ -271,5 +270,5 @@ int bmp_display(ulong addr, int x, int y)if (bmp_alloc_addr)free (bmp_alloc_addr); -return ret; +return ret ?CMD_RET_FAILURE :0 ; }
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 2/6 cmd: Fix control bmp_display()
Quoted 5 lines · Simon Glass
All paths should share the same return.
Reported-by Coverity (CID:134903)Signed-off-by Simon Glass <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160201/9150b8bc/attachment.sig>
PATCH 2/6 cmd: Fix control bmp_display()
In reply to Simon GlassQuoted 9 lines · On Sat, 30 Jan 2016 15:45:15 -0700 Simon Glass sjg at chromium.org wrote:
All paths should share the same return.
Reported-by Coverity (CID:134903)Signed-off-by Simon Glass <[email protected]>---
cmd/bmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
applied to u-boot-staging, thanks!
--
Anatolij
PATCH 3/6 video: Use 'int' for loop variables instead of short
In reply to Simon GlassUsing short doesn't save anything and is confusing when the width and height variables are ulong.
This may fix Coverity CID134902 but I doubt it.
---
drivers/video/video_bmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/video_bmp.c +1 -1
@@ -194,7 +194,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, {struct video_priv *priv =dev_get_uclass_priv (dev);ushort *cmap_base =NULL ; -ushort i, j; +int i, j;uchar *fb;struct bmp_image *bmp =map_sysmem (bmp_image,0 );uchar *bmap;
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 3/6 video: Use 'int' for loop variables instead of short
Quoted 4 lines · Simon Glass
Using short doesn't save anything and is confusing when the width and height variables are ulong.
This may fix Coverity CID134902 but I doubt it.
It won't, that CID wants height to be sanity checked as it comes from an external source and we don't make sure it has a valid value, as far as coverity thinks at least. If you're happy with:
if ((x + width) > pwidth)
width = pwidth - x;
if ((y + height) > priv->ysize)
height = priv->ysize - y;Being sufficient sanity checking on both, I can close the defect out as a false positive. Thanks!
Quoted 2 lines
Signed-off-by Simon Glass <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160201/49f48a07/attachment.sig>
PATCH 3/6 video: Use 'int' for loop variables instead of short
In reply to Simon GlassQuoted 10 lines · On Sat, 30 Jan 2016 15:45:16 -0700 Simon Glass sjg at chromium.org wrote:
Using short doesn't save anything and is confusing when the width and height variables are ulong.
This may fix Coverity CID134902 but I doubt it.
Signed-off-by Simon Glass <[email protected]>---
drivers/video/video_bmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
applied to u-boot-staging, thanks!
--
Anatolij
PATCH 4/6 video: test: Adjust order of file closure
In reply to Simon GlassClose the file earlier to hopefully fix a Coverity error.
---
test/dm/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
test/dm/video.c +1 -1
@@ -249,9 +249,9 @@ static int read_file(struct unit_test_state *uts, const char *fname, fd =os_open (fname,OS_O_RDONLY );ut_assert (fd >=0 ); size =os_read (fd, buf, buf_size); +os_close (fd);ut_assert (size >=0 );ut_assert (size < buf_size); -os_close (fd); *addrp = addr;return 0 ;
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 4/6 video: test: Adjust order of file closure
Quoted 5 lines · Simon Glass
Close the file earlier to hopefully fix a Coverity error.
Reported-by Coverity (CID: 134901)Signed-off-by Simon Glass <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160201/a810f9b5/attachment.sig>
PATCH 4/6 video: test: Adjust order of file closure
In reply to Simon GlassQuoted 9 lines · On Sat, 30 Jan 2016 15:45:17 -0700 Simon Glass sjg at chromium.org wrote:
Close the file earlier to hopefully fix a Coverity error.
Reported-by Coverity (CID: 134901)Signed-off-by Simon Glass <[email protected]>---
test/dm/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
applied to u-boot-staging, thanks!
--
Anatolij
PATCH 5/6 bzlib: Try another way to fix an unused variable
In reply to Simon GlassUse __maybe_unused which should avoid the Coverity error.
---
lib/bzip2/bzlib_compress.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
lib/bzip2/bzlib_compress.c +3 -4
@@ -67,7 +67,7 @@*/ #include "bzlib_private.h" - +#include <compiler.h> /*---------------------------------------------------*/ /*--- Bit stream I/O ---*/
@@ -280,7 +280,8 @@ void sendMTFValues ( EState* s ) {Int32 v, t, i, j, gs, ge, totc, bt, bc, iter;Int32 nSelectors, alphaSize, minLen, maxLen, selCtr; -Int32 nGroups, nBytes; +Int32 nGroups; +Int32 nBytes__maybe_unused ;/*-- UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
@@ -635,8 +636,6 @@ void sendMTFValues ( EState* s )if (s->verbosity >=3 )VPrintf1 ("codes %d\n" , s->numZ-nBytes ); -else /* squash compiler 'used but not set' warning */ - nBytes = nBytes; }
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 5/6 bzlib: Try another way to fix an unused variable
Quoted 5 lines · Simon Glass
Use
__maybe_unusedwhich should avoid the Coverity error.Reported-by Coverity (CID: 134900)Signed-off-by Simon Glass <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160201/e711865a/attachment.sig>
PATCH 5/6 bzlib: Try another way to fix an unused variable
In reply to Simon GlassQuoted 9 lines · On Sat, 30 Jan 2016 15:45:18 -0700 Simon Glass sjg at chromium.org wrote:
Use
__maybe_unusedwhich should avoid the Coverity error.Reported-by Coverity (CID: 134900)Signed-off-by Simon Glass <[email protected]>---
lib/bzip2/bzlib_compress.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
applied to u-boot-staging, thanks!
--
Anatolij
PATCH 6/6 rockchip: Drop old CONFIG_VIDEO_ROTATION option
In reply to Simon GlassThe option was renamed to CONFIG_CONSOLE_ROTATION and Rockchip boards were not updated. However this option is is not needed by default for Rockchip since we don't need a rotated console for current boards. So just remove the old option.
---
configs/chromebook_jerry_defconfig | 1 - configs/firefly-rk3288_defconfig | 1 - configs/rock2_defconfig | 1 - 3 files changed, 3 deletions(-)
configs/chromebook_jerry_defconfig +0 -1
@@ -57,7 +57,6 @@ CONFIG_ROCKCHIP_SPI=y CONFIG_DM_VIDEO=y CONFIG_I2C_EDID=y CONFIG_DISPLAY=y -CONFIG_VIDEO_ROTATION=y CONFIG_VIDEO_ROCKCHIP=y CONFIG_USE_PRIVATE_LIBGCC=y CONFIG_USE_TINY_PRINTF=y
configs/firefly-rk3288_defconfig +0 -1
@@ -49,7 +49,6 @@ CONFIG_SYS_NS16550=y CONFIG_DM_VIDEO=y CONFIG_I2C_EDID=y CONFIG_DISPLAY=y -CONFIG_VIDEO_ROTATION=y CONFIG_VIDEO_ROCKCHIP=y CONFIG_USE_PRIVATE_LIBGCC=y CONFIG_USE_TINY_PRINTF=y
configs/rock2_defconfig +0 -1
@@ -47,7 +47,6 @@ CONFIG_SYS_NS16550=y CONFIG_DM_VIDEO=y CONFIG_I2C_EDID=y CONFIG_DISPLAY=y -CONFIG_VIDEO_ROTATION=y CONFIG_VIDEO_ROCKCHIP=y CONFIG_USE_PRIVATE_LIBGCC=y CONFIG_USE_TINY_PRINTF=y
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 6/6 rockchip: Drop old CONFIG_VIDEO_ROTATION option
Quoted 6 lines · Simon Glass
The option was renamed to
CONFIG_CONSOLE_ROTATIONand Rockchip boards were not updated. However this option is is not needed by default for Rockchip since we don't need a rotated console for current boards. So just remove the old option.Signed-off-by Simon Glass <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160201/68f7d8ce/attachment.sig>
PATCH 6/6 rockchip: Drop old CONFIG_VIDEO_ROTATION option
In reply to Simon GlassQuoted 5 lines · On Sat, 30 Jan 2016 15:45:19 -0700 Simon Glass sjg at chromium.org wrote:
The option was renamed to
CONFIG_CONSOLE_ROTATIONand Rockchip boards were not updated. However this option is is not needed by default for Rockchip since we don't need a rotated console for current boards. So just remove the old option.
Quoted 7 lines
Signed-off-by Simon Glass <[email protected]>---
configs/chromebook_jerry_defconfig | 1 - configs/firefly-rk3288_defconfig | 1 - configs/rock2_defconfig | 1 - 3 files changed, 3 deletions(-)
applied to u-boot-staging, thanks!
--
Anatolij
PATCH 1/6 microblaze: Correct build error in eth-uclass.c
In reply to Simon GlassHi Simon,
Quoted 10 lines · Simon Glass
This fixes the following error when building microblaze-generic:
net/eth-uclass.c: In function 'eth_post_probe':net/eth-uclass.c:466:18: error: 'gd' undeclared (first use in this function)ops->start += gd->reloc_off;Fixes db9391e1 ("net: Move driver-model code into its own file")Signed-off-by Simon Glass <[email protected]>---
That didn't show up in my regression build test because microblaze was already broken for me.
PATCH 1/6 microblaze: Correct build error in eth-uclass.c
In reply to Simon GlassHi Simon,
Quoted 6 lines · On Sat, 30 Jan 2016 15:45:14 -0700 Simon Glass sjg at chromium.org wrote:
This fixes the following error when building microblaze-generic:
net/eth-uclass.c: In function 'eth_post_probe':net/eth-uclass.c:466:18: error: 'gd' undeclared (first use in this function)ops->start += gd->reloc_off;
Quoted 7 lines
Fixes db9391e1 ("net: Move driver-model code into its own file")Signed-off-by Simon Glass <[email protected]>---
net/eth-uclass.c | 2 ++ 1 file changed, 2 insertions(+)
Applied to u-boot-staging, thanks!
--
Anatolij