From: Colin Ian King <colin.king@canonical.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Fabien Dessenne <fabien.dessenne@st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [media] bdisp: remove redundant assignment to pix
Date: Sun, 29 Oct 2017 13:37:23 +0000 [thread overview]
Message-ID: <7324ffb7-56d9-0f3a-46a8-c5b4be0b452b@canonical.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1710292129380.2004@hadrien>
On 29/10/17 13:30, Julia Lawall wrote:
>
>
> On Sun, 29 Oct 2017, 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 redundant second
>> 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 | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
>> index 939da6da7644..14e99aeae140 100644
>> --- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
>> +++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
>> @@ -731,7 +731,6 @@ static int bdisp_g_fmt(struct file *file, void *fh, struct v4l2_format *f)
>> return PTR_ERR(frame);
>> }
>>
>> - pix = &f->fmt.pix;
>
> Why not keep this one and drop the first one? Maybe it would be nice to
> keep all the initializations related to pix together?
Good point. Will send a V2.
>
> julia
>
>> pix->width = frame->width;
>> pix->height = frame->height;
>> pix->pixelformat = frame->fmt->pixelformat;
>> --
>> 2.14.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
prev parent reply other threads:[~2017-10-29 13:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-29 13:21 Colin King
2017-10-29 13:30 ` Julia Lawall
2017-10-29 13:37 ` Colin Ian King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7324ffb7-56d9-0f3a-46a8-c5b4be0b452b@canonical.com \
--to=colin.king@canonical.com \
--cc=fabien.dessenne@st.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®