Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1653104lqp; Mon, 15 Apr 2024 12:43:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVErwSDVM+BRq0yI7viUzsXF9Ewu6O4RtFq0j4ZiWDe11jynPEvnq0hJzgbePoOlLLerlX3oK0VjW3t8KF0EqHj60Ev3cOut+/JA2oMCA== X-Google-Smtp-Source: AGHT+IHa5Pzx0WKQNklz+miCwG22sjuNSkmRWNPqHXCLELyuelWB398C7IJtK0DY4lWRfGzaE9j8 X-Received: by 2002:a17:906:375a:b0:a55:144a:adb2 with SMTP id e26-20020a170906375a00b00a55144aadb2mr1416814ejc.0.1713210214713; Mon, 15 Apr 2024 12:43:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713210214; cv=pass; d=google.com; s=arc-20160816; b=kMlG7bJHmuccbVPVn0/DAoNSUWQlR9xFYJITZEV7d/dReyqP+tZfoQOI/UCEaJ2Ik9 gkyvLZifeAex1RcZEoFB3/CDu8ohTOJAGjmNcOnpbMYisEvQjfonQH03suhkfynur9ux ng9CkzpUrv57t4mvAdlg6jhsuBuByl4kcAh04yWpPXvWysBm3WbOD4orAu2CI6onu36H D1QfhkzapI+eeP22JX+u6rfU6kADslc/MNQ1EAgOla0T3ofP3rLZ1b9AlUIweVDqOUFY jjmViN4m4uMH9/PZqw2VxqWi4Y/Ya12wAHhEStHIUM6tUS5lHD+ge+rBer+U6muRXLxg VCng== 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=QeRLp7zsOtUSdDFmgCUblI9njYJR1iKxSTZ/4ILbF+w=; fh=JHdOAdENhGz6TkkmgVFyPf1nfvCEO6Sn+nMN34Hc28w=; b=LknnUJE+DH9fsjwdXhKoUAxLkM09kq9o8qNU0+yL7D1tEcVekqoGKbYnXssnY3coPw V4Kl1YHPwOu2BYTsIxj+9sQuCTOqbzsUjqR3lmmq30lsa8PcG0+SBf9BeF7ieOJeJSl3 GIJ0zxtqw/QnQ5p2dVZltD553qM8dceBla+DPJjQfJAjmQL+/sCq7ig8Ut0IwAOsFeze dmWSK6RFnqfZn7Dktr+Rbbzcwd6G9tH2PN3bFVW/kLIPfYBOayxC4ekJDoA2azD2PZr+ t9wRvyJ6lt0sIltH+Cf+x+z+06q2BFkvuPq8WXD1YHAzZC+r6BVT/foQkl/ALAxhXkgA 1Fyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KgHgJ80H; 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-145806-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145806-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 u5-20020a170906124500b00a526bb5f1b1si1113497eja.942.2024.04.15.12.43.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:43:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145806-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=KgHgJ80H; 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-145806-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145806-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 6F3931F227D8 for ; Mon, 15 Apr 2024 19:43:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD5FC156674; Mon, 15 Apr 2024 19:35:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="KgHgJ80H" Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (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 F3284160795 for ; Mon, 15 Apr 2024 19:34:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209698; cv=none; b=JbE5S67ZqmqZhGBB6H9D65jVcTrDBvneQVsRSO60AmC8MgQkzX1HTfzqkGsdPG9J2cdxKeCTonFCsm14JjuSTC95UFFzjoFR/eGG6pN+ZbzAvw4TAfg2IQ3Ov7xO494yHuNBV/nzjPTGTxN2drhosaWszNLAAneApaNI7bWcEaI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209698; c=relaxed/simple; bh=MeqIMsotIT3P9woLHFJMFBDW8LpTmviMFwTz7YYEGwo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LyWyidTJr6YDdTNwWjZq4y9L6txuGfcPK2D1Cs2/c+2SXr3Jxudh4CcvvWhZrgxZLcbQJNHFGWn0yNyjhWlMfYU+esMTDZEvsaJeV/PiwFHdZEBERkT8ilc3KQMpj2hXgCG0Dk+DNwb9zD+Yd31ANniZUFSwhATML98bomPM/zA= 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=KgHgJ80H; arc=none smtp.client-ip=209.85.210.43 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-f43.google.com with SMTP id 46e09a7af769-6e0f43074edso2568645a34.1 for ; Mon, 15 Apr 2024 12:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209695; x=1713814495; 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=QeRLp7zsOtUSdDFmgCUblI9njYJR1iKxSTZ/4ILbF+w=; b=KgHgJ80HygA0qWSD44seEiydXYfkDaDM3X02ovYaEVQfenn2YlqoQnz0djULX6PoOw RaAK5411SAo70xohtPizv+eU7w/NzHkbAJ3R/HvYWgaOBuWYPZklnUvFV17n/ECVjAAa sU38IiTLOjfo1JMgByG4WZQfUGMejiVL0x/vk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209695; x=1713814495; 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=QeRLp7zsOtUSdDFmgCUblI9njYJR1iKxSTZ/4ILbF+w=; b=XSon7yDVZ4GQuJ2uiy1oIuq3lt04oEi/mFkMpBDZeH9wFV4BIb3UIb2usau9AD7kFv cOiSPkD25t7NXqqsdSsQHIUGC+n0Z5RFgPuo2fxP+BusWHe3i5HQF6XjMjpXd3H9npn8 E97JYoVRrGSfz6eon5Prn09sEfTZKlvnoG7ndnq/sc2PAof/3IDf93vJwZNNbqw8FO5M rl1xfycEC4O1PBT1/mqwF/Mz1L14sYtiiGP5eYNOzg0iUtBR0d0B844vb9DZwaF+FZmh YUkc07zdWX08qLWJQMG6LOf8q60xH2m7ugXFvjMyAqY5Hdgck5eIbROJCAZj1r6gcuq7 JKmg== X-Forwarded-Encrypted: i=1; AJvYcCXid28tMcc0JVMBR4YdmyoNKjHF1nYkSMak0uQfsc+uzld/ZLL299McKiQloOxmLzzDd0GkZzomb3ai4Uhfb5C6SKrW5t1Pt+8nCwj9 X-Gm-Message-State: AOJu0YxgZtWAY7NiRcMfMK2qQMlaKudcLneMLtlGRxyacvL9m+jbNB/W UX6P2m+GFCHl2+tbvVLxIYophOHJBUzkeOxJE9b8hvU4Jh/gRMKQTs4WtzFY+w== X-Received: by 2002:a9d:748b:0:b0:6eb:7d1c:f793 with SMTP id t11-20020a9d748b000000b006eb7d1cf793mr4227322otk.31.1713209695186; Mon, 15 Apr 2024 12:34:55 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:34:54 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:41 +0000 Subject: [PATCH 24/35] media: tc358746: Use the correct div_ function 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-24-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 fin does not fit in 32 bits in some arches. Found by cocci: drivers/media/i2c/tc358746.c:847:2-8: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. Signed-off-by: Ricardo Ribalda --- drivers/media/i2c/tc358746.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c index d676adc4401b..edf79107adc5 100644 --- a/drivers/media/i2c/tc358746.c +++ b/drivers/media/i2c/tc358746.c @@ -844,8 +844,7 @@ static unsigned long tc358746_find_pll_settings(struct tc358746 *tc358746, continue; tmp = fout * postdiv; - do_div(tmp, fin); - mul = tmp; + mul = div64_ul(tmp, fin); if (mul > 511) continue; -- 2.44.0.683.g7961c838ac-goog