From patchwork Fri Oct 16 17:40:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 286200 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=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS 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 B42B8C433DF for ; Fri, 16 Oct 2020 17:40:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4407D208E4 for ; Fri, 16 Oct 2020 17:40:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Gw8JSSMc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389552AbgJPRkl (ORCPT ); Fri, 16 Oct 2020 13:40:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389037AbgJPRkl (ORCPT ); Fri, 16 Oct 2020 13:40:41 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AC6CC061755 for ; Fri, 16 Oct 2020 10:40:41 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id a200so1884416pfa.10 for ; Fri, 16 Oct 2020 10:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=Np+zW2GuhNLqLx1TqqXkHXVvHvxaPBCZz87T9F1IuLc=; b=Gw8JSSMcnYhmlGUrLsR+Lt2hgWI1pKAm5DuqJYG7p3UnOHE2QKRj2Wd1/54W1HcPKK edVif1RnRiCRZ01D6K7c484al0YPRNHoXKLXF6BkNFs704AD1oMWcuj4PfXsgb/fiMOd Hgc8v8knCLdU2JV/Ph64/wSbRDPfW0yciyl/F5iqZct5wGRjAxg5I8dtfPigbtKAafLv 4aDY2EJOmtnz8jd1aFcCQ3jRBvaFEKu9FCKKr+/rRu/gPbMLCeeIvZPzJ2tgPPpgB4VZ 0ElNV/50s13hD+r/SsbuY1CaAzl69Uk51O5K4E60NCdW6otGTJJC0IfN8tY28GCN6ZBF QuDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=Np+zW2GuhNLqLx1TqqXkHXVvHvxaPBCZz87T9F1IuLc=; b=ZmrPSKB/vha3jp/fdybh5P1bzkh69T1tkEGSJAtFMNfiBfM15/vgoyc5kVZ2V+C584 5DPUGyCvEXh7JoJvHpa8m5lEtkbPGOAqxJ6jDjWA8tL1Fd/TfvBtU7A0bKDFwmlDpVOB FWKwu7oByhmskh4iwd2n5TEmmRJPHdRu7OrX1Rv5j6dWgJvfcsLhOy0kJ4NOeTB8xONG V/SnUMM0E8fKGVWqG26q33jh2aliMm8gQC/fJlNXDgq8egml56mc9lKGzErxGMu8MxJW WTkWbHucfWXJejNE2U6mm7E5uRavuRoGCpT/BeEC8AmqrxwFOJmzvQ1RoHjjdAmsppKl JvZA== X-Gm-Message-State: AOAM532HpPZqjJLN9xOkEqTV3KiJTF3egFJ6EtipskKy7I6/euwf1t0Y Fir+brsH4eWZRutsX/9Q7UM= X-Google-Smtp-Source: ABdhPJwLzAXMwUXObasiQgmBY6+B76hw7yeSPBhLoc7MCzAX8Xxzt2prFvwQ+AAVkiLjm/1cEImiQQ== X-Received: by 2002:a62:80d4:0:b029:155:3225:6fc9 with SMTP id j203-20020a6280d40000b029015532256fc9mr4797706pfd.41.1602870040858; Fri, 16 Oct 2020 10:40:40 -0700 (PDT) Received: from ubuntu204 ([103.108.75.206]) by smtp.gmail.com with ESMTPSA id ls8sm3563230pjb.54.2020.10.16.10.40.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 10:40:40 -0700 (PDT) Date: Fri, 16 Oct 2020 23:10:33 +0530 From: Deepak R Varma To: outreachy-kernel@googlegroups.com, Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-media@vger.kernel.org Cc: mh12gx2825@gmail.com Subject: [PATCH v5 1/2] staging: media: imx: remove commented code Message-ID: <9fd1e7dd9e8f944b520f2a789e66e458aeb7b555.1602869338.git.mh12gx2825@gmail.com> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The virtual channel is always treated as 0 once the stream enters CSI's. Commented code in the "#if 0" can be safely removed as it will not serve any purpose in future. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Acked-by: Steve Longerbeam --- Changes since v4: - Rephrase patch description to make it exact and accurate as suggested by Julia. - Add linux-media to the recipient list. Suggested by Hans. Changes since v3: - Rephrase Patch description - Implement feedback from Vaishali & Helen to mention checkpatch in the patch description. Changes since v2: - None Changes since v1: - Implement feedback from Julia to be exact with the patch description drivers/staging/media/imx/imx-media-csi.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 21ebf7769696..9320e3974d86 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -1131,13 +1131,6 @@ static int csi_link_validate(struct v4l2_subdev *sd, * enters the CSI's however, they are treated internally * in the IPU as virtual channel 0. */ -#if 0 - mutex_unlock(&priv->lock); - vc_num = imx_media_find_mipi_csi2_channel(&priv->sd.entity); - if (vc_num < 0) - return vc_num; - mutex_lock(&priv->lock); -#endif ipu_csi_set_mipi_datatype(priv->csi, vc_num, &priv->format_mbus[CSI_SINK_PAD]); } From patchwork Fri Oct 16 17:46:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 286199 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=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS 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 C00E1C433DF for ; Fri, 16 Oct 2020 17:46:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59919208E4 for ; Fri, 16 Oct 2020 17:46:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZMOmvEze" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390689AbgJPRqN (ORCPT ); Fri, 16 Oct 2020 13:46:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387837AbgJPRqN (ORCPT ); Fri, 16 Oct 2020 13:46:13 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98679C061755 for ; Fri, 16 Oct 2020 10:46:13 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id j7so1877368pgk.5 for ; Fri, 16 Oct 2020 10:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WHK2GR8kfX0b+oqz1bD56wcKMpWRXbXriAgoKBCG6nY=; b=ZMOmvEzel2Ob/PWFKa8SSEBzOiEbxhIAeTUyVwGfR7pgRS0OFM1WxO1nuGCn8AhQWg FtpAbGFgXtG2y858W34ogDFy7w5+a9rbPmu/+3VWw7iJCuUYF6vNcnrHrRR77zlrZCgH 087S7GUE7UIGx0RSvZaYpq1HhhZx3bit4w9uZeQVW3oQrx+nARNJaNS2TCB5MTmafTD1 Q1Y4bE4Zdjchjk9PmnMDxAKq7kMTR8eX3d2b7v5zbOd7avD2kaBj5fuImM8u/ZpiUDuR I8ZqbPUwbj/kif/k3nyR2CTWItuB2U0wgv5+ABEwaKQ6dYAOk5EXC5foUBw3LINHBm9Y B58A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WHK2GR8kfX0b+oqz1bD56wcKMpWRXbXriAgoKBCG6nY=; b=LlclRU23n0X/HrjtxJdqw3y6S6ouwMdzLRUD9VhbgItugsVjlbjnuPr31FkbasbVhW ncueB7JomrJbAYsh4XdjThj2esUpnG1yhWAZZpprOvhVsPP3PBhcVeR1EQgpKp9Cy3e4 lL/4wh1xWiPxZ/SrS2CKzFQ9TFuvR2DNo+ydNSh1C9CY7b8Qt1UX1Sf7GGo/5exWrgY/ KlBUh6iMIyKzrtbz2KUbZhSVhDoBEf7GYxUT/oAvH7TkDzl0urNdmv2uQjAqMpO6kPIj 6dvgyGayxbfFfeWlF0fwtGJLBu0s4jAxX9fVZBNhupImSkkGAvfSJQqFdN6ld7ETbWeP CkDA== X-Gm-Message-State: AOAM531JGfN9sPnDmey2z/EXUITjZ8mqpwLNZOtwpNNKzb4t5PfZUNXW QxUxzw27rRIF7X/jQgmRaPU= X-Google-Smtp-Source: ABdhPJyb00dyox29qIuF4FNIIUTHjyccfR6X54PhR0HWDypmn2ICoTFHtiK3UqJiilxRnJpPSMCFMA== X-Received: by 2002:a62:8389:0:b029:152:416d:f026 with SMTP id h131-20020a6283890000b0290152416df026mr5060384pfe.64.1602870373113; Fri, 16 Oct 2020 10:46:13 -0700 (PDT) Received: from ubuntu204 ([103.108.75.206]) by smtp.gmail.com with ESMTPSA id 17sm3632433pjd.2.2020.10.16.10.46.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 10:46:12 -0700 (PDT) Date: Fri, 16 Oct 2020 23:16:06 +0530 From: Deepak R Varma To: outreachy-kernel@googlegroups.com, Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-media@vger.kernel.org Cc: mh12gx2825@gmail.com Subject: [PATCH 2/2 v5] staging: media: imx: remove unnecessary variable use Message-ID: <6a22de0a51e06b7cb43d4a55850f3a0213532e42.1602869338.git.mh12gx2825@gmail.com> References: <9fd1e7dd9e8f944b520f2a789e66e458aeb7b555.1602869338.git.mh12gx2825@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9fd1e7dd9e8f944b520f2a789e66e458aeb7b555.1602869338.git.mh12gx2825@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use of variable vc_num is unnecessary here as it is used only once. Instead, the value can directly be used in place of the variable. Signed-off-by: Deepak R Varma Acked-by: Steve Longerbeam --- Changes since v4: - None. Changes since v3: - None. Changes since v2: - Implement feedback from Vaishali to simplify patch log message. Changes since v1: - None. drivers/staging/media/imx/imx-media-csi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 9320e3974d86..db77fef07654 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -1123,7 +1123,6 @@ static int csi_link_validate(struct v4l2_subdev *sd, priv->upstream_ep = upstream_ep; is_csi2 = !is_parallel_bus(&upstream_ep); if (is_csi2) { - int vc_num = 0; /* * NOTE! It seems the virtual channels from the mipi csi-2 * receiver are used only for routing by the video mux's, @@ -1131,7 +1130,7 @@ static int csi_link_validate(struct v4l2_subdev *sd, * enters the CSI's however, they are treated internally * in the IPU as virtual channel 0. */ - ipu_csi_set_mipi_datatype(priv->csi, vc_num, + ipu_csi_set_mipi_datatype(priv->csi, 0, &priv->format_mbus[CSI_SINK_PAD]); }