Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759223AbcKCUyw (ORCPT ); Thu, 3 Nov 2016 16:54:52 -0400 Received: from mout.web.de ([212.227.17.12]:51088 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758079AbcKCUyu (ORCPT ); Thu, 3 Nov 2016 16:54:50 -0400 Subject: Re: [PATCH 10/34] [media] DaVinci-VPBE: Check return value of a setup_if_config() call in vpbe_set_output() To: Hans Verkuil , linux-media@vger.kernel.org References: <47590f2e-1cfa-582d-769e-502802171b66@users.sourceforge.net> Cc: Hans Verkuil , "Lad, Prabhakar" , Manjunath Hadli , Mauro Carvalho Chehab , LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <680a0feb-3748-da16-9b79-297e1ab9044d@users.sourceforge.net> Date: Thu, 3 Nov 2016 21:54:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:9wVWK2hCObTRJJC4pXUmtdBWwfjquWaFIOVZxmNZVUUq/ZYrc/M s7aXmqrfpJnpQSESfD6Zoj1z9plDRZ5YfiRmohLC0R+Vxlhlyy3V+VLiL5nTDzFOvr0ukCZ xh8O/D1SXP2Sfv4qaNqJvzFizlfhLMf0gIiQFHAWmQm39PnEfNC5yJodR5oYHLEiStvy6Dy IjwBjI3HucvioPGkcInsg== X-UI-Out-Filterresults: notjunk:1;V01:K0:tPi8lydzQc4=:Yjwxy9C5l3y3Cyl0/8THcO RbTkwTGc7RibU8lNOu2ETcnVxEd3rbVR8LTwQAHE1PL7P9DBP2ar3N0gVQUZ5ebEEM89s24nr w0rh3Tda8gIFlOyv8IeqXdwz2QEa9y5QHtXcoVSvE9T5ythazcjfORIvSQK0Gis/u+O9lE15f QKoy3X1CL3LNN/nwkqDzdKNjoPM1VQ2u2pa3EsHNUEDLI1ueAW9gbc7fGRuJ2F4HWJ1LB5R9E v5L/PtNI+WiFwdGOih5e+h308RtYmNRDgr8aqanrxDlExFE1USMmgIoE5Ed2HDwkOzFqWr9Lc dKx/uP/UyywU2xa6tzlr+Zz/Jgm5253IImKaMREThyKKqzPEfKwRwuadzIlbOTuc9EJCIWXNA oFGk5i+FVZ0FGowO2gNogFdBz2xB2rcM12yqxqx2PuufbtM+gRpu68Fc67Wy60si2L1WMuMOH 3+S2CYkaAl4dR6wFuhNt74jJzqe4+de33p5p/vqhRSRCtFHWPgFXDJvkrOuMuiF87ps3+zUlS /jqE1KkEKXBNbjMv/P/GoX2jAF2KKzsDTY5qj1MWaIpZbFEU1/07b1l6kY1WPvi6+Ew+dDfWc 9GWbdUjsxQaniW7MqxYNJAmZAeWnIOOz3xwnwxBrK+HhzYadzCBipkeR02AiPm304srblotEG yamMt+fnoSqn6ih2qKp1DHSm0glqcOtk2zvmC8fTeFRElM5cUsEP5zQ7WPlkt37qRFDLk866c rmhbyZyMc6oEae7VkCxer0xulKSrmzHFrfRRQFfyS7+EECoYMWec+YNQ+u2mZM2gAHJRLYKhO Ll2Q0ut Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2138 Lines: 59 >> From: Markus Elfring >> Date: Wed, 12 Oct 2016 09:56:56 +0200 >> >> * A function was called over the pointer "setup_if_config" in the data >> structure "venc_platform_data". But the return value was not used so far. >> Thus assign it to the local variable "ret" which will be checked with >> the next statement. >> >> Fixes: 9a7f95ad1c946efdd7a7a72df27db738260a0fd8 ("[media] davinci vpbe: add dm365 VPBE display driver changes") >> >> * Pass a value to this function call without storing it in an intermediate >> variable before. >> >> * Delete the local variable "if_params" which became unnecessary with >> this refactoring. >> >> Signed-off-by: Markus Elfring >> --- >> drivers/media/platform/davinci/vpbe.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c >> index 19611a2..6e7b0df 100644 >> --- a/drivers/media/platform/davinci/vpbe.c >> +++ b/drivers/media/platform/davinci/vpbe.c >> @@ -227,7 +227,6 @@ static int vpbe_set_output(struct vpbe_device *vpbe_dev, int index) >> vpbe_current_encoder_info(vpbe_dev); >> struct vpbe_config *cfg = vpbe_dev->cfg; >> struct venc_platform_data *venc_device = vpbe_dev->venc_device; >> - u32 if_params; >> int enc_out_index; >> int sd_index; >> int ret = 0; >> @@ -257,8 +256,8 @@ static int vpbe_set_output(struct vpbe_device *vpbe_dev, int index) >> goto out; >> } >> >> - if_params = cfg->outputs[index].if_params; >> - venc_device->setup_if_config(if_params); >> + ret = venc_device->setup_if_config(cfg >> + ->outputs[index].if_params); > > Either keep this as one line Will you tolerate a line length of 82 characters then? > or keep the if_params temp variable. My proposal was to get rid of it. > This odd linebreak is ugly. I am curious on how the desired changes can be integrated after a couple of update suggestions were accepted from this patch series. Regards, Markus