Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1658675lqp; Mon, 15 Apr 2024 12:56:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWiXjDrZgLd38ty+pN4nHNvIlbVeoincUJhKIwhqnYC0EKG9E4wng9rRxb05QFf9bHalLPgHX8asU76TswrvmsNAVxqF/FmvVgTlp0yDQ== X-Google-Smtp-Source: AGHT+IGfy6Sw34neGf/PUouNEVeyNpUemfOMLWyquscD+UpTRvYgYMlzlf+gLq0UNytz3y1wNMhB X-Received: by 2002:a17:90a:38c3:b0:2a5:37cc:cc4e with SMTP id x61-20020a17090a38c300b002a537cccc4emr9530998pjb.32.1713211007272; Mon, 15 Apr 2024 12:56:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713211007; cv=pass; d=google.com; s=arc-20160816; b=iV1PcHAFc8RemNdIBhWj2lOzGoDjYaWztEGj30/CVqVKx0K7vwNyTX7NVWbu1qqgns 1PnVZvJrWX6OT2z8xjs11Og0ZsYfWqEFCLxuIx7HpQM9GWbblGSEAAZW9BNHp31xOb0N 7WgF3Mb+QG0gVMPBSuMVH+jyQAcoZU+r0Mpb2uuyLGDCmeiMyQOz10pcuTVCHufQRe7j uyOAJKulM3ojHe/ry963zOHxxAFHwGuswCzX6qDh7DqMe9gCKyHiY9IDpZrKPT4HpwsD P+PeV3izTlAm6PITBEe5JwScQVcJ/5B4estoXWPQ6Rb0I3qxpeolTVVRV7swo0ENijEM sS/g== 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=hZ69zvEi+2hVMHqGREi0s+o1FDmo1qxeLo8vD8Yn8BA=; fh=1d15i66V3vEBsgsVczGyCKTSZsu8SxKjK8NnG2Xt6Xs=; b=m0gpsvm2vd3qqnvJ37ZHRiD0KSW8zL0s6AAVdSFD8ItE66eelxLxNCHUmghsskFroW qA/meQqUqRVE37gWjosmiH/JW0t73dVqLpyx/lTzVA9WOtY1OPEZTn30ctDqekHyaUJd NXAqDtobLiPAGV3vrc/37n809H2FZxUPd6GLAhUwti45xBdz+O7jsSONdNjOWvaj5Lun kqw/CtTiDzbOREv3/zZ5e8+VBkC425kuRyKkzrqllhNEiws3gJGiuFYTDqwhNcoycKFw 2BKJ9N63ekKoc2HBVAxBhtzsWBTKofN8v0z7y1z5wW5chlyZqcZm4pCwFFmIxj2NL/xE MnjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RXSntWiL; 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-145816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id gm6-20020a17090b100600b002a0322b7450si10618201pjb.114.2024.04.15.12.56.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:56:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RXSntWiL; 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-145816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145816-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 36DF5B2222A for ; Mon, 15 Apr 2024 19:46:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25DDA16C854; Mon, 15 Apr 2024 19:35:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RXSntWiL" Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (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 E6C94165FC4 for ; Mon, 15 Apr 2024 19:35:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209709; cv=none; b=QLRpLTTtITE7mHpYOkJ0TJc5FVAm2oHQaqXAv1t+9uzLoW/r+zBC2u8bfoc+wZv4qYZTPba9MgQLofxsskl8jvXwjR77OYZ7Z6eUTACBwj5XahxEmF91nUOVRIR+vHwLjkRNnvvESAZCNRA/L3xmvn0s7K0R1j7t1TC8+zzBJ6I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209709; c=relaxed/simple; bh=sbLzegDZJboKAA9/je+6QpJ4kVwKzeKe1sqk5xJ4+pg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aC85k5SoDMA8KtYMsBknRGuLcF8v0sJvfsATz/iBpRJaBaGHmrQ3y6fyAKiyvx49AQPi3Znt4cuqDNok1GQC9tFjZmdjZCOuCJfm2qEPvr9nR6G5P/9I+tZJVed0GQD25J17hwwAb/OwEVmMmY5ntWa+qumDBAmcElNwIvcw93Q= 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=RXSntWiL; arc=none smtp.client-ip=209.85.210.50 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-ot1-f50.google.com with SMTP id 46e09a7af769-6e0f43074edso2568768a34.1 for ; Mon, 15 Apr 2024 12:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209704; x=1713814504; 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=hZ69zvEi+2hVMHqGREi0s+o1FDmo1qxeLo8vD8Yn8BA=; b=RXSntWiLyE71kiYiA81ZnAMAJVFNDDjTsj2344Bh++m7oSZB6zkq28jsVCwAdLhoT5 CFBB8TIzvhOpRXt3uRq7wtFjH/xY6SH6NjMpWKmK64oiUxSK4cz/1NSf2X5CKEt217ON TkMAeyFxlnnOuSssWf0HdQLyikhjSSceC2xQA= 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=I08AVrzw9i6V7sWP2Esz6TEXP+J4kjue4kSV75ytqFfCk7Bfmvongi/fZpAQMthQrW MCOTJTtfnm5Oe819b014ilPHwX6e2wszU777oBUFFlCH1c20fhD/BpwO12KGEgieZNOy Mvh5ffCbkAtVg3lii1gt5sZLl0vb+IQfO4Ts5/fa2wALSYkWQpKNVLJk2M/7eXhcfcvu yQqamuhcNnaNxET2fUGdtziR+IpFBtdDU1f1RrK0oOj2SrCKmoGrX5ICGJYXs72eL/co HZjCp0hVAeF1iTFZHaxhrcbIdisCqwyAIqkiq4n8VN2qzfLvzL1MCxdCkqGWmDMudiDU e5Mg== X-Forwarded-Encrypted: i=1; AJvYcCU222BCxFWmiYU3Mk06YifxxjxNIiXa9KFdQZTq7ZP7ONNmK8xB6gWymoJjsAxsba/+sn1ME3zHE6QJ+mlI0T4OI7657maEbh7YNgpG X-Gm-Message-State: AOJu0YzKpUXthHY5TZNKCU/vBJwoc957fOY3iAzURYRlkwsFNjOy86MA m7Uq299SdBzWvmuZIhhxkKq+xNeuLeW1msxUNJcFLlia2WY0nZl6VMA90ACtqw== 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 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-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?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/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, -- 2.44.0.683.g7961c838ac-goog