Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp522137lqt; Fri, 19 Apr 2024 02:56:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUIDo7pq4kjWLFXJ+ikMbIezNhcThoiJ1GLHcOA8vgrTgLx7i7akNGZ8PO6Uoff0qBaRIQ7hbX0g5R5dqx29KnrsLQmUmHqoZNHmdJBwA== X-Google-Smtp-Source: AGHT+IFlq+HQo8D0+bAwIljeTHpdgFKzCrU7mmZ9xD/NR0giZ59EVvgjYTlqzaAXhc9Nk9b8J6u4 X-Received: by 2002:aca:1010:0:b0:3c3:82c4:4f96 with SMTP id 16-20020aca1010000000b003c382c44f96mr1762176oiq.28.1713520577635; Fri, 19 Apr 2024 02:56:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713520577; cv=pass; d=google.com; s=arc-20160816; b=gHoEwWvQSyFVwwDgsLtXm52pt5q6CI8euI3REPSe14ZyP3DBjX5bIz+3Wne1wLBRQx 87YDeJhd7i1wkJE4q407JvT4/DwWpn7+UpYoBdq0OiAzqoceltUGioNvRn+xGBy0a8TZ 3lRrpe9dlqbk9k6QSESV8wRt0gmX/uZADOfBcixnVdbByJ9BLQ1emwbwDwcMFu20TZde 7ITZZxKPVE55sDaqvEwnJ2nsYow0Hb0+VzKRBhZRLDGmvu2FLh32jbzW+xNA/0CmXjA5 C4W+HhUpgfC5iB5NqRRS3PS+zoq4eqXu5OUjDTuY/w6xKdh7vtUA1tTg7cqzwYmGkm7h L/3g== 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=mekpuuLwriZD6IkthqRlN7odC9zWZqgKPV8UcJZ7R9M=; fh=8isO+NTGrAYZG+0l5JpBm1IT+AYSRmknnfJOhcMUjT0=; b=s/XyQ3IzzywvvjzVlAKFFl6Y+jCdG5frlUaW8ZFXYoMOg2gvBRTjwLP2ZVAnjiRMNM c30tGwdhHiVzi7vRTWEW/fcTK3UN2xBFJbCpfKFij8wR9cgPYqIHI86mq/Dl3FkUytAO EDLaI3rAkHBrdRROsUz4okeIcLan3iz1DDmGb6H2Td3hYvHv4bbKHLGa+PQLRoPAQtYT RcUX9Q9R0fNGbUOXhfIarUxR78PVopk2SMQULTI7tXVHPqIXMTkM6ZyL+Y4m9683UDHE G7Rk+fFN8znZQGNZ7u0QXaq2/oIl39SyDaZvQjzOMMBeDZpQ1EwtJ8ZtQaA7xk1JYWum LNBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WgYpMSDD; 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-151269-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151269-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u3-20020a05622a010300b004379622bf38si3417888qtw.6.2024.04.19.02.56.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:56:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151269-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WgYpMSDD; 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-151269-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151269-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5C9D01C2105D for ; Fri, 19 Apr 2024 09:56:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA8D813175C; Fri, 19 Apr 2024 09:49:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="WgYpMSDD" Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (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 99DB812EBE7 for ; Fri, 19 Apr 2024 09:49:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713520188; cv=none; b=dH27mbgPLpnpnLAKNuZfCHdsSauEY7ue7h7jnFEDWAVw0FedtkirgMg5/Fn4db7w2mvli77j2hkt1cnS7mESJUTfugEnn2sNEKeNe7WcbIxeX5SdysJNp/ur1M1r4nmcjdy+0tAjEJWZM/uEl7hCeQB0AzxjII4BBtxlblT1iYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713520188; c=relaxed/simple; bh=jFHnju+ZdbBnojvlGLEr3gz0wIbcoBJYXFqf+F/VYB0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GIXRnnG3jWhXoD6fHrnMtRSPncXd+NE7r0TUkNZAtWDu/CVlZ4Q+IyYpAk39jiuie4w+BT+1EGIQTOi7RdGP9Pd2svieLXUDlzoMs9941gViQ90OjMRzpggKqIHQjVrl6KGE0HBcoE3FFh5c65Etlmwmy114QdtO624aPmWrWCY= 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=WgYpMSDD; arc=none smtp.client-ip=209.85.210.54 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-f54.google.com with SMTP id 46e09a7af769-6eb812370a5so1043431a34.0 for ; Fri, 19 Apr 2024 02:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713520184; x=1714124984; 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=mekpuuLwriZD6IkthqRlN7odC9zWZqgKPV8UcJZ7R9M=; b=WgYpMSDDXpDii8zmer7+HldjnDrF7NN8f0zMweQAaxH6rqerHSTRoPUL8lOjVJAgX9 5j4+qyotpPtLMW0lbsQUQCkEATtngK7kJezpLUUYSI3qWd3JGDuRGnmJkv1Na/euGFfW GFUst8h0+ZdlIlNFt+yrA2nZMaarHwVFsDnsc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713520184; x=1714124984; 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=mekpuuLwriZD6IkthqRlN7odC9zWZqgKPV8UcJZ7R9M=; b=YGCMQWbdXqRRTOZmQjh969zlnZrNhXGp2UENL8hj1KssZeZVHgH1ZWzkpoygZtUbSQ WQIdSiqMyb/uYQLgST14y84iN8+JgPWZLoaUBNfu7jj49fJLfbXW5QJT/OuQsIpHwu8K W7z8CXeS2mhdmuesrkxSuthckAQEkfIEFzpw8Img3nduaXyhtxGSLC4B9AQM3KU23zrL aI1nRbr9fSyySmRv2AYccy2968+ojzA5hn5frZGaL9AUmmUT+0EIxj448d1p7b+OlJqs SF1FbYQi0226fSA9VPauYx5T3q85zEiM5JVOqIHFvflCqTdBrTd28f+l4RrWNFouEjgf bOUQ== X-Forwarded-Encrypted: i=1; AJvYcCWLlQch6sZwmlAs0CGI7gyUcfHfRfpUH5kfJBNVW9gpIOP1xn4xzCbao1qfxlRlP6ABLRW26YEM3kel6CbyLlvmsayS9ReimFBKDOfl X-Gm-Message-State: AOJu0YxH0Vcx6EqVFvHZWA6MAZtBvYMvg7UXdaOpzi7lypJZevvojEKW hOENpHGV3QVem3Wwq+4CxpRTR33BPmC28o5EIoCWpHgas0oBpQtfSES6ScHXMA== X-Received: by 2002:a9d:7f03:0:b0:6ea:1dc5:514c with SMTP id j3-20020a9d7f03000000b006ea1dc5514cmr1695945otq.11.1713520183703; Fri, 19 Apr 2024 02:49:43 -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 dt14-20020a05620a478e00b0078d735ca917sm1434532qkb.123.2024.04.19.02.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:49:42 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 19 Apr 2024 09:48:07 +0000 Subject: [PATCH v2 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: <20240419-fix-cocci-v2-21-2119e692309c@chromium.org> References: <20240419-fix-cocci-v2-0-2119e692309c@chromium.org> In-Reply-To: <20240419-fix-cocci-v2-0-2119e692309c@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 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..93a40bfda1af 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_s64(ui_4, link_freq); bridge->r.clk_lane_reg1 |= ui_4 << 2; return 0; -- 2.44.0.769.g3c40516874-goog