From patchwork Sat Oct 17 14:28:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Dewar X-Patchwork-Id: 11842803 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB93015E6 for ; Sat, 17 Oct 2020 14:29:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8EB8720760 for ; Sat, 17 Oct 2020 14:29:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="u3bVkEer" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438360AbgJQO3g (ORCPT ); Sat, 17 Oct 2020 10:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438337AbgJQO3f (ORCPT ); Sat, 17 Oct 2020 10:29:35 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DD71C061755; Sat, 17 Oct 2020 07:29:35 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id f21so6177283wml.3; Sat, 17 Oct 2020 07:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AhTAkXNg8my5roVt3jSaeXHe7VJ9U3uXiwwvjKdguwI=; b=u3bVkEeryu4yoyRBIK95E6ZpRNKQMDD3Dpa+7It6UOZs0KJtv1xLfLRcgEgwOHLRA+ LeyVS5aCQ5QbUuHaJTQHgEKRFq+3AlSq7+XqB8tQoiaVrVZH7v7zbDmSmc/a0kZ2Rf4V 19G7iMvIhTPaesN2/Obun7YkHweSRY3U6TybzDNz99CD0KvMl1t9AXn/7Lwi2Y+Lm/n4 RycmodJiDE5PEExd0I/AJqrXP3WMWlPi1pOLplkT+YXKfUkOSn2rL2btGDWG6sqf0qRB qhQ+LGMa2LgULoz/3fe2XJ1VVQ10RA2pcDinSjeak0NEyO6g3qiwbM8uHMgoVsNvEeBb Lnwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AhTAkXNg8my5roVt3jSaeXHe7VJ9U3uXiwwvjKdguwI=; b=rzVvBDNGLA8TY16jZK4sIkHJgh7cge4B5rkXyOggItLuA+3ek6/26GFuStHlQAxqpw ViNtdPu6mzhDIhZnNpJa78t0qR7lPPzCP7a/9e7USH3aRZlbB3hct3iBfU+xAnkRwm+T JWblOkVtnZI7gIQcdFoAjipZfy9239Ft50a+Oyy6LAe5tAWZrZVlMZiQzBcLbFPqe44b hfetYDrHaqxljWpoSd2pgclK7c463Zmn9IsqjqEGMN/WmjlCmy07uP3E205iI6YzrbO9 yPUXh7eHNwJnREfnQ5nipPi1g8PGpY9p0GTEY1GoNJvvYpEgfPN41T6xneshYG82hOd9 fCMw== X-Gm-Message-State: AOAM531y6KRIXfe8EGhrC0xg5jCmy+xS8gGz36VQpvZK7yvl8h/1R5oI tF0qQOenSm8AbVEEQiNzilc= X-Google-Smtp-Source: ABdhPJz7VD1SHo2gupIa60LiZ1qC0cDQgbYIUx7544d4vuszHNvQtgGANWf8aQkMLhtN7iPJI960nw== X-Received: by 2002:a05:600c:230a:: with SMTP id 10mr9050861wmo.151.1602944974299; Sat, 17 Oct 2020 07:29:34 -0700 (PDT) Received: from localhost.localdomain (cpc83661-brig20-2-0-cust443.3-3.cable.virginm.net. [82.28.105.188]) by smtp.gmail.com with ESMTPSA id n5sm9020860wrm.2.2020.10.17.07.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 07:29:33 -0700 (PDT) From: Alex Dewar Cc: Alex Dewar , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] staging: media: atomisp: Remove unnecessary if statement Date: Sat, 17 Oct 2020 15:28:02 +0100 Message-Id: <20201017142810.26967-2-alex.dewar90@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201017142810.26967-1-alex.dewar90@gmail.com> References: <20201017142810.26967-1-alex.dewar90@gmail.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The bodies of the if and else sections are the same, so just remove the check. Signed-off-by: Alex Dewar --- .../staging/media/atomisp/pci/atomisp_cmd.c | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 592ea990d4ca..92ddce409d04 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -5407,27 +5407,12 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev, return -EINVAL; } - if (asd->continuous_mode->val && - (configure_pp_input == atomisp_css_preview_configure_pp_input || - configure_pp_input == atomisp_css_video_configure_pp_input)) { - /* for isp 2.2, configure pp input is available for continuous - * mode */ - ret = configure_pp_input(asd, isp_sink_crop->width, - isp_sink_crop->height); - if (ret) { - dev_err(isp->dev, "configure_pp_input %ux%u\n", - isp_sink_crop->width, - isp_sink_crop->height); - return -EINVAL; - } - } else { - ret = configure_pp_input(asd, isp_sink_crop->width, - isp_sink_crop->height); - if (ret) { - dev_err(isp->dev, "configure_pp_input %ux%u\n", - isp_sink_crop->width, isp_sink_crop->height); - return -EINVAL; - } + ret = configure_pp_input(asd, isp_sink_crop->width, isp_sink_crop->height); + if (ret) { + dev_err(isp->dev, "configure_pp_input %ux%u\n", + isp_sink_crop->width, + isp_sink_crop->height); + return -EINVAL; } if (asd->copy_mode) ret = atomisp_css_copy_get_output_frame_info(asd, stream_index, From patchwork Sat Oct 17 14:28:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Dewar X-Patchwork-Id: 11842801 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02A7C15E6 for ; Sat, 17 Oct 2020 14:29:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D80F320657 for ; Sat, 17 Oct 2020 14:29:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lPz4OrDN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438350AbgJQO3Q (ORCPT ); Sat, 17 Oct 2020 10:29:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438346AbgJQO3P (ORCPT ); Sat, 17 Oct 2020 10:29:15 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F120BC061755; Sat, 17 Oct 2020 07:29:14 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id a72so6164531wme.5; Sat, 17 Oct 2020 07:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YVQnjhnO3hPEHey+2a/NsTVt2kt0i3WZ2OmRQGb+eEU=; b=lPz4OrDNKkJKRGbxIKA86ZwUlRZGmluEv4tikHtZVh0Z/EQdien5qZyTMYb/73ZwEM la/V7M84Xe9V7Kc90euTFPV1Fs6TrEjr0y3OVmO60jU3/1yj57osqvVeIKP3UKZQTegn RtEMvOnw0UmHuH54peCQZymCg3LQXIIgLMbUAY0FjZ9g/Sg+BMAsOBatBmBpCFDZQp/z NAlSAe/mmm5ZXNoMxTRtcWU11TTt6VW0KyT5eooRv6PSKJ/0GsaUpLv9AN7v29Auhrd8 BERIfdAzMKLweDxv4rEunjcledmnXGeC4bPAzGPNW/1P5yK0MB1nsP33iANR7j7fahzn VBow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YVQnjhnO3hPEHey+2a/NsTVt2kt0i3WZ2OmRQGb+eEU=; b=eb3QmLyiz7IBk/wOC9yUwEFP7DYcEfNdGyDQFwG9wrAlNX36BBdBuG3zUfqTnuI3rV +4VaT8TNjsGXwa1cxXmj4Qo15HXduLOFHEPU0jzee5tTw/A+LayIPBKt0YLx0Le+rFVQ V4yDFJbDET+GvCP1aPTclfW2plAoK0K90EL1MSAS7TqLtlycTloZuYcUrN7NVxI/sVfC +QteJJNyj21ZMLnmqxYFxon6ycyXXjnMgge0D2SKT2p4Q31Jjf7DS7s8I5FZhUcwwJQI sgxQWpjUW46UCawgEHHe2eM8ihM8NKi4MboCCW/n+sLu5uYFO4lgOI7sjv3I/k4mTMAr DbPw== X-Gm-Message-State: AOAM5313I28hg3sBekd96u9S+MYURWsAElDqljt7bMZht83h7ARJTm7d R51kmMlR/EuDSS2lRddyDYOMdos3wACmDQ== X-Google-Smtp-Source: ABdhPJyecMC7VKYn9/3RgFi8oaYY+8gX1km0A2OJxjhdLdLiHBiocHr5Hr6rQWe0HVVYhH2XtNtVnA== X-Received: by 2002:a1c:4b0f:: with SMTP id y15mr9123399wma.165.1602944953679; Sat, 17 Oct 2020 07:29:13 -0700 (PDT) Received: from localhost.localdomain (cpc83661-brig20-2-0-cust443.3-3.cable.virginm.net. [82.28.105.188]) by smtp.gmail.com with ESMTPSA id n5sm9020860wrm.2.2020.10.17.07.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 07:29:13 -0700 (PDT) From: Alex Dewar Cc: Alex Dewar , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] staging: media: atomisp: Remove unused function Date: Sat, 17 Oct 2020 15:28:00 +0100 Message-Id: <20201017142810.26967-1-alex.dewar90@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The function ia_css_mipi_frame_specify() is not called from anywhere and the comment above its declaration states that it should be removed when there are no more users. So remove it. Signed-off-by: Alex Dewar --- drivers/staging/media/atomisp/pci/ia_css_mipi.h | 17 ----------------- drivers/staging/media/atomisp/pci/sh_css_mipi.c | 11 ----------- 2 files changed, 28 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/ia_css_mipi.h b/drivers/staging/media/atomisp/pci/ia_css_mipi.h index 7b6d796d6ee0..9e50e1c619be 100644 --- a/drivers/staging/media/atomisp/pci/ia_css_mipi.h +++ b/drivers/staging/media/atomisp/pci/ia_css_mipi.h @@ -25,23 +25,6 @@ #include "ia_css_stream_format.h" #include "ia_css_input_port.h" -/* Backward compatible for CSS API 2.0 only - * TO BE REMOVED when all drivers move to CSS API 2.1. - */ -/* @brief Specify a CSS MIPI frame buffer. - * - * @param[in] size_mem_words The frame size in memory words (32B). - * @param[in] contiguous Allocate memory physically contiguously or not. - * @return The error code. - * - * \deprecated{Use ia_css_mipi_buffer_config instead.} - * - * Specifies a CSS MIPI frame buffer: size in memory words (32B). - */ -int -ia_css_mipi_frame_specify(const unsigned int size_mem_words, - const bool contiguous); - /* @brief Register size of a CSS MIPI frame for check during capturing. * * @param[in] port CSI-2 port this check is registered. diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/sh_css_mipi.c index d5ae7f0b5864..3f34cc81be87 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c +++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c @@ -33,17 +33,6 @@ static u32 ref_count_mipi_allocation[N_CSI_PORTS]; /* Initialized in mipi_init */ -int -ia_css_mipi_frame_specify(const unsigned int size_mem_words, - const bool contiguous) { - int err = 0; - - my_css.size_mem_words = size_mem_words; - (void)contiguous; - - return err; -} - /* * Check if a source port or TPG/PRBS ID is valid */