From patchwork Sat May 8 23:56:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martiros Shakhzadyan X-Patchwork-Id: 12246285 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 318A2C433ED for ; Sun, 9 May 2021 00:02:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08BD56100C for ; Sun, 9 May 2021 00:02:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229732AbhEIADB (ORCPT ); Sat, 8 May 2021 20:03:01 -0400 Received: from mslow1.mail.gandi.net ([217.70.178.240]:42249 "EHLO mslow1.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbhEIADA (ORCPT ); Sat, 8 May 2021 20:03:00 -0400 Received: from relay9-d.mail.gandi.net (unknown [217.70.183.199]) by mslow1.mail.gandi.net (Postfix) with ESMTP id C3E95C2EBF for ; Sat, 8 May 2021 23:53:01 +0000 (UTC) X-Originating-IP: 24.194.32.49 Received: from coplandos.local (cpe-24-194-32-49.nycap.res.rr.com [24.194.32.49]) (Authenticated sender: vrzh@vrzh.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id F2751FF80A; Sat, 8 May 2021 23:52:38 +0000 (UTC) From: Martiros Shakhzadyan To: Mauro Carvalho Chehab Cc: Martiros Shakhzadyan , Sakari Ailus , Hans Verkuil , linux-media@vger.kernel.org Subject: [PATCH 1/4] staging: media: atomisp: Resolve goto style issue in sh_css.c Date: Sat, 8 May 2021 19:56:19 -0400 Message-Id: <20210508235622.300394-2-vrzh@vrzh.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210508235622.300394-1-vrzh@vrzh.net> References: <20210508235622.300394-1-vrzh@vrzh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Change the goto label to lower case. Remove a space in the goto label. Signed-off-by: Martiros Shakhzadyan --- drivers/staging/media/atomisp/pci/sh_css.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index d26b1301eeb7..53c1001b807b 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -5170,7 +5170,7 @@ sh_css_pipe_get_grid_info(struct ia_css_pipe *pipe, if (binary) { err = ia_css_binary_3a_grid_info(binary, info, pipe); if (err) - goto ERR; + goto err; } else { memset(&info->s3a_grid, 0, sizeof(info->s3a_grid)); } @@ -5195,7 +5195,7 @@ sh_css_pipe_get_grid_info(struct ia_css_pipe *pipe, info->vamem_type = IA_CSS_VAMEM_TYPE_2; -ERR : +err: IA_CSS_LEAVE_ERR_PRIVATE(err); return err; } From patchwork Sat May 8 23:56:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martiros Shakhzadyan X-Patchwork-Id: 12246287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B8C9C433B4 for ; Sun, 9 May 2021 00:02:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01F6861421 for ; Sun, 9 May 2021 00:02:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229738AbhEIADH (ORCPT ); Sat, 8 May 2021 20:03:07 -0400 Received: from mslow1.mail.gandi.net ([217.70.178.240]:42997 "EHLO mslow1.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbhEIADG (ORCPT ); Sat, 8 May 2021 20:03:06 -0400 Received: from relay9-d.mail.gandi.net (unknown [217.70.183.199]) by mslow1.mail.gandi.net (Postfix) with ESMTP id C2B76C192C for ; Sat, 8 May 2021 23:53:05 +0000 (UTC) X-Originating-IP: 24.194.32.49 Received: from coplandos.local (cpe-24-194-32-49.nycap.res.rr.com [24.194.32.49]) (Authenticated sender: vrzh@vrzh.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 598A4FF809; Sat, 8 May 2021 23:52:43 +0000 (UTC) From: Martiros Shakhzadyan To: Mauro Carvalho Chehab Cc: Martiros Shakhzadyan , Sakari Ailus , Hans Verkuil , linux-media@vger.kernel.org Subject: [PATCH 2/4] staging: media: atomisp: Remove unnecessary parens in sh_css.c Date: Sat, 8 May 2021 19:56:20 -0400 Message-Id: <20210508235622.300394-3-vrzh@vrzh.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210508235622.300394-1-vrzh@vrzh.net> References: <20210508235622.300394-1-vrzh@vrzh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Remove unnecessary parenthesis. Signed-off-by: Martiros Shakhzadyan --- drivers/staging/media/atomisp/pci/sh_css.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index 53c1001b807b..51fe939a8958 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -10162,7 +10162,7 @@ ia_css_stop_sp(void) timeout--; udelay(1); } - if ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_TERMINATED)) + if (ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_TERMINATED) IA_CSS_WARNING("SP has not terminated (SW)"); if (timeout == 0) { From patchwork Sat May 8 23:56:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martiros Shakhzadyan X-Patchwork-Id: 12246289 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE3B5C433B4 for ; Sun, 9 May 2021 00:02:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E948613EC for ; Sun, 9 May 2021 00:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229673AbhEIADd (ORCPT ); Sat, 8 May 2021 20:03:33 -0400 Received: from mslow1.mail.gandi.net ([217.70.178.240]:37889 "EHLO mslow1.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbhEIADc (ORCPT ); Sat, 8 May 2021 20:03:32 -0400 Received: from relay9-d.mail.gandi.net (unknown [217.70.183.199]) by mslow1.mail.gandi.net (Postfix) with ESMTP id C6CC8C3374 for ; Sat, 8 May 2021 23:53:08 +0000 (UTC) X-Originating-IP: 24.194.32.49 Received: from coplandos.local (cpe-24-194-32-49.nycap.res.rr.com [24.194.32.49]) (Authenticated sender: vrzh@vrzh.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 4B396FF80C; Sat, 8 May 2021 23:52:46 +0000 (UTC) From: Martiros Shakhzadyan To: Mauro Carvalho Chehab Cc: Martiros Shakhzadyan , Sakari Ailus , Hans Verkuil , linux-media@vger.kernel.org Subject: [PATCH 3/4] staging: media: atomisp: Use kcalloc instead of kzalloc with multiply in sh_css.c Date: Sat, 8 May 2021 19:56:21 -0400 Message-Id: <20210508235622.300394-4-vrzh@vrzh.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210508235622.300394-1-vrzh@vrzh.net> References: <20210508235622.300394-1-vrzh@vrzh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use kcalloc instead of kzalloc with multiplication. Signed-off-by: Martiros Shakhzadyan --- drivers/staging/media/atomisp/pci/sh_css.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index 51fe939a8958..b8dd817616e8 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -5328,14 +5328,15 @@ static int load_video_binaries(struct ia_css_pipe *pipe) if (err) return err; mycs->num_yuv_scaler = cas_scaler_descr.num_stage; - mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage * - sizeof(struct ia_css_binary), GFP_KERNEL); + mycs->yuv_scaler_binary = kcalloc(cas_scaler_descr.num_stage, + sizeof(struct ia_css_binary), + GFP_KERNEL); if (!mycs->yuv_scaler_binary) { err = -ENOMEM; return err; } - mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage - * sizeof(bool), GFP_KERNEL); + mycs->is_output_stage = kcalloc(cas_scaler_descr.num_stage, + sizeof(bool), GFP_KERNEL); if (!mycs->is_output_stage) { err = -ENOMEM; return err; @@ -5938,14 +5939,15 @@ static int load_primary_binaries( return err; } mycs->num_yuv_scaler = cas_scaler_descr.num_stage; - mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage * - sizeof(struct ia_css_binary), GFP_KERNEL); + mycs->yuv_scaler_binary = kcalloc(cas_scaler_descr.num_stage, + sizeof(struct ia_css_binary), + GFP_KERNEL); if (!mycs->yuv_scaler_binary) { err = -ENOMEM; IA_CSS_LEAVE_ERR_PRIVATE(err); return err; } - mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage * + mycs->is_output_stage = kcalloc(cas_scaler_descr.num_stage, sizeof(bool), GFP_KERNEL); if (!mycs->is_output_stage) { err = -ENOMEM; @@ -6989,14 +6991,14 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe) goto ERR; mycs->num_output = cas_scaler_descr.num_output_stage; mycs->num_yuv_scaler = cas_scaler_descr.num_stage; - mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage * + mycs->yuv_scaler_binary = kcalloc(cas_scaler_descr.num_stage, sizeof(struct ia_css_binary), GFP_KERNEL); if (!mycs->yuv_scaler_binary) { err = -ENOMEM; goto ERR; } - mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage * + mycs->is_output_stage = kcalloc(cas_scaler_descr.num_stage, sizeof(bool), GFP_KERNEL); if (!mycs->is_output_stage) { err = -ENOMEM; @@ -7097,7 +7099,7 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe) mycs->num_vf_pp = 1; } - mycs->vf_pp_binary = kzalloc(mycs->num_vf_pp * + mycs->vf_pp_binary = kcalloc(mycs->num_vf_pp, sizeof(struct ia_css_binary), GFP_KERNEL); if (!mycs->vf_pp_binary) { From patchwork Sat May 8 23:56:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martiros Shakhzadyan X-Patchwork-Id: 12246291 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A61CBC433B4 for ; Sun, 9 May 2021 00:02:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85D29613EC for ; Sun, 9 May 2021 00:02:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229675AbhEIADl (ORCPT ); Sat, 8 May 2021 20:03:41 -0400 Received: from mslow1.mail.gandi.net ([217.70.178.240]:45813 "EHLO mslow1.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbhEIADl (ORCPT ); Sat, 8 May 2021 20:03:41 -0400 Received: from relay9-d.mail.gandi.net (unknown [217.70.183.199]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 9F63FC0332 for ; Sat, 8 May 2021 23:53:11 +0000 (UTC) X-Originating-IP: 24.194.32.49 Received: from coplandos.local (cpe-24-194-32-49.nycap.res.rr.com [24.194.32.49]) (Authenticated sender: vrzh@vrzh.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 21290FF80B; Sat, 8 May 2021 23:52:48 +0000 (UTC) From: Martiros Shakhzadyan To: Mauro Carvalho Chehab Cc: Martiros Shakhzadyan , Sakari Ailus , Hans Verkuil , linux-media@vger.kernel.org Subject: [PATCH 4/4] staging: media: atomisp: Fix line continuation style issue in sh_css.c Date: Sat, 8 May 2021 19:56:22 -0400 Message-Id: <20210508235622.300394-5-vrzh@vrzh.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210508235622.300394-1-vrzh@vrzh.net> References: <20210508235622.300394-1-vrzh@vrzh.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix logical continuation style issue and adjacent line splits. Signed-off-by: Martiros Shakhzadyan --- drivers/staging/media/atomisp/pci/sh_css.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index b8dd817616e8..5dac4a506b00 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -3224,24 +3224,22 @@ init_vf_frameinfo_defaults(struct ia_css_pipe *pipe, #ifdef ISP2401 static unsigned int -get_crop_lines_for_bayer_order( - const struct ia_css_stream_config *config) +get_crop_lines_for_bayer_order(const struct ia_css_stream_config *config) { assert(config); - if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_BGGR) - || (config->input_config.bayer_order == IA_CSS_BAYER_ORDER_GBRG)) + if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_BGGR) || + (config->input_config.bayer_order == IA_CSS_BAYER_ORDER_GBRG)) return 1; return 0; } static unsigned int -get_crop_columns_for_bayer_order( - const struct ia_css_stream_config *config) +get_crop_columns_for_bayer_order(const struct ia_css_stream_config *config) { assert(config); - if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_RGGB) - || (config->input_config.bayer_order == IA_CSS_BAYER_ORDER_GBRG)) + if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_RGGB) || + (config->input_config.bayer_order == IA_CSS_BAYER_ORDER_GBRG)) return 1; return 0;