* [PATCH][V2] bdisp: remove redundant assignment to pix
@ 2017-10-29 13:43 Colin King
2017-11-06 8:20 ` Fabien DESSENNE
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-10-29 13:43 UTC (permalink / raw)
To: Fabien Dessenne, Mauro Carvalho Chehab, linux-media
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer pix is being initialized to a value and a little later
being assigned the same value again. Remove the initial assignment to
avoid a duplicate assignment. Cleans up the clang warning:
drivers/media/platform/sti/bdisp/bdisp-v4l2.c:726:26: warning: Value
stored to 'pix' during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
index 939da6da7644..7e9ed9c7b3e1 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
@@ -723,7 +723,7 @@ static int bdisp_enum_fmt(struct file *file, void *fh, struct v4l2_fmtdesc *f)
static int bdisp_g_fmt(struct file *file, void *fh, struct v4l2_format *f)
{
struct bdisp_ctx *ctx = fh_to_ctx(fh);
- struct v4l2_pix_format *pix = &f->fmt.pix;
+ struct v4l2_pix_format *pix;
struct bdisp_frame *frame = ctx_get_frame(ctx, f->type);
if (IS_ERR(frame)) {
--
2.14.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][V2] bdisp: remove redundant assignment to pix
2017-10-29 13:43 [PATCH][V2] bdisp: remove redundant assignment to pix Colin King
@ 2017-11-06 8:20 ` Fabien DESSENNE
0 siblings, 0 replies; 2+ messages in thread
From: Fabien DESSENNE @ 2017-11-06 8:20 UTC (permalink / raw)
To: Colin King, Mauro Carvalho Chehab, linux-media
Cc: kernel-janitors, linux-kernel
Hi Colin
Thank you for the patch.
On 29/10/17 14:43, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer pix is being initialized to a value and a little later
> being assigned the same value again. Remove the initial assignment to
> avoid a duplicate assignment. Cleans up the clang warning:
>
> drivers/media/platform/sti/bdisp/bdisp-v4l2.c:726:26: warning: Value
> stored to 'pix' during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
> ---
> drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> index 939da6da7644..7e9ed9c7b3e1 100644
> --- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> +++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> @@ -723,7 +723,7 @@ static int bdisp_enum_fmt(struct file *file, void *fh, struct v4l2_fmtdesc *f)
> static int bdisp_g_fmt(struct file *file, void *fh, struct v4l2_format *f)
> {
> struct bdisp_ctx *ctx = fh_to_ctx(fh);
> - struct v4l2_pix_format *pix = &f->fmt.pix;
> + struct v4l2_pix_format *pix;
> struct bdisp_frame *frame = ctx_get_frame(ctx, f->type);
>
> if (IS_ERR(frame)) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-06 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-29 13:43 [PATCH][V2] bdisp: remove redundant assignment to pix Colin King
2017-11-06 8:20 ` Fabien DESSENNE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®