Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1426420lqa; Mon, 29 Apr 2024 08:10:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWY0RVAAKybesKPREI+7DO9+aSoyeJc3Qqz0jqVK0vg6SkQfJbcUt8bzDFw323Ka2c/AP73PRkHWgdQTgVU6mOnNjrteRsjN7lAic6Gcg== X-Google-Smtp-Source: AGHT+IFtMjbqs7C8ZYpBcEUQOczt6JUhKRxRaPUbQmzDz2jkWaOtkz2vGWN33r6A4xkk+JuDLYdj X-Received: by 2002:a17:906:434e:b0:a51:e5ac:7b7 with SMTP id z14-20020a170906434e00b00a51e5ac07b7mr6322513ejm.71.1714403451647; Mon, 29 Apr 2024 08:10:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714403451; cv=pass; d=google.com; s=arc-20160816; b=0gGTbogbaCMibym9phLtEGi4zBrEIfNnCKqntt1JgF6hMl5NCZIICIBIrVLw3WfoX9 chBIVRtsah8rFFJZLTLvJ6wJ/IlcRq3RReHdazC/7szxnz6dlv5V6nBFJLu7O33GLdrp QPKFTUr5ahJPyFmYzcCjADFWF/FWK2rwxEp74UkRrUKkGXLErvnz2P2qxUaFjYxGcnsG VYYughHFhf5BBUWXpq+gDe3blvTam5XC9Diy4CHHP/v81XhZLEJzqPyZtMn8bz6hp+JE RlYvYx3FADbtkk70n9Oqks4w+bNMpfE5DmHBjswAIk9pdPJ9+0ALoQdRST1x7ASUK4hU PXQQ== 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=8OKO6D6+Uymjr7y5phUxNbL6FrIK2B37/+KaDSdt/b8=; fh=45V/lcK6o0oHCgCYQuIX1M6Tn8W9HjqldYKOhKxR7Ik=; b=jEyggKXGIvdqrLtc3lC6gjoAMctOYRkLsnsULgOj/U0rvvAMqsiUyW6MiVDMmeNuJ0 1Aw7Ibj7NTBRO0kZCYlv6ofMcFs/1bJrIknBbH+yCxAsl5SZouHxQJCusr0wZRDkM488 QJ2aLLU2JJ9CoqYAYbWuXZUsuVQKVkk1UtldhIzcte+RoSLKqbfhOWrUYt5Yf9eT7CVw EocHlarBhTFP7U8kNNpI8lVQOfckQPQNixbUa3VEsAShI0RwOhyYKAnpEx+fVyGtBrJM es/HIISHZmEPL7zw7P/FZMFr08Klec6m7js2s8THTSoUnqGYmXDtOUFZ02QIGjf9Gk26 yHYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GETCqChc; 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-162531-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162531-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 g25-20020a1709063b1900b00a58bca8f517si5268759ejf.991.2024.04.29.08.10.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:10:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162531-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=GETCqChc; 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-162531-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162531-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 2F5161F2240B for ; Mon, 29 Apr 2024 15:10:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0BA4912CD8C; Mon, 29 Apr 2024 15:05:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="GETCqChc" Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (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 55111127E3E for ; Mon, 29 Apr 2024 15:05:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714403113; cv=none; b=BL+KJVn4/MmNzoNZOOmaV6fYC/4Fs1J0o7xbiOrPpSgiUSti1D+YlHzyRFHv1G8vh45GwNrzyN1tEDjIiyEVzPUuCr/QOM8BoTe207bD8Y7s44Xl7s3vAGIo1AcvXl68uS9HxLxoMQzsQHZERPlX6qUbcJycp/UEsiXlojiPA+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714403113; c=relaxed/simple; bh=jlNXpmWLkhoBvAVUnCnFp5WG/uIoSkDxDimhD2tWIcs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X/aGfT6fuMed6hRQpzCe5YIosJ93jZYUDe6oEto+K4ZP08J8m6w6MVqiQO44C58V5rLb2p1fuJEQQV5xiX7ap/Q1c/d31eb9J8I81saXsu6RqRHhuq5n0JzfxOmj4pTSbG3vKPHtfqC8xf5Arninm+Io8ltzMqoCVmqdoGEv1TM= 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=GETCqChc; arc=none smtp.client-ip=209.85.222.179 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-f179.google.com with SMTP id af79cd13be357-78f05341128so332494685a.0 for ; Mon, 29 Apr 2024 08:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714403105; x=1715007905; 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=8OKO6D6+Uymjr7y5phUxNbL6FrIK2B37/+KaDSdt/b8=; b=GETCqChcfONsF0dJDFClP/kLeOj/aqoqXRdwtkdV4e6PmTBm6rnHESjp87BM9fQzdq bWR99m7Tu9GcyLytDpNp5cRsYn9UMrJxeH+N+HvTWnxwWneyrAA+lZPYkVokFpdnykdN QYvkJzfM2Ka1g66CtDLmbwwqWVZttatVpEUPw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714403105; x=1715007905; 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=8OKO6D6+Uymjr7y5phUxNbL6FrIK2B37/+KaDSdt/b8=; b=LlaOOiocOVmzYwcV8mb1HO6Mp+5bQRAnM3H2jWIJagg7qWwNA8laAq0RkXgqhXV/x6 7EIREaDAfmz3l7hV0lt+1ru6RhApM6IeuwbVVyixwAdCC1N8sfWyPKgNW20ngn8raqBP YQs1dnYyO5cuaDQnePKfMZ/9zuqFUOZxKcSb7mff+Cn9QYevZm1Enwb3AEfEk3Yi8Yz7 j0nAPZLr6t3F3fqLS8MLZRPRws1d9JqVmt5Qg3GRmniluS4kvPZGRpswKBJwMuX15FCS 7zk5d/P8g3HPZZfsX3w0Xhn2WYxrXeJqBQqlyE92eJhZfzDYJJnVGWHBptImxJr9CWQt vxUA== X-Forwarded-Encrypted: i=1; AJvYcCXuJTRRImEA++UVeZdajY/s812ojfepaRVF6WPcwACKyCwvKklcCQ+SnXy9IAGVQ8wUrN/dWnbyC4Zn6a193KrdxTAZqe1LIBQ5t2iS X-Gm-Message-State: AOJu0Ywgv4M44COeFr7tPfZ60HKrzvkTxglgM1nariJsGLdzUHPu6no5 B8a1wX39fK/4SnVaRMP41Uavd9yaASTFXqP11zTxhY2nXi05fKvjl571G3+yEg== X-Received: by 2002:a05:620a:561c:b0:78e:d4f6:3949 with SMTP id vu28-20020a05620a561c00b0078ed4f63949mr12152221qkn.25.1714403104299; Mon, 29 Apr 2024 08:05:04 -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 p7-20020a05620a056700b0078d3b9139edsm10568591qkp.97.2024.04.29.08.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:05:04 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 29 Apr 2024 15:05:00 +0000 Subject: [PATCH v3 21/26] media: i2c: st-mipid02: 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: <20240429-fix-cocci-v3-21-3c4865f5a4b0@chromium.org> References: <20240429-fix-cocci-v3-0-3c4865f5a4b0@chromium.org> In-Reply-To: <20240429-fix-cocci-v3-0-3c4865f5a4b0@chromium.org> To: Martin Tuma , Mauro Carvalho Chehab , Laurent Pinchart , 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 , Benjamin Mugnier , Sylvain Petinot , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio 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 link_freq does not fit in 32 bits. Found by cocci: drivers/media/i2c/st-mipid02.c:329:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_s64 instead. Reviewed-by: Benjamin Mugnier Reviewed-by: Sakari Ailus Signed-off-by: Ricardo Ribalda --- drivers/media/i2c/st-mipid02.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c index f250640729ca..b947a55281f0 100644 --- a/drivers/media/i2c/st-mipid02.c +++ b/drivers/media/i2c/st-mipid02.c @@ -326,7 +326,7 @@ static int mipid02_configure_from_rx_speed(struct mipid02_dev *bridge, } dev_dbg(&client->dev, "detect link_freq = %lld Hz", link_freq); - do_div(ui_4, link_freq); + ui_4 = div64_u64(ui_4, link_freq); bridge->r.clk_lane_reg1 |= ui_4 << 2; return 0; -- 2.44.0.769.g3c40516874-goog