2022-05-23 00:44:39

by Tom Rix

[permalink] [raw]
Subject: [PATCH] xen: remove setting of 'transp' parameter

cppcheck reports
[drivers/video/fbdev/xen-fbfront.c:226]: (style) Assignment of function parameter has no effect outside the function.

The value parameter 'transp' is not used, so setting it can be removed.

Signed-off-by: Tom Rix <[email protected]>
---
drivers/video/fbdev/xen-fbfront.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c
index 3bed357a9870..4d2694d904aa 100644
--- a/drivers/video/fbdev/xen-fbfront.c
+++ b/drivers/video/fbdev/xen-fbfront.c
@@ -223,7 +223,6 @@ static int xenfb_setcolreg(unsigned regno, unsigned red, unsigned green,
red = CNVT_TOHW(red, info->var.red.length);
green = CNVT_TOHW(green, info->var.green.length);
blue = CNVT_TOHW(blue, info->var.blue.length);
- transp = CNVT_TOHW(transp, info->var.transp.length);
#undef CNVT_TOHW

v = (red << info->var.red.offset) |
--
2.27.0



2022-05-23 07:45:30

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] xen: remove setting of 'transp' parameter

On Sun, May 22, 2022 at 3:22 AM Tom Rix <[email protected]> wrote:
> cppcheck reports
> [drivers/video/fbdev/xen-fbfront.c:226]: (style) Assignment of function parameter has no effect outside the function.
>
> The value parameter 'transp' is not used, so setting it can be removed.
>
> Signed-off-by: Tom Rix <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2022-05-23 08:23:55

by Jürgen Groß

[permalink] [raw]
Subject: Re: [PATCH] xen: remove setting of 'transp' parameter

On 21.05.22 21:59, Tom Rix wrote:
> cppcheck reports
> [drivers/video/fbdev/xen-fbfront.c:226]: (style) Assignment of function parameter has no effect outside the function.
>
> The value parameter 'transp' is not used, so setting it can be removed.
>
> Signed-off-by: Tom Rix <[email protected]>

Reviewed-by: Juergen Gross <[email protected]>


Juergen


Attachments:
OpenPGP_0xB0DE9DD628BF132F.asc (3.08 kB)
OpenPGP public key
OpenPGP_signature (505.00 B)
OpenPGP digital signature
Download all attachments

2022-05-25 19:41:32

by Helge Deller

[permalink] [raw]
Subject: Re: [PATCH] xen: remove setting of 'transp' parameter

On 5/21/22 21:59, Tom Rix wrote:
> cppcheck reports
> [drivers/video/fbdev/xen-fbfront.c:226]: (style) Assignment of function parameter has no effect outside the function.
>
> The value parameter 'transp' is not used, so setting it can be removed.
>
> Signed-off-by: Tom Rix <[email protected]>

applied to the fbdev tree.
Thanks!
Helge

> ---
> drivers/video/fbdev/xen-fbfront.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c
> index 3bed357a9870..4d2694d904aa 100644
> --- a/drivers/video/fbdev/xen-fbfront.c
> +++ b/drivers/video/fbdev/xen-fbfront.c
> @@ -223,7 +223,6 @@ static int xenfb_setcolreg(unsigned regno, unsigned red, unsigned green,
> red = CNVT_TOHW(red, info->var.red.length);
> green = CNVT_TOHW(green, info->var.green.length);
> blue = CNVT_TOHW(blue, info->var.blue.length);
> - transp = CNVT_TOHW(transp, info->var.transp.length);
> #undef CNVT_TOHW
>
> v = (red << info->var.red.offset) |