Message ID | 20240415-fix-cocci-v1-8-477afb23728b@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 EAA50C4345F for <linux-arm-kernel@archiver.kernel.org>; Mon, 15 Apr 2024 19:36:51 +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=JLnjav+r21V5ItwAxxzEq2sheNPN991mPqdw3qf1ojY=; b=AB1jwa85gmHTir ILWU9dQytZZ23/DmkpUolc7cFJkHJVKDArwCDVIGqHRC7s06CyU94Jv/K8z7ieK12E4d/Rxv0zmIF jFHu2wFlrXU3Lrpbj6/Lr26GZYwG6M0oDL0GAdkpk1KxuIidXqkgKH/MAlScbHOxnfKOlELBLUS64 idcLVheknxd15n7jmAmQG6l6TkKU1bpSf1Rt2Pl9MlHgFUV3vU5ixtnX+532sl0dyxYEjonQ1q0cL aEYnrGHhBqcgEp8sNWjdnfpkJmBorTICbLAgSx/a7PfR+sV2/HPvOk3lAppPwfFxJlFVfCil8JrGx CTaChV6FzIAcbKADlh0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwS8B-00000009dF9-0NWa; Mon, 15 Apr 2024 19:36:43 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwS6P-00000009c7h-0ZiT for linux-arm-kernel@bombadil.infradead.org; Mon, 15 Apr 2024 19:34:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=ISUo+c+Z6d9jp43vDna7WArpy0Bh/pUYqJP92YgrR0w=; b=l0Av8raC/o2/XevB/036t1E2Ec 1J42zTeqdJs7JfgPW4rY+Y6fMX/C0m6rLd784+AVCc4jJxb5DDHflKIqllNdNQslnprzrLgZIOoKt 0WaI6qTQvdZzw4FdTPSnJ4wdyiq4YzxH7eafqQrh1NIENIoBTaYng+IVn/8iHAPQM9OXpzj/rXHOI q2/02x97/XyEilzZ9/8rL3oaqdXXgZaCKkXTdsJNJdN2zHb2fD1t2Ev7XcO3Tkfyeieoue0YcTA7F cb2ZjG6ruwNdp1GZtD7awhbmr6W0X3y8dpiqRFo6/yH5+4PzpUUGJWqSoFnezYehAElCf40QN/lHO PkA0AX6w==; Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwS68-0000000AifN-3YL4 for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 19:34:42 +0000 Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-78d555254b7so293822185a.1 for <linux-arm-kernel@lists.infradead.org>; Mon, 15 Apr 2024 12:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713209675; x=1713814475; 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=ISUo+c+Z6d9jp43vDna7WArpy0Bh/pUYqJP92YgrR0w=; b=ZLnXbA3mqK2Cf2rWguyE35J/nEps1Al5jk6H+nmWqyO4aQXrMTd5prsKm+fco48SAi Hmh9StfZPWwfBUN485PC4JRl/ZQfFzcN4vA6EIsT+9NBP1Iw/G2Ren5ixp//3ffhMpHr mXZ9/E3Zt7uHT35GNgTr7ggrz7u+lVOypnPcI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209675; x=1713814475; 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=ISUo+c+Z6d9jp43vDna7WArpy0Bh/pUYqJP92YgrR0w=; b=BV4YoWHuh8UeGUXi719dczRvrN5SdNYPsNErZo6mO02d0/1LvkguUKIw6dm301PQkz qY/DFTF4nVm9P5Z3BoPUbZWM6FqYV1F+yZTainnWyQHoo5CvVKdeLwNKMrpFJyMqpIH5 aluIB30LkCXIdtcqrXCJBE5FWKgV7S6G4Myo4w9yMkCD5AQD44EI89fTB6JbNC4TpOEn mCZtCmrEMotfn6Q4RZGs6H+GupNZr+Y7NgtxofkC4QsBZvQOckqxRWd3hekzVkFpwcCb N7Q0dOjSENY381fHTepFpqxFuJaJHm5IArjhDy7HqeXXt6p/amPIkkBksSjUAgRsqfC2 5daw== X-Forwarded-Encrypted: i=1; AJvYcCX+VyHzvC6KlN1EVtGxaJfCilJfALuLzHuo8rd0jTzJyI8oUvH92InaGP78WRLgYvwNRLZYZsJafruxBerStgBO6gARxL3jRHOFYa0zTHUc4kSRSjo= X-Gm-Message-State: AOJu0YzsZrMysGc0uNn5qUBUxDpNRqMgMWOyxtSgodHtQGlaku0TFppX gq0BF9BjpTmxzx5kJAZuw+kcwhgrUamrgGv4lqMdY7WEdJ6Y+u4/TphqPPSAJQ== X-Google-Smtp-Source: AGHT+IHNEVyzd3evramKoXF4voaYnhuPvr7ES/TUx15oMijuB+fT7oxPAB5JZ66ego178FVyftQu6Q== X-Received: by 2002:a05:620a:470f:b0:78d:3b55:21c8 with SMTP id bs15-20020a05620a470f00b0078d3b5521c8mr1321999qkb.24.1713209675268; Mon, 15 Apr 2024 12:34:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:34:34 -0700 (PDT) From: Ricardo Ribalda <ribalda@chromium.org> Date: Mon, 15 Apr 2024 19:34:25 +0000 Subject: [PATCH 08/35] media: dvb-frontends: tda18271c2dd: Remove casting during div MIME-Version: 1.0 Message-Id: <20240415-fix-cocci-v1-8-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 <martin.tuma@digiteqautomotive.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, Hugues Fruchet <hugues.fruchet@foss.st.com>, Alain Volmat <alain.volmat@foss.st.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Paul Kocialkowski <paul.kocialkowski@bootlin.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, Sowjanya Komatineni <skomatineni@nvidia.com>, Luca Ceresoli <luca.ceresoli@bootlin.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Hans Verkuil <hverkuil@xs4all.nl>, Sergey Kozlov <serjk@netup.ru>, Abylay Ospan <aospan@netup.ru>, Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>, Dmitry Osipenko <digetx@gmail.com>, Stanimir Varbanov <stanimir.k.varbanov@gmail.com>, Vikash Garodia <quic_vgarodia@quicinc.com>, Bryan O'Donoghue <bryan.odonoghue@linaro.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Benjamin Mugnier <benjamin.mugnier@foss.st.com>, Sylvain Petinot <sylvain.petinot@foss.st.com>, Jacopo Mondi <jacopo+renesas@jmondi.org>, Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>, Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>, =?utf-8?q?Ni?= =?utf-8?q?klas_S=C3=B6derlund?= <niklas.soderlund+renesas@ragnatech.se>, Pavel Machek <pavel@ucw.cz> 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 <ribalda@chromium.org> X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240415_203437_628058_CD93ABEA X-CRM114-Status: GOOD ( 13.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
media: Fix coccinelle warning/errors
|
expand
|
diff --git a/drivers/media/dvb-frontends/tda18271c2dd.c b/drivers/media/dvb-frontends/tda18271c2dd.c index a34834487943..fd928787207e 100644 --- a/drivers/media/dvb-frontends/tda18271c2dd.c +++ b/drivers/media/dvb-frontends/tda18271c2dd.c @@ -328,7 +328,7 @@ static int CalcMainPLL(struct tda_state *state, u32 freq) OscFreq = (u64) freq * (u64) Div; OscFreq *= (u64) 16384; - do_div(OscFreq, (u64)16000000); + do_div(OscFreq, 16000000); MainDiv = OscFreq; state->m_Regs[MPD] = PostDiv & 0x77; @@ -352,7 +352,7 @@ static int CalcCalPLL(struct tda_state *state, u32 freq) OscFreq = (u64)freq * (u64)Div; /* CalDiv = u32( OscFreq * 16384 / 16000000 ); */ OscFreq *= (u64)16384; - do_div(OscFreq, (u64)16000000); + do_div(OscFreq, 16000000); CalDiv = OscFreq; state->m_Regs[CPD] = PostDiv;
do_div() divides 64 bits by 32. We were adding a casting to the divider to 64 bits, for a number that fits perfectly in 32 bits. Remove it. Found by cocci: drivers/media/dvb-frontends/tda18271c2dd.c:355:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. drivers/media/dvb-frontends/tda18271c2dd.c:331:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> --- drivers/media/dvb-frontends/tda18271c2dd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)