From patchwork Mon Apr 15 19:34:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13630647 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 9ED3FC4345F for ; Mon, 15 Apr 2024 19:40:06 +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=riWBDqiJHvRazSGQl1O2QhP51XoLLbWAaWRN7YSpU/Q=; b=kazltkL+OW0Ofa gGwMzDI0NtmIdoXmrDfyEFiPbsS3UVVkWUKPBBTifG30zDXsPS4MOUXKD6ZjtLGbQU3fPRzPvglAA gsPykCuF+T+YjnfF+/jy/jEB5ko+DjEXAOxUhqUoZcTIlltezlEDayHwFJ173gwDUBQJ6nmChQoyY A2REfIzLu/4u0k3BnOdDnu6zmd17zN+MNgiHeZyS3q8P49kJB/ABI/oNaKb5ANli8SRDuIOcSd2p2 8KhIzgmyiY1tYqG7aDJVHRES/ZwUA4jRH2fknEK7rJFnCJshS99DsJwF4tHvAmSd55BWGS9YcW3dg TZP9HRgwbwBxY49RF4QA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwSBG-00000009f7Z-2rCY; Mon, 15 Apr 2024 19:39:54 +0000 Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwS6T-00000009cB3-415a for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 19:35:00 +0000 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-6114c9b4d83so28625657b3.3 for ; Mon, 15 Apr 2024 12:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209696; x=1713814496; 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=uh3OglTS/dLlK8U5oP5C8O8FlJacnVYJb0xAej3AKiQ=; b=eh32KnmL7BUdm4tpZVfbpeA2osIpp8cO/3hzk1ShbpbWT6b6a4bWq0PpOTQom345jk tRCqg2IcLivSVZCwF7kydZvKC5t1EobGrxCX0/eyf+ljAWWsVAYg1EDMk9e0eYxxvGNc 0bOEBtLMfEcT2pHE2OcG+uPKiY5orWNmupJFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209696; x=1713814496; 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=uh3OglTS/dLlK8U5oP5C8O8FlJacnVYJb0xAej3AKiQ=; b=X+yw4SF6CZZ2vGL4U2CMoiBhSAmH9kEni65Y3WV7iTWnbD/0tHMQJJ3/VWGt7DFQwY 7mC/kL8lWbVQ6gy2aVfNPG9o7oOM1wE9d01o97365sz8KhMT90UBHB8ewb2cFV9pOXOZ 3NOm/zdSAKyTJGovZzeOBEPAklmAaxaiWeSnCOzMubeU8sE9oqHUyRM1NE1Ft6MzWjhD UhJ+ZfHSbDJV+fNBtbE/C3t3zbhEtSRYnSJ0RFdLIfpUxaLYECXkFGqMo5bGEOQamVKe pyKJEz1KZdWp9KA585sDLP4LmKlRMIFzOkWaepGx3llG2aapClTVuD1v2XKt1N242J93 PJ9A== X-Forwarded-Encrypted: i=1; AJvYcCVi1MeMSS0va01G4ip7oWCexZSTOHVQseW5bDk4xdDkZTGuTmIcle486LRvgBJsfZvldFf6xJ51SqqSBS4uyEguuPfPFts5RBLiwbs96ofqABLIpYc= X-Gm-Message-State: AOJu0Yy8r+HBChHZHvBGXEI7IfNimgtf5VuQP6SYTqJxUqdTzma0ZrKt Cl2ExTLYb1I/zMgWtVBuTWzcUxktMisFsEAOh39TaIaREpnMe8QuYpCVCebaKw== X-Google-Smtp-Source: AGHT+IG9BJHIxhgRtiyDrmvRjmvCt0KkebPpr6qQTdSe7jE4SlMZNfcxa6IYFxpia/6VuZ7zYE1XoQ== X-Received: by 2002:a05:690c:1c:b0:618:822a:e69a with SMTP id bc28-20020a05690c001c00b00618822ae69amr9192708ywb.9.1713209694201; Mon, 15 Apr 2024 12:34:54 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:34:53 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 15 Apr 2024 19:34:40 +0000 Subject: [PATCH 23/35] media: dvb-frontends: tda10048: Use the right div MIME-Version: 1.0 Message-Id: <20240415-fix-cocci-v1-23-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?Ni?= =?utf-8?q?klas_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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240415_123458_153313_AFED4D96 X-CRM114-Status: GOOD ( 11.40 ) 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 z does not fit in 32 bits. Found by cocci: drivers/media/dvb-frontends/tda10048.c:345:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. Signed-off-by: Ricardo Ribalda --- drivers/media/dvb-frontends/tda10048.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/tda10048.c b/drivers/media/dvb-frontends/tda10048.c index 5d5e4e9e4422..b176e7803e5b 100644 --- a/drivers/media/dvb-frontends/tda10048.c +++ b/drivers/media/dvb-frontends/tda10048.c @@ -342,8 +342,7 @@ static int tda10048_set_wref(struct dvb_frontend *fe, u32 sample_freq_hz, t *= (2048 * 1024); t *= 1024; z = 7 * sample_freq_hz; - do_div(t, z); - t += 5; + t = div64_u64(t, z) + 5; do_div(t, 10); tda10048_writereg(state, TDA10048_TIME_WREF_LSB, (u8)t);