Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1653575lqp; Mon, 15 Apr 2024 12:44:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjfR3gE+swkdkxg8isRgNgQep88CyYAedc6K8DPUgQEWXUNh2BDSRQZBW9UIW15rYsq3bAD+hYHNV1DDtX0t5Gla8Glu5BR08XCvL1ZQ== X-Google-Smtp-Source: AGHT+IHOb5ABzmJSuRCYiE6YRywQ3/dYgBeFxZiCTPF1k43y2Rjha71tjuAXRfxHqsHJI/9BN7MH X-Received: by 2002:a05:6902:2403:b0:dcd:551f:1e2 with SMTP id dr3-20020a056902240300b00dcd551f01e2mr11256959ybb.34.1713210279485; Mon, 15 Apr 2024 12:44:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713210279; cv=pass; d=google.com; s=arc-20160816; b=Ly5IPzYjLTXrtpgfhn31LIwOL6o9O9qZHXJAuXscfMxWG0WAG/0Igyi9uwISezWRIe qVEMOqmntBjlkCBsvVm/tY9JlT5jKoiM+fQ5aWShe6U64JmNZAkATbGEh8lWvur7yNbS wOGmSiAb+nCEFrna2BsnX23PiFVJhaasOk7rR1OAIglgHB63F8Cbil3cmo6liUGJ9lGZ MRSDmT44LxctPH6uvWjlj6tW7f1q47gKX01BuM2ybac9TWcL1k0iZSkKyzdSMMUawe1t 3coVVlvuuY2m1sEHfu4zQ3Ke2EL6pJyMz0CQi7hJlIRzaSUTwBmirHPr9u9kiR5cEhN3 TMBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=9iRxS0Wfwa66zl/9FdFOMvCFtgSuuwnNLZrwXVx0B2s=; fh=XRkavQgPBypgcMPjPW5lMpO3IP+k4NNyW0rHGfR7jmI=; b=CwFSvWiUGLo4FRAAY9hz06UZVIZVxdg8br7I3XPWflpblNJDq8/Oqbv0kWuU+ceOpM CLSkfG9zFbpHognLO4/7l7FKH0Pz9BfZzq7VibtVmegO5tRlzYmR4anTWrq72E4vLXn1 BrIAihg62a1nJms2t7QEHBXtUNUMrUYZghOyL9hEr0tamAnjzd9R34FKzwYWAkv75VIn HnFXWJGGWpwtaqCao9itEkAnTPYReSSRPlYQ9lZCnPE/9ToyVTXW9PuZTikH2sI2207a 3z4HQmJslhbiDHR2AWXM3n+SvHBZwn/NYRfh5YoXZAdqk2+MeSO0JP5+y9aaMbHqLgmN cODw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DqbHWcPu; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-145809-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145809-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f18-20020a0cf7d2000000b0069b282ca589si10664788qvo.218.2024.04.15.12.44.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:44:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145809-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DqbHWcPu; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-145809-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145809-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2C7AD1C20895 for ; Mon, 15 Apr 2024 19:44:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D606168AE7; Mon, 15 Apr 2024 19:35:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="DqbHWcPu" Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 540E916133B for ; Mon, 15 Apr 2024 19:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209701; cv=none; b=qISt2b4wWP+5RS95Bqaxj3Jplb6yQaVtcpki1nFGljttFKWZH9Md/R2AsCPJCW1SxNizyW6XFjdLNg7RpLnfENVTwCjG4dS9XtsZ4rUXIzpHIYbpdJS6jCYJjA10klG97XNsN20my//50HDE4BGeimB5WWh2VLtOrkgXsnkmVDE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209701; c=relaxed/simple; bh=z4PclDFur+vwHypm0cCW/dzU3Xu+onrV7HrMrh+lG0w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ORXqN20kq2EN42hqu/Kfm30w6ZQkJrs0iW+OQ175hwhCa+vBeh7Q1f5KlqpW5FHVWn07ETNvlCG+diCuNTda8IOrZwe7+eH3olPXRC3C3EOFXAeHlgG+gNpWLz/qlLhc52EBf2QnzAyAN32awPwWm21e8Se5nQ8uqQ65BLbRjFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=DqbHWcPu; arc=none smtp.client-ip=209.85.222.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-78edc0f9636so160353585a.2 for ; Mon, 15 Apr 2024 12:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209697; x=1713814497; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9iRxS0Wfwa66zl/9FdFOMvCFtgSuuwnNLZrwXVx0B2s=; b=DqbHWcPudgXbV5rqyt0Jq160y0ubkuqh5LNrVOJcdO2eloQfX+II1f0JTZzaEHtaqv TtiOJUo7VrMcmiZHF4bwB9yOibEiAzxMRyTJ2amoMTDD3tB75C/Hd8o2xffzsmkyTOw3 qUXqOstHE/lkHdfLJTKlryzL8AEkc/YY88RDE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209697; x=1713814497; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9iRxS0Wfwa66zl/9FdFOMvCFtgSuuwnNLZrwXVx0B2s=; b=uTE66FevlWNuNypprIQLMzRUsm5Mbhpr4BI9+ZIekxPQAH60t+oBFwskQZTVFYGiNR D6zl2CHF/spB94+76nLbTIvaH1nrvQdCljdysHeQ38tn2/sfW0Gop6tJMF5MDYqp8InZ Sej4apiuY1CbtcuQk/N4vF4N88DgHXfynb9q2qoNYrVlsm3aMSj0Mjeqt4aOWiKr9qaE zSW0/nPKsqR8JalAxjgv3ATasE0P+zlYUZStnoWjdUmr7mUo7erLMyqhUJWPiGWQ7Weh 1OdsVXLu4VvM7dAfWfUx57iHL2XBDsPFsSKFneJzSC+TLQhy+3cQxvxtgjZqP5x+3NcQ xEwA== X-Forwarded-Encrypted: i=1; AJvYcCU+1thGsTuLlYPWrvCLiNg15r12qvpPS6BFSyd1hnYxrpiJvVGzOaPSZdCY3aDfE8zRM92LEwpzTY8w78vWRhHFkN4joKYXJtUduoP6 X-Gm-Message-State: AOJu0Yw0cbXxmnBq1fmNQD6QUuXxJCgi8rsCYGHxPC6UwV7Dg0qkifx7 Xbp8MIIqgDeoQ0I3FgrFfy8POWHdPY1hcFvXmgiZ6AUTTEMwMQmO1jJsLcxSbA== X-Received: by 2002:a37:e10a:0:b0:78e:d2a6:63e0 with SMTP id c10-20020a37e10a000000b0078ed2a663e0mr9260421qkm.4.1713209697430; Mon, 15 Apr 2024 12:34:57 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id s26-20020ae9f71a000000b0078d3b54eb76sm6718055qkg.78.2024.04.15.12.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:34:57 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:43 +0000 Subject: [PATCH 26/35] media: venus: Refator return path Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240415-fix-cocci-v1-26-477afb23728b@chromium.org> References: <20240415-fix-cocci-v1-0-477afb23728b@chromium.org> In-Reply-To: <20240415-fix-cocci-v1-0-477afb23728b@chromium.org> To: Martin Tuma , Mauro Carvalho Chehab , Laurent Pinchart , Hans Verkuil , Hugues Fruchet , Alain Volmat , Maxime Coquelin , Alexandre Torgue , Paul Kocialkowski , Greg Kroah-Hartman , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sakari Ailus , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Matthias Brugger , AngeloGioacchino Del Regno , Hans Verkuil , Sergey Kozlov , Abylay Ospan , Ezequiel Garcia , Dmitry Osipenko , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio , Benjamin Mugnier , Sylvain Petinot , Jacopo Mondi , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Niklas_S=C3=B6derlund?= , Pavel Machek Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 This is a nop, but let cocci now that this is not a good candidate for min() drivers/media/platform/qcom/venus/vdec.c:672:12-13: WARNING opportunity for min() drivers/media/platform/qcom/venus/vdec.c:650:12-13: WARNING opportunity for min() Signed-off-by: Ricardo Ribalda --- drivers/media/platform/qcom/venus/vdec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 1dffeb7de76e..2bc7aecb35e5 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -647,7 +647,9 @@ static int vdec_pm_put(struct venus_inst *inst, bool autosuspend) mutex_unlock(&core->pm_lock); - return ret < 0 ? ret : 0; + if (ret < 0) + return ret; + return 0; } static int vdec_pm_get_put(struct venus_inst *inst) @@ -669,7 +671,9 @@ static int vdec_pm_get_put(struct venus_inst *inst) error: mutex_unlock(&core->pm_lock); - return ret < 0 ? ret : 0; + if (ret < 0) + return ret; + return 0; } static void vdec_pm_touch(struct venus_inst *inst) -- 2.44.0.683.g7961c838ac-goog