From patchwork Fri Apr 19 09:48:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13636103 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 421E8C4345F for ; Fri, 19 Apr 2024 09:53:24 +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=mhFjwTcMOAQ/YpUwuhT1CprISPtVr4aFJBjGD3DIGQo=; b=NnBFdkTWxqR/+8 efZOFHUEfWUwrewFziyfR8vx00wHzacRr9Zuw6EmqPKm/ooaUukmSAcayroWVBy9nSrtLJkHUC6/j /SA/Kx/noj74eN37vFmoMPzhwWbLPKp5hX5DQPkmwYZPhE8P/eunfEMjqUbZkYw921v8ECHzzJE+N R/mRDlRqty0tuz/wSftkUrD5K6F9vZ/W3voCFdy2i6zkud01lMEede23X/9KWr4ogdjFuHcMIwN2q PTvIqGlHrQPp4jhmf+DXFxK2T5lwAPWdoOVjj/nI0ctAiCpfPOiNWpd4UkYVpUjcYuxDq2NDEgpy1 qh54HOml9Ij7zhfJ5SVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxkvg-00000005B8x-2eAU; Fri, 19 Apr 2024 09:53:12 +0000 Received: from mail-qk1-f173.google.com ([209.85.222.173]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxksM-0000000599C-0ivi for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2024 09:49:54 +0000 Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-78f0e3b650cso84744085a.3 for ; Fri, 19 Apr 2024 02:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713520185; x=1714124985; 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=H+ICFE9T0WtFgFxAAIzneJg+RkmVbFrs0mrpkqFICS0=; b=BUe7SwGzZ7wMpCg6yglCc/aD97ISFXBqArZlQmN5vvEMMjnUJEKyLQvTTGB3t6WC9C O36gUOyFo1E1vwb9Tln7aiYt5F2PQbCmgjx+AjKzmQfESxDNILrky1gH7c09FB46EcoR 0o5erMo10B0tRsCT4a1Q8dP1AWTy3z+WdaVW8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713520185; x=1714124985; 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=H+ICFE9T0WtFgFxAAIzneJg+RkmVbFrs0mrpkqFICS0=; b=bDCK5UdXxgVnM+ncHKlv7OK0VNWcjZj6Vip09Ba26WCYj5RnAToPAxIJbbYJ7y8emj 0ZrtwbV4ET+pIUZuN8YLBpxTdUwC7TN0X7w54+g4iEdZ1O7barb97LqsADMNO2UKh2LW D9chdW5glQdFUaujOOyAXr7HU7A/6aA9zkPWYBv3TyhOZGiHMOi2lRV8nKwjKqj1nrFB a6+aL7ckq58wOSx4d2BkDk5WtL3bHTrrr19v6tOKnVs0BAofq9PkUCMNq7+C0RVZ/8UX 7Ibozz6BlRc4mBrxzN35ww65jVZjGpZzqrAsylfMku3OLTD1NKrAnvFh2KfD2fliOkgp yWMQ== X-Forwarded-Encrypted: i=1; AJvYcCVSxjVx5rc8CNVhbkOimFRP7FFCBfHj5j0cNtVQheVBHWuV3/57/7ugHGY+1CB+ncADqVDmSZIAvlxEYSIYmqMcPVheeZPeSqOqvNa3ruCqJdIDygY= X-Gm-Message-State: AOJu0Yy26AGYmp0GuDMyWvn0UYMUKDafY60qnTRPB6V6/gX+X+0eDOq2 z0w36XY3VJ5e4T0IcyiEbopCmKaPiqrR+j+NvC5Y34Behe1FZUV1UOhzCkUuqQ== X-Google-Smtp-Source: AGHT+IHphQGghhdnaPa8294fBxI47z+y4xb3Msllejvsy/cEZHbt70Y742XZJgUuOJUmQOPF+5kWGQ== X-Received: by 2002:a05:620a:1673:b0:78a:33f9:908c with SMTP id d19-20020a05620a167300b0078a33f9908cmr1816540qko.36.1713520184948; Fri, 19 Apr 2024 02:49:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:49:44 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 19 Apr 2024 09:48:08 +0000 Subject: [PATCH v2 22/26] media: tc358746: Use the correct div_ function MIME-Version: 1.0 Message-Id: <20240419-fix-cocci-v2-22-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240419_024946_456736_55E22492 X-CRM114-Status: GOOD ( 12.16 ) 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 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;