Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2622474pxb; Sun, 17 Oct 2021 20:47:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYUsQ9cGUxFhTUdxI1atctNonEsjQAuTlwL6jpvcsx6YYuGJDWNJvZfC1+Lor+HjAEX1wq X-Received: by 2002:a17:90b:193:: with SMTP id t19mr44809831pjs.95.1634528830545; Sun, 17 Oct 2021 20:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528830; cv=none; d=google.com; s=arc-20160816; b=u5iSNHUPBwq9aG1jhzHPI9a0Gqdtcbb7pC59WYHQSdJMM/xq96o6zgDLM111t6QsAF gGXwswJhWt3WIIrBzINBpEqJI0cqAzDr8gf/g4m9VCW3XemW1lYj0gQ7Zp7a+Gq3l9ao M40VGSj1kzIvnI5IlDjsZEXzSAcQsbH0tsl0kq0c/RBwdJtOmYTsGRIeG2khjLXu6JRG C/Niq8aTxmvsC9rFewpNXw9MdMeEBtGDqDPBqTwAXx8PvumBr9h7iisKcwLYxbVWQlQk HrpGTPRgbUUpliNDn/3qPKWzkleq9v9hKZk5Z2O1JMyhE/TYNhn30B24i+/zMMy2Ci6g A9nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=RZvAniSv0/MLHUecBSIvKMrmoz6usDwoGMxlWRtqF5A=; b=hJm99qZ+VmS7ndZs51chW+/8qihWqIojZlgHSucYTbnsHBIU0PwgySFrToK22xNrhr TmEkTVyMJrb/AnPrmWE1YJTpfJ+U8J/M2lW2nXPIRbQnfvSxVGRFx+wOsafBU9mFymAj JnVAcEcyUHHfRLGYUNhnE25Gjwq8ROZKIYtGRrvKlwKvG816ODqWxfQMlfiEqIMc5MDV B/QuzNPwjabjezL8Za3zMYytrMbkQXdHyb1HXIxkJcbtp7CHV/727SMO2VeL7rs1ucWt 2HE/cRLPnfFFTe/ajR8y1zrBnYlToEqUJPaSw/fAZBkvJ5QQp9A2/uega/I8ATSY1UFo ZVyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=hifpVpT0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si19652233plg.203.2021.10.17.20.46.58; Sun, 17 Oct 2021 20:47:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=hifpVpT0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344061AbhJQQXK (ORCPT + 98 others); Sun, 17 Oct 2021 12:23:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344081AbhJQQXD (ORCPT ); Sun, 17 Oct 2021 12:23:03 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E1A5C061768; Sun, 17 Oct 2021 09:20:53 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id f5so13511501pgc.12; Sun, 17 Oct 2021 09:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RZvAniSv0/MLHUecBSIvKMrmoz6usDwoGMxlWRtqF5A=; b=hifpVpT0bgGGW6BmmZDDJUbjAa6LEZGGiqzjSmU+G/KA2d0SLyzT7kx/421gnTRQTm laSuGz8ATwzmRUoaJohyIfHwq2rTtebsydHTV+kUCUVrs+SBX+dJaSiVkf+eW5sYCJsb VuwmUVXDymYfLjhNw+wCaZQPxLm5K6/Net8bWY8xAHPdiuzUdYftfIfuK3Ya6jobCLII Kgv7vucadi9Jpt2l9IMd0XcVxhTnOPcuyV/SI7pQzQJ5JF2BHRPhJsqfQJHeLFivhb23 BSqASHYfBUO1k58cc8eqjkjQRrqzqDdud9EtXIAHBzCAfL7cBeIYhkjHjQnIBkKDLE7H x/nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RZvAniSv0/MLHUecBSIvKMrmoz6usDwoGMxlWRtqF5A=; b=VXfwbxDA2kwdHkO1kpoP71FAkomlUkqN/B72nE2s4K/+ZU9BLORxFrnhxHczuq+wo7 TSZzM/8rsjOvc4Emlv0He5X8zuXcLOK2nhUt43nDWEWAjSxyDJVk7IjikJe/FuqlQX5X EorjBv6LrWTYQgZa9PsnS2Z7WgXMzmzqVGZBzl8xfGAWfH04XTZTo7D7Z2cEJgdkjAry ihCGHDiVWYHxM/kzhxepbWO1VRSEDfi5lsaiXkyPWL8M5C4x9BOB5eAUooCua/+OCvWJ XgCXJbOCFjVs/NmOPIdCqST6VEiwLhBeScumM+r07VYKta5B9npF3S6xMtTwNj3p1Vxk syaw== X-Gm-Message-State: AOAM533lTQnRt7YVqvwjR/ZOcbX+oFO5msG90Cy2/EAu8k9mRHewxFvl XQ9/0e7dIENMeUH+g/WmNPk= X-Received: by 2002:a63:f410:: with SMTP id g16mr18634164pgi.201.1634487652994; Sun, 17 Oct 2021 09:20:52 -0700 (PDT) Received: from sbwpb-arch.flets-east.jp ([2400:4052:6980:3800:dba7:2b1f:3f26:a5ec]) by smtp.gmail.com with ESMTPSA id mu11sm5155444pjb.20.2021.10.17.09.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 09:20:52 -0700 (PDT) From: Tsuchiya Yuto Cc: Hans de Goede , Patrik Gfeller , Tsuchiya Yuto , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Hans Verkuil , Aline Santana Cordeiro , Yang Yingliang , Dinghao Liu , Alan , Deepak R Varma , Alex Dewar , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 03/17] media: atomisp: pci: fix inverted logic in buffers_needed() Date: Mon, 18 Oct 2021 01:19:43 +0900 Message-Id: <20211017161958.44351-4-kitakar@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211017161958.44351-1-kitakar@gmail.com> References: <20211017161958.44351-1-kitakar@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When config.mode is IA_CSS_INPUT_MODE_BUFFERED_SENSOR, it rather needs buffers. Fix it by inverting the return value. Fixes: 3c0538fbad9f ("media: atomisp: get rid of most checks for ISP2401 version") Signed-off-by: Tsuchiya Yuto --- drivers/staging/media/atomisp/pci/sh_css_mipi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/sh_css_mipi.c index 75489f7d75ee..483d40a467c7 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c +++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c @@ -374,17 +374,17 @@ static bool buffers_needed(struct ia_css_pipe *pipe) { if (!IS_ISP2401) { if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) - return false; - else return true; + else + return false; } if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR || pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG || pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS) - return false; + return true; - return true; + return false; } int -- 2.33.1