From patchwork Thu Nov 11 23:08:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12615841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57A11C433EF for ; Thu, 11 Nov 2021 23:08:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2993561989 for ; Thu, 11 Nov 2021 23:08:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233397AbhKKXLr (ORCPT ); Thu, 11 Nov 2021 18:11:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:36576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbhKKXLr (ORCPT ); Thu, 11 Nov 2021 18:11:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5B14D61264; Thu, 11 Nov 2021 23:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636672137; bh=BZv1fF0+AcY1iLtidHAIxwHg9qlxdv8qhVKSQ4KvDz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pr1tms7Kx1mmFdm/wmEXegPssscXEbjV0xhD/QxAARbddRXeZEm/Q6J2Z6lodaM0r 3bxUNennqKa9gPS+Rva1+jfHaip19utgSemtdn+fq4YFPn1E8rk/dNYWESgMzNLhuL pRW7f9fLjFBgnNF9v5bDjwPVZaUT3YMY0W5+GCae+r+sjwTVuRPJol0nxOkBOKO463 5hT4bSzIBJo0X/WYVEfJPd19TX9XBvE0kjU9HnpDAdG4IdGIGO6x8miD4tWXYzGjEP YSNfxipBq9Tgrb7Ecrg9rhdo55HZZiVqabCCzeDZ89bK+t73ug+7PSd5KCv+A/Lh1+ x2w+lGKOhdaTg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mlJBe-000I78-38; Thu, 11 Nov 2021 23:08:54 +0000 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Bingbu Cao , Greg Kroah-Hartman , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Sakari Ailus , Tianshu Qiu , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, llvm@lists.linux.dev Subject: [PATCH 1/3] media: ipu3: drop an unused variable Date: Thu, 11 Nov 2021 23:08:51 +0000 Message-Id: <990224a5610af19f790d0ec2ebe0610e3b38cf00.1636672052.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix this clang Werror with W=1: drivers/staging/media/ipu3/ipu3-css-params.c:774:8: error: variable 'pin_scale' set but not used [-Werror,-Wunused-but-set-variable] int pin_scale = 0; ^ Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor Acked-by: Sakari Ailus --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/3] at: https://lore.kernel.org/all/cover.1636672052.git.mchehab+huawei@kernel.org/ drivers/staging/media/ipu3/ipu3-css-params.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3-css-params.c b/drivers/staging/media/ipu3/ipu3-css-params.c index e9d6bd9e9332..d9e3c3785075 100644 --- a/drivers/staging/media/ipu3/ipu3-css-params.c +++ b/drivers/staging/media/ipu3/ipu3-css-params.c @@ -771,7 +771,6 @@ static int imgu_css_osys_calc_frame_and_stripe_params( */ { unsigned int i; - int pin_scale = 0; /*Input resolution */ stripe_params[s].input_width = stripe_input_width_y; @@ -791,8 +790,6 @@ static int imgu_css_osys_calc_frame_and_stripe_params( reso.pin_height[i]; stripe_params[s].output_offset[i] = stripe_offset_out_y; - - pin_scale += frame_params[i].scaled; } else { /* Unscaled pin */ stripe_params[s].output_width[i] = From patchwork Thu Nov 11 23:08:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12615845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC899C4332F for ; Thu, 11 Nov 2021 23:09:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C16B761179 for ; Thu, 11 Nov 2021 23:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234258AbhKKXLt (ORCPT ); Thu, 11 Nov 2021 18:11:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:36614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbhKKXLr (ORCPT ); Thu, 11 Nov 2021 18:11:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8C73F61381; Thu, 11 Nov 2021 23:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636672137; bh=MIxhXT3ImtBCjhjlAcsge8qOzD5vIYiIO6gv5yNL9vY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iHI3ac/cJCv9T4oqBROMDc3SWL1+THrHnmIrGDQqKlCh2GJb2MmDBTMhgZ0IkQ+6r SL2SLMZkgr9Qjyy+P/Hh1zfidVzPLyhJAdvDMXi4RTswEDuKpYaUgUBVrzQD/Gv1L+ 2ef9GqBedW7AYwfyXzxRNruO8MZdQNMAIugUnqy3IrPknEVWTpQgDV3sH2teOOncXl gp7vOlw1ynOV5zfz98jyI/b4nRp0hob+rc95g4ChKi29oSXqIeEbxT6yQThUndwHeo re3M1ZkgcQ8xYLQxhehKmWV1wsRiRl6mJJiwprHlNqcwmXGlqGyJMj8WV8KwpCFVnV ZPmcPF++OAsPA== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mlJBe-000I7B-3h; Thu, 11 Nov 2021 23:08:54 +0000 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Beatriz Martins de Carvalho , Deepak R Varma , Greg Kroah-Hartman , Hans Verkuil , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Sakari Ailus , Tom Rix , Tomi Valkeinen , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, llvm@lists.linux.dev Subject: [PATCH 2/3] media: atomisp-gc2235: drop an unused var Date: Thu, 11 Nov 2021 23:08:52 +0000 Message-Id: <81245e1273f2e0e96a520b9d00cd415f65d37b48.1636672052.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix this clang Werror with W=1: drivers/staging/media/atomisp/i2c/atomisp-gc2235.c:573:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable] int ret = -1; ^ Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/3] at: https://lore.kernel.org/all/cover.1636672052.git.mchehab+huawei@kernel.org/ drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index 5e7085264189..0e6b2e6100d1 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -570,14 +570,16 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag) static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) { struct gc2235_device *dev = to_gc2235_sensor(sd); - int ret = -1; + int ret; if (!dev || !dev->platform_data) return -ENODEV; - ret |= dev->platform_data->gpio1_ctrl(sd, !flag); + ret = dev->platform_data->gpio1_ctrl(sd, !flag); usleep_range(60, 90); - return dev->platform_data->gpio0_ctrl(sd, flag); + ret |= dev->platform_data->gpio0_ctrl(sd, flag); + + return ret; } static int power_up(struct v4l2_subdev *sd) From patchwork Thu Nov 11 23:08:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12615847 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94447C433F5 for ; Thu, 11 Nov 2021 23:09:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B37E6134F for ; Thu, 11 Nov 2021 23:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234214AbhKKXLt (ORCPT ); Thu, 11 Nov 2021 18:11:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:36630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230308AbhKKXLr (ORCPT ); Thu, 11 Nov 2021 18:11:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id ADD7D6162E; Thu, 11 Nov 2021 23:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636672137; bh=T4wr7TRf+TISBf7dovqtq8hbh8HWQzrGfXkIAf5Qr2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eQ+1VvyNJI2c3bfWG4FXckAxETzL1lovyiVThD3+BQsIZotOTn/T8x7Z2NIBFXC2h NAzr9Xp+w/MRoDqWNLOAVZSgNQZe6nPxXlJwmkddfRL2QPewwN4skE1G4Bo11s0OnS 8d/JZ3wZI8AH7sS/A0S0JJSsQ8A3ZplN6+NpdQSiIcT1PyEr3QRKomQcIyvjieQgDI lffSJ43VLqDmOvpXSJR8/kUVJHjUfdBO22rSkhdgHP5IP4iMnVaPB/xx8/T71oPkjg iDorgYaZqQj/XFDLvQZCZDCveQaAJfvOQEMg8YP364YzKOxwUePKLYjd71oxNgEK0a kffjd/eywQ73w== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mlJBe-000I7E-4E; Thu, 11 Nov 2021 23:08:54 +0000 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Deepak R Varma , Ding Xiang , Greg Kroah-Hartman , Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Robert Foss , Sakari Ailus , Yang Li , Zheng Yongjun , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, llvm@lists.linux.dev Subject: [PATCH 3/3] media: atomisp: handle errors at sh_css_create_isp_params() Date: Thu, 11 Nov 2021 23:08:53 +0000 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The succ var tracks memory allocation erros on this function. Fix it, in order to stop this W=1 Werror in clang: drivers/staging/media/atomisp/pci/sh_css_params.c:2430:7: error: variable 'succ' set but not used [-Werror,-Wunused-but-set-variable] bool succ = true; ^ Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Nathan Chancellor --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/3] at: https://lore.kernel.org/all/cover.1636672052.git.mchehab+huawei@kernel.org/ drivers/staging/media/atomisp/pci/sh_css_params.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c index dbd3bfe3d343..3cc5b82a8a31 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_params.c +++ b/drivers/staging/media/atomisp/pci/sh_css_params.c @@ -2473,6 +2473,10 @@ sh_css_create_isp_params(struct ia_css_stream *stream, succ &= (ddr_ptrs->macc_tbl != mmgr_NULL); *isp_params_out = params; + + if (!succ) + return -ENOMEM; + return err; }