On 2018-03-15 11:00, Kieran Bingham wrote:
> Simplify array iteration with a helper to iterate each entry in an array.
> Utilise the existing ARRAY_SIZE macro to identify the length of the array
> and pointer arithmetic to process each item as a for loop.
>
> Signed-off-by: Kieran Bingham
ibuf and rbuf in lme2510_int_response are always assigned to before they
are read, and their addresses do not escape the function, so they have
no reason to be static.
Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk>
---
drivers/media/usb/dvb-usb-v2/lmedm04.c | 2 +-
1 file chan
It takes more .text to initialize these on the stack than they occupy
in .rodata, so just make them static const.
Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk>
---
drivers/media/usb/dvb-usb-v2/lmedm04.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff
Using the %ph printf extension for hex dumps like this makes the
generated code quite a bit smaller.
Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk>
---
drivers/media/usb/dvb-usb-v2/lmedm04.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/u
gcc isn't smart enough to realize it can share most of the argument
buildup and the actual function call between the two branches, so help
it a little.
Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk>
---
drivers/media/usb/dvb-usb-v2/lmedm04.c | 5 +
1 file changed, 1 ins
Appending to a string by doing snprintf(buf, bufsize, "%s...", buf,
...) is not guaranteed to work.
Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk>
---
drivers/media/pci/zoran/videocodec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers
Passing overlapping source and destination to snprintf is
fragile. Replace with a single (mostly) equivalent call. If one wants
to preserve the space preceding udev->product whether or not there was
a manufacturer, just remove udev->manufacturer from the && expression.
Signed-
[media] exynos4-is: fix some warnings when compiling on
arm64")
Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk>
---
drivers/media/platform/exynos4-is/fimc-isp-video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/exynos4-is/f
This saves a little .text and removes the sizeof(...) style
inconsistency. Use sizeof(*state) in accordance with CodingStyle.
Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk>
---
drivers/media/dvb-frontends/drxd_hard.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
Both sides of these assignments actually have type const struct
vb2_mem_ops *, so the casts are unnecessary and slightly confusing.
Signed-off-by: Rasmus Villemoes li...@rasmusvillemoes.dk
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
Three trailing underscores is one too many.
Signed-off-by: Rasmus Villemoes li...@rasmusvillemoes.dk
---
drivers/media/common/b2c2/flexcop.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/common/b2c2/flexcop.h
b/drivers/media/common/b2c2/flexcop.h
index
Test for definedness of the macro which is actually defined, and which
matches the name of the file.
Signed-off-by: Rasmus Villemoes li...@rasmusvillemoes.dk
---
drivers/media/i2c/adv7343_regs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/adv7343_regs.h
, which is unlikely to be what was intended.
Signed-off-by: Rasmus Villemoes li...@rasmusvillemoes.dk
---
drivers/staging/media/omap4iss/iss.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/omap4iss/iss.h
b/drivers/staging/media/omap4iss/iss.h
index
13 matches
Mail list logo