From patchwork Mon Apr 15 19:34:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13630653 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8D90C4345F for ; Mon, 15 Apr 2024 19:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PivJFNR7bx4Yy2s/OxtVelI4dKzwU5bf5TZdr+ZiUSE=; b=jFvkWbFQubA6VN qUFEzML6m8g1Z3iTcxZm1yNrRruP4k/2vowU8AK9u5CQBeCob9Aq6bfHrrG3h5bXN6kmw6PniNnc1 vmKhKuXPxfdJWqh+SmQ72F83o2E7Algsh/2MsyrmTNGnlHr1CvpZTGqrVfeide2m2ftWcwXUyhkgr OB8LgxDv7fzftQIUNCNPnGpgUM+bwJBomtIPsypmzfkKDTaoIzcE9EgOqYscpksoLgT+NkKwuFXBr V1+0I5Gu2RZD1ioz0ul/+AxwzPK5kz3bbuJCo+AuwmBBqBQMDZrrSINzJOoIUBE5gDLqPLkGk0PEu 8HKU+eMPLn1ne0Stgsiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwSBp-00000009fYH-47NE; Mon, 15 Apr 2024 19:40:30 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwS6v-00000009cWw-45L8 for linux-arm-kernel@bombadil.infradead.org; Mon, 15 Apr 2024 19:35:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=hZ69zvEi+2hVMHqGREi0s+o1FDmo1qxeLo8vD8Yn8BA=; b=IgPk+PkukNzqswJQmwUU+/wJGO 6/4A0C0U7mTxTDduV8QgKc5Drfvwds5t2kW/dNBfEco8T1kjkpR5//slgCKwFtzheuTIJ9R4sHCFC 3u4zxDIy7Yo5w3XphYNpJxtmM/+9yu+WdcNa4j6DMDGAZPqngbyDgxrt0bC90cV6ozcfB6bHigmKP RWA1eCAOkSIGXCaKHEKSI0xROk9eTpbNpxBuuU6l5v64IhvIML0EZjxi4zyrUsc8jPKb7J3sr8xRK KRtGpHJ6vQuRyKOCfkP1PYZ3/8/+kbu0o4XGQD2/JUiZxaone0/JoTAhrbEaZGv12LDJkAXjzRQee /Kb1vhUg==; Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwS6h-0000000Aioe-3wyR for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 19:35:22 +0000 Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6ea2ac4607aso1923541a34.3 for ; Mon, 15 Apr 2024 12:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209704; x=1713814504; darn=lists.infradead.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=hZ69zvEi+2hVMHqGREi0s+o1FDmo1qxeLo8vD8Yn8BA=; b=cit+tk2/J2n6zBP+FQNE5WxeOgDftV6EpUjAEFANXtfIQdUDIxXsVmP4Rb7ooo3Zgm CKJZFuob8a5GvUZQrC0mL//yZOIGGt3u7FHcOQ3jCpxHZzhGsZ/Io+DRaiaqGwEGf4sx q0zMiaVKN/fCNvDsJ4JWe183rXnUYBpCMP/04= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209704; x=1713814504; 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=hZ69zvEi+2hVMHqGREi0s+o1FDmo1qxeLo8vD8Yn8BA=; b=aZqW9MGjeAC4GgO1y2G62vazdcHao7vBfebjEHMQGTqiAnjGFz2m5ZzBfUjdYz4nPR jCUnVthxiSpWEeILJg5smINCEZVmnbXwc/1NwzPN6/ylDEZBRQAMYNzSizN1bQ8FW6PC d+aDjfJu0paH5TMYBFL4BcZrAKNJ+yRqapH3c3pYBKBWtDG8XLiUuofAqhe4RVH57CbQ AHeimtht5OyD2hCVb8D0ndkAmjP38WfHL9v4HjFnJBA+ccXZYTTFLKUMIYnpqRuo9PxU Ev3ckblDGRX/Z/v9s0p+Mk/KOuStZbSq3E7nKYVdAWPhypRAgkVFW9tYcdDDbedoNZPX bXHQ== X-Forwarded-Encrypted: i=1; AJvYcCXPZWhLVnsM7EyZOGjnPPO58wfBLUzH1Q9gqQKUn2mAY2vAAOaCHHZnhYC0DhOlaYhv0O90HgHreBWsxnOTEocC+EGNaAgb4J2et10MeORfMgc+bC4= X-Gm-Message-State: AOJu0YyWKr1ft5HkYeNcq0aMdj475dxSHi3GCqbyIz46BzDGSRpP3vSg UcXpjXigH+WT+gpbn5nkK8FhzytQ9CdpLUFu19vd8MWMDkkqK0MTEnIip/YZxQ== X-Google-Smtp-Source: AGHT+IGR6r574HxBWsbrxXxGaHrf3NXllaDQAZexGaElZz4TGdMFy5/7Wsa4Z+FqqK7nCIYg/Ya87w== X-Received: by 2002:a9d:77cf:0:b0:6eb:68b7:581f with SMTP id w15-20020a9d77cf000000b006eb68b7581fmr7839393otl.22.1713209703885; Mon, 15 Apr 2024 12:35:03 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:35:03 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:49 +0000 Subject: [PATCH 32/35] media: si4713: Refator return path MIME-Version: 1.0 Message-Id: <20240415-fix-cocci-v1-32-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?Ni?= =?utf-8?q?klas_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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240415_203515_142779_9D4EBE1E X-CRM114-Status: GOOD ( 13.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a nop, but let cocci now that this is not a good candidate for min() drivers/media/radio/si4713/radio-usb-si4713.c:309:15-16: WARNING opportunity for min() drivers/media/radio/si4713/radio-usb-si4713.c:360:15-16: WARNING opportunity for min() Signed-off-by: Ricardo Ribalda --- drivers/media/radio/si4713/radio-usb-si4713.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/radio/si4713/radio-usb-si4713.c b/drivers/media/radio/si4713/radio-usb-si4713.c index 2cf36c8abdde..0ad1bfe09004 100644 --- a/drivers/media/radio/si4713/radio-usb-si4713.c +++ b/drivers/media/radio/si4713/radio-usb-si4713.c @@ -306,7 +306,9 @@ static int send_command(struct si4713_usb_device *radio, u8 *payload, char *data 0x09, 0x21, 0x033f, 0, radio->buffer, BUFFER_LENGTH, USB_TIMEOUT); - return retval < 0 ? retval : 0; + if (retval < 0) + return retval; + return 0; } static int si4713_i2c_read(struct si4713_usb_device *radio, char *data, int len) @@ -357,7 +359,9 @@ static int si4713_i2c_write(struct si4713_usb_device *radio, char *data, int len data, len); } - return retval < 0 ? retval : 0; + if (retval < 0) + return retval; + return 0; } static int si4713_transfer(struct i2c_adapter *i2c_adapter,