Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1654594lqp; Mon, 15 Apr 2024 12:46:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVR56n6tij/BC7lkZ1vIh7oPuGCk8EOvH/RxVqWYXSM7Q+i+vJCWjDEQw3iFWsW7BLvelgP0GOoD2LQ38TIA2xYG4dlIybQs5VEpVIqIA== X-Google-Smtp-Source: AGHT+IF3dcNxcLEhMT4VmTtQgfT+ky5ISCkvfi/IWNlr/2gASnbpMiEuFPUIpcRi5rv2Xu0JFN43 X-Received: by 2002:a2e:9ed7:0:b0:2d8:9c43:e7ce with SMTP id h23-20020a2e9ed7000000b002d89c43e7cemr7176731ljk.10.1713210414347; Mon, 15 Apr 2024 12:46:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713210414; cv=pass; d=google.com; s=arc-20160816; b=YH1omfqtu+jFw6Uad5znL+MOlUl6wpFelcaAq58uYGl00YcVnB4yRf5SpL7UI5f2VW 4bWhuhyU/PNFrttmVruNTp9p2z4khhk92dx3kwgdPEAj7uJCz7Z05ztktoQZr70ypLi6 ONZeSfhiRvgYmI/tQRfcX3hXYqFUj5T4+Tdq+qUhtZ0qdgc6dTWIe47QYobHt2j870U7 cFNaLk9Q2GVthKcH65/y5i4T702yE7SaRDEV/i1+ak2Ah7GOliCWCOQc6mbCP1S60tQO a4RUIl75/cnfdD0rXbVak8/dHGDL9AtUc1RoriOD3oHfQ4ilKE7n4Tu9SyaudzS5GyMd w7bQ== 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=+lJf0+XIBDdSVuJAMeJcbyaAa+r8UncIi6K0ZFQWngw=; fh=fc/16KLRHqKnvPETByitir/kfy5ttePaw0c1z+5ne1Y=; b=TQJCBLlVEMA4x2XLEpZQQlFN/BLoiw/19RbMKBwl0909WtUOShzEFjzpZxf6fDz7Yq eqNPMQFvj+V8RArrp9KZCi73V7Dg8Stylbj5yp1m6f9EXRrY6h3X3zIE5JzQK6snUm6k 0yLw6Gx67WVeIyH/eq2fEA4qZcwa9KIMERDTYo9YJGrRsTn51mkMg+Z0INIEusGfXenj VyOw0Nsbe0XIamSZ+1/te6Zfon6VwChD7lH4PNksgPsvQeUC0YulOSJoOjcUhN4iWzmY JTuyP3tStzZT/Y6xMRhB/b51XSb+1hm8tF5H3rlnwPhneChvfVNPk4bIyHNvKasFZkp4 YaOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IYQi8Syt; 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-145818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h3-20020a0564020e8300b005701f1d38aesi2075052eda.79.2024.04.15.12.46.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:46:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IYQi8Syt; 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-145818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145818-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 am.mirrors.kernel.org (Postfix) with ESMTPS id DD2441F211DA for ; Mon, 15 Apr 2024 19:46:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C52F16D313; Mon, 15 Apr 2024 19:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="IYQi8Syt" Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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 439B5168B18 for ; Mon, 15 Apr 2024 19:35:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209711; cv=none; b=mc7duiTJLd0Xv/1QmmTH9n8gP0as7Nw0bUTnJJfeLAJLS56YoyFHthAyyxu4hN2NHuZqBMmc4UMMYIu45NDXgePFyBg99kwzHVqWOu3/0n5MAbXWpzN2HQscim+Dz9aYz6McofQokbYls5DGtTIBSfjvKpwl4m+yVnUrsYLCPO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209711; c=relaxed/simple; bh=YppEHZnTLQzLGD2f5s7SR2AaXE+KWzBq1dtSVEVCatk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OiyN/aNUzVE8twyU9mhaSbKJ9hhWYQq3x3OZUWCJgE5ukqygWCrs3PUJ3lF5jAchaky2DrpqCt1g4Ckqco+wTu0qFaOW0pdtHN9HoSh6pDjgWLWvtTE0EFvhAcqeDJGRPXj8+XG6fLtp4BaqEbLzKJGVmDPK0MDeVIrLVx5IwcU= 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=IYQi8Syt; arc=none smtp.client-ip=209.85.222.170 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-f170.google.com with SMTP id af79cd13be357-78edc49861aso135694785a.3 for ; Mon, 15 Apr 2024 12:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209707; x=1713814507; 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=+lJf0+XIBDdSVuJAMeJcbyaAa+r8UncIi6K0ZFQWngw=; b=IYQi8SytxW2a4klOXWOqdV9eUoK+fnBZcgD9f7unUBZ9UoHKuM1/P7QJKHAbu/hNvv shmSqKH7rHmDkRHDobZYKhw9h0+mEpNEK8thHsD50vD+6XrN0IgWTcS3myEza7tWDrYB Uh4wzrnkOHi45phaxT6ahtPdBTIWX+QLtIlkE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209707; x=1713814507; 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=+lJf0+XIBDdSVuJAMeJcbyaAa+r8UncIi6K0ZFQWngw=; b=WROFXOkM4rKaPrnmez/f36cCloGvGkv4WQnZ5yvXpmxBIJlYuZWIsPTLUAX5pvNJnH xwIHde3dzl9Qp4oDE9umN0diBMs5qs5KbX1b6dRe/ZBEEVh+izFo1Fj9/LwizreHh3rz UErVX19kwMpnfsVNrGfdDNCrF83S+7+cHxqvdbNnB7Qa6dXcwxkgh2Z96bc1b+8mVIzp aiWRuR8OXgEvdFkEbVmGbuKJjNHMaaKe6AenwI3iHRzwwAAlVC8AG0PP3Bx0I6X5ZWW0 JPG9c5hoWVO77oVGc/lTBKAWMDLLcY1JN+S6E85LamQSlDPqTqv3ewqMMsrD8HTAozyZ LfHg== X-Forwarded-Encrypted: i=1; AJvYcCVLLBXUIkwFpWBMP9B2Ig11wsgkNgkfIXRRaiKFEJUdVnYgal9JB346buTjv57Tc1FAZXT9KAvRfr6572CGy7NRYSSbiYvR27meCcPo X-Gm-Message-State: AOJu0YxUaJPXn5ppKN3N0nvgUTLpA/tklCsdL2CDmupC/FzpBXcPm53M +Dl4nSL9sxrI4adLqvS97EZTmn7n3DU83W3wY33C3BupvGIY4JTFwh+f+tYlfQ== X-Received: by 2002:a05:620a:400a:b0:78e:ca18:4093 with SMTP id h10-20020a05620a400a00b0078eca184093mr13235627qko.60.1713209707046; Mon, 15 Apr 2024 12:35:07 -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.35.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:35:06 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:52 +0000 Subject: [PATCH 35/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-35-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/venc.c:611:12-13: WARNING opportunity for min() drivers/media/platform/qcom/venus/venc.c:651:12-13: WARNING opportunity for min() drivers/media/platform/qcom/venus/venc.c:629:12-13: WARNING opportunity for min() Signed-off-by: Ricardo Ribalda --- drivers/media/platform/qcom/venus/venc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index de06e1712d09..285bc1b4d888 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -608,7 +608,9 @@ static int venc_pm_get(struct venus_inst *inst) ret = pm_runtime_resume_and_get(dev); mutex_unlock(&core->pm_lock); - return ret < 0 ? ret : 0; + if (ret < 0) + return ret; + return 0; } static int venc_pm_put(struct venus_inst *inst, bool autosuspend) @@ -626,7 +628,9 @@ static int venc_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 venc_pm_get_put(struct venus_inst *inst) @@ -648,7 +652,9 @@ static int venc_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 venc_pm_touch(struct venus_inst *inst) -- 2.44.0.683.g7961c838ac-goog