Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1653484lqp; Mon, 15 Apr 2024 12:44:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVgi3p4uopOr5U5zhHbCzD68bAc3V3cShWjuA4hD1MefTCe6IaHTNjFEniJZCM3itpLLsumVOEDlWHZfF4nKg01n++ZVHBIgZwojG/VVg== X-Google-Smtp-Source: AGHT+IGNTid7SMQVq5AMcPKU4jOHkCR9eMr+eUAhqBLTSPRbU8mGx1UNbQne9Qew4W3/zCkvvpQX X-Received: by 2002:a05:6871:4608:b0:22e:76c1:ddce with SMTP id nf8-20020a056871460800b0022e76c1ddcemr13671610oab.6.1713210266906; Mon, 15 Apr 2024 12:44:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713210266; cv=pass; d=google.com; s=arc-20160816; b=Y4efo/IHkilqTES+5UmORfKRbhfBbvPMkcpOoVWGV91JKWA3zXN8aabebSKWKlf44I frCfgjSx6U3UWnZ3xS33iBgXiNfzsAlkFlnxbhIh2GT+ukmEwCWXpEgQ6hXW6Ix62qfi Qqf5jqY4zCUcJ8UFSpYYR+doH3MX8XbJmgggr91V6aQ2z5drB06RbD3CUJS0UBVn2VY+ x9PT2rbv15YAElCELZFamj7ooX29alv/EM8CLzpHhkzcDVLj7fYUdb3awBbHewENcLUY b+aiU5lJDpLje3nlo6BvLZEcBD99aaL/p225V0AtlTGN1M9FEDKZ0LikCmKts3bvcsNw do/A== 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=uh3OglTS/dLlK8U5oP5C8O8FlJacnVYJb0xAej3AKiQ=; fh=n/rwobM5Kz8jYVRhyideFey9VpaC1fRc8tj4hZJ3KOU=; b=G4wF+2l0xHHiq8T4OgscZ/nwq5Ta1AbPEhX61sd+3jKFZTAXiPC1nHux5inNvvfkmy we+1oW1hBuy3J9wGBn7JT7W1q73GLFQ+tKLVrl9YWE0TubY5oXU9tVtZlj8rx0SVTA1t VzVvPWvOH0lV2PBwLXM8lYkNkQSWdtJvejhDt0ZBlr3VenQj55T+4gbXoh1/3dSWQbay kEJRPwcQpr7yM+Zc+NqVjQR4ExLphkS9ds5ZBksJgyWMZtsKABx6s2nMFz+Fr8WTnpJT mEscsFAriiaBALYyfxpQXnL4OMKcfaV4CPI0w5JWYjMEiRRrcwcdAMdvbaDMaNjLcJRW L+mA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GvwR0xWc; 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-145808-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145808-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. [147.75.199.223]) by mx.google.com with ESMTPS id 20-20020ac85954000000b00434665d8bb6si10864119qtz.328.2024.04.15.12.44.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:44:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145808-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GvwR0xWc; 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-145808-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145808-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 9E7331C211FC for ; Mon, 15 Apr 2024 19:44:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38AE0165FCF; Mon, 15 Apr 2024 19:35:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="GvwR0xWc" Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.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 CE3EC1607BD for ; Mon, 15 Apr 2024 19:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209701; cv=none; b=QFuySZbYGu6+UIKhREbp/AnL+nYhgI7B8TmRk6WNG1BrIYBEZqRb/dabvMHsunz/lkRW4qRnD2cFSPNpny4KeEbQyJZJQyWSQydrxdRcpUQiOX/ywQNagrwYR/+gvnQoFYw5iR/HRaMGLYA9TeUEeL6wPRqhDADAycerMnEYZoE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209701; c=relaxed/simple; bh=BTjaYD3gHSbLARomZDia3x39XYlnBKHtMxyPf9aygpU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZuY2k4gUKhAgywsJnzLs1Mln3V7gf8Qj0UpdNgofi5cP+osJmzXTxJh5J2WV3fB5hxsy6hIKGYOzUpbQZSKOiFozt+69OHbS5ohkyZeigQAOX97Vbwx6VQJhO7dT6FSdLyo2tKrfSJ57jfgcVO304UuVEmBy93pIEsoj84tJI6E= 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=GvwR0xWc; arc=none smtp.client-ip=209.85.128.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-yw1-f179.google.com with SMTP id 00721157ae682-61ac45807cbso13625537b3.1 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=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=uh3OglTS/dLlK8U5oP5C8O8FlJacnVYJb0xAej3AKiQ=; b=GvwR0xWc9E0msz5JtycIN+Pergm89MWhGombYhkLdtWqkyHaol5ACfNRdAfBuzF4iC br8Ilqqjjso3oCqDMFxrS2iwFW8e+1X9XLkpA58DHijQrX4mgJ3NFh6L1Itqya/p05aN lPUgHzGblbBM67vScNJnKneH/qx+kBEel+yek= 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=q+/gPZzS0G1WAXzj3zxowvqMJOJHt+4LknYowCw8+TjJy60Kqr7elKGmu7Ay7MkQks JMN5TeFL48tRpya7q0m9hN1qxe8tmegYgNQ+UICFkqkXn0jkff4uiYFFroYE5pFdamWn 4WD2GXWgoLcjaea/cGBeYyXLitf+XQkeG0GV/sp7m1nBWZ4h/cDjsMcRitftlz21veSr zl1sr+QHXMMie53d2A4e9a0l7dnb4qOe+P0P+S57CRtN3VZYW2ru0/RQABNEtuJ22124 CZ00vjbYik6Je0pU0+qsmkO7fPkpwrJqJsq4mFoGHJMusFk3Df1B+Q64JfqHi9z70Zjg oGgA== X-Forwarded-Encrypted: i=1; AJvYcCVtUL4Tl0ckbTeCziq89YgGNDv6UP0Oc0n6KixI/W9KdzQWSvdEVnu5N50sG0sy5uYeQ3mifhMioP7w0xSHlg+9duzdsSZgsSzpbdbK X-Gm-Message-State: AOJu0Yy9xxFU/MOBJY+40/XzaLiu2UjzlGVDM1PgvxijOu30U9mZ0fO0 vJfwj9lUnCkxD671K+8kFqvKgJsVY6w6Eam7+oItHPUBABpkbStmlkxz2XPSGQ== 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 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: <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?Niklas_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 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); -- 2.44.0.683.g7961c838ac-goog