Message ID | 20210802143820.1150099-1-arnd@kernel.org (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1mAZ5K-00FmN3-7z; Mon, 02 Aug 2021 14:38:30 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234254AbhHBOih (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Mon, 2 Aug 2021 10:38:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:45194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233925AbhHBOie (ORCPT <rfc822;linux-media@vger.kernel.org>); Mon, 2 Aug 2021 10:38:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A9EE160E97; Mon, 2 Aug 2021 14:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627915105; bh=3ZYcZPQjEjSEHTb9HiRMek+879amZ+MVRhxp83xQ/aE=; h=From:To:Cc:Subject:Date:From; b=K15vMR6aQfsjYku1iI3zkke3uUJv9wqJwhmpNAzgXCJuguiFVcHa7naHaxUlMY9Di 5CDEm7Pyzfde09ceAUVOmYZ1JvLGJquVpTnLySEaxY2U5Uyd+rS46oIMi0vj7hgOmC IkVNgkQVTe85/PKOoOutEN4/t9KhN3E0erRJGitAuXI2Dg/G49ESf3WSedqTfNy4WS aRLd1JOU+1zrlFr+fDXLiqQEiZs/rsehYRSuWMw4i97dmxhSZeL+G/YK+UUNx+tCqQ gecn7oSAdyXjP1y50j0kaRYp/bRAyDIxEtOdlEsHFQh1w8GSiMxOWMwe9f7S17q9TJ j6k4hXj4cRgzQ== From: Arnd Bergmann <arnd@kernel.org> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Pavel Skripkin <paskripkin@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de>, Sakari Ailus <sakari.ailus@linux.intel.com>, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] media: atomisp: restore missing 'return' statement Date: Mon, 2 Aug 2021 16:38:14 +0200 Message-Id: <20210802143820.1150099-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -3.8 (---) X-LSpam-Report: No, score=-3.8 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DKIM_VALID_EF=-0.1,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_LOW=-0.7 autolearn=ham autolearn_force=no |
Series |
media: atomisp: restore missing 'return' statement
|
|
Commit Message
Arnd Bergmann
Aug. 2, 2021, 2:38 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> The input_system_configure_channel_sensor() function lost its final return code in a previous patch: drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor': drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type] Restore what was there originally. Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 2 ++ 1 file changed, 2 insertions(+)
Comments
On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The input_system_configure_channel_sensor() function lost its final > return code in a previous patch: > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor': > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type] > > Restore what was there originally. > > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Thanks! Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The input_system_configure_channel_sensor() function lost its final > return code in a previous patch: > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor': > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type] > > Restore what was there originally. > > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> I hit this too. Thanks! Reviewed-by: Kees Cook <keescook@chromium.org> -Kees > --- > .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c > index 8e085dda0c18..712e01c37870 100644 > --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c > +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c > @@ -1646,6 +1646,8 @@ static input_system_err_t input_system_configure_channel_sensor( > default: > return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED; > } > + > + return INPUT_SYSTEM_ERR_NO_ERROR; > } > > // Test flags and set structure. > -- > 2.29.2 >
On Fri, Aug 13, 2021 at 7:39 PM Kees Cook <keescook@chromium.org> wrote: > > On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > > > The input_system_configure_channel_sensor() function lost its final > > return code in a previous patch: > > > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor': > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type] > > > > Restore what was there originally. > > > > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code") > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > I hit this too. Thanks! > > Reviewed-by: Kees Cook <keescook@chromium.org> Me too, Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Pavel, how have you tested it?
On 8/19/21 8:24 PM, Andy Shevchenko wrote: > On Fri, Aug 13, 2021 at 7:39 PM Kees Cook <keescook@chromium.org> wrote: >> >> On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote: >> > From: Arnd Bergmann <arnd@arndb.de> >> > >> > The input_system_configure_channel_sensor() function lost its final >> > return code in a previous patch: >> > >> > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor': >> > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type] >> > >> > Restore what was there originally. >> > >> > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code") >> > Signed-off-by: Arnd Bergmann <arnd@arndb.de> >> >> I hit this too. Thanks! >> >> Reviewed-by: Kees Cook <keescook@chromium.org> > > Me too, > Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com> > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > > Pavel, how have you tested it? > To he honest, I didn't test it at all. It was part of application processes to LFX mentoship. I really don't like style changes. Anyway, I have to do it to pass the task, so, yeah, I messed up with this one ;( Also, I didn't notice when patch was applied, because I was like 2 month after v3 posted. I am so sorry for this situation. Nowadays I always test my patches. I was young and foolish :) With regards, Pavel Skripkin
On Thu, Aug 19, 2021 at 08:24:11PM +0300, Andy Shevchenko wrote: > On Fri, Aug 13, 2021 at 7:39 PM Kees Cook <keescook@chromium.org> wrote: > > > > On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote: > > > From: Arnd Bergmann <arnd@arndb.de> > > > > > > The input_system_configure_channel_sensor() function lost its final > > > return code in a previous patch: > > > > > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor': > > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type] > > > > > > Restore what was there originally. > > > > > > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code") > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > > > I hit this too. Thanks! > > > > Reviewed-by: Kees Cook <keescook@chromium.org> > > Me too, > Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com> > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Mauro, are you able to get this into your tree, please? Or Greg? It's in staging. :) This is breaking the build.
Em Fri, 20 Aug 2021 22:53:37 -0700 Kees Cook <keescook@chromium.org> escreveu: > On Thu, Aug 19, 2021 at 08:24:11PM +0300, Andy Shevchenko wrote: > > On Fri, Aug 13, 2021 at 7:39 PM Kees Cook <keescook@chromium.org> wrote: > > > > > > On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote: > > > > From: Arnd Bergmann <arnd@arndb.de> > > > > > > > > The input_system_configure_channel_sensor() function lost its final > > > > return code in a previous patch: > > > > > > > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor': > > > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type] > > > > > > > > Restore what was there originally. > > > > > > > > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code") > > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > > > > > I hit this too. Thanks! > > > > > > Reviewed-by: Kees Cook <keescook@chromium.org> > > > > Me too, > > Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com> > > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > > Mauro, are you able to get this into your tree, please? Or Greg? It's in > staging. :) This is breaking the build. Didn't notice it was breaking the build for you. Patch applied, thanks! Thanks, Mauro
On 02-08-2021 20:08, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The input_system_configure_channel_sensor() function lost its final > return code in a previous patch: > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor': > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type] > > Restore what was there originally. > > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c > index 8e085dda0c18..712e01c37870 100644 > --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c > +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c > @@ -1646,6 +1646,8 @@ static input_system_err_t input_system_configure_channel_sensor( > default: > return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED; > } > + > + return INPUT_SYSTEM_ERR_NO_ERROR; I would recommend to return "status" instead of INPUT_SYSTEM_ERR_NO_ERROR, this will take care of sending correct return code, we encounter in different case statements. Something like below would be better. Thanks. - return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED; + status = INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED; } + return status; Regards, ~Praveen.
On 24-09-2021 17:01, Praveen Kumar wrote: > On 02-08-2021 20:08, Arnd Bergmann wrote: >> From: Arnd Bergmann <arnd@arndb.de> >> >> The input_system_configure_channel_sensor() function lost its final >> return code in a previous patch: >> >> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor': >> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type] >> >> Restore what was there originally. >> >> Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code") >> Signed-off-by: Arnd Bergmann <arnd@arndb.de> >> --- >> .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c >> index 8e085dda0c18..712e01c37870 100644 >> --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c >> +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c >> @@ -1646,6 +1646,8 @@ static input_system_err_t input_system_configure_channel_sensor( >> default: >> return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED; >> } >> + >> + return INPUT_SYSTEM_ERR_NO_ERROR; > > I would recommend to return "status" instead of INPUT_SYSTEM_ERR_NO_ERROR, > this will take care of sending correct return code, we encounter in different case statements. > Something like below would be better. Thanks. > > - return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED; > + status = INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED; > } > + return status; Please ignore this comment. My bad, we don't reach anytime here during failure. Regards, ~Praveen.
diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c index 8e085dda0c18..712e01c37870 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c @@ -1646,6 +1646,8 @@ static input_system_err_t input_system_configure_channel_sensor( default: return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED; } + + return INPUT_SYSTEM_ERR_NO_ERROR; } // Test flags and set structure.