From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5CF815820C; Tue, 11 Mar 2025 15:29:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741706990; cv=none; b=cApIjD5Idj4NTvB4G62+AdNNjGSty8WBWqwCVRsECfBzQSq20Xyrf6U0F/nZTzlWPeE1Bax21n9Ed9iq0Fv/PqgKUiLbDdEOfq+MlMInj4PSY7g6ZUoKle/dB8b3eH8YcZ4TUTuAkhihvANQevCHTTmj+CPtwAmdBU2ivuedaXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741706990; c=relaxed/simple; bh=x+KDdKZg/pat5874YxYx/a2rTFMNcEnqOb7s/euf7ew=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iscWaKxncjyBKML5Bcv1bKv0cNmWHIP6I7UG2J44FJvoBhrnCmxtF7FiiNfOBqs2RLZvl77rGWNqlC8HUBsp3W2uDFLdw75PX92mCHX+VX+DQ66LkBYRISepH0xbpIKiyZ/Fg98ogHjy2pKpyMI3ZZO6gtnF6ecGiGnbKiehb1Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=e4+cOU/M; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="e4+cOU/M" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D96AC4CEE9; Tue, 11 Mar 2025 15:29:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741706990; bh=x+KDdKZg/pat5874YxYx/a2rTFMNcEnqOb7s/euf7ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e4+cOU/MlW713Xc8lHl5e432rk+3pH8gt61eshJyjusWFyjA54ZePHvNLg+1z0Mzn FFngCg6J+lL3AKlfhCT8Dhh2Waw0Z4elZBm5GsrMY7CkUCEW5O51ghtGuUegaFenZS 8a2fWKnJwNRd/z4dnPI4jhMF6o4jssLP025R/bG8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dan Carpenter , Naresh Kamboju , Linux Kernel Functional Testing , Arnd Bergmann , Hans Verkuil , Sasha Levin Subject: [PATCH 5.10 237/462] media: cxd2841er: fix 64-bit division on gcc-9 Date: Tue, 11 Mar 2025 15:58:23 +0100 Message-ID: <20250311145807.729137225@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250311145758.343076290@linuxfoundation.org> References: <20250311145758.343076290@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann [ Upstream commit 8d46603eeeb4c6abff1d2e49f2a6ae289dac765e ] It appears that do_div() once more gets confused by a complex expression that ends up not quite being constant despite __builtin_constant_p() thinking it is: ERROR: modpost: "__aeabi_uldivmod" [drivers/media/dvb-frontends/cxd2841er.ko] undefined! Use div_u64() instead, forcing the expression to be evaluated first, and making it a bit more readable. Cc: Dan Carpenter Reported-by: Naresh Kamboju Closes: https://lore.kernel.org/linux-media/CA+G9fYvvNm-aYodLaAwwTjEGtX0YxR-1R14FOA5aHKt0sSVsYg@mail.gmail.com/ Reported-by: Linux Kernel Functional Testing Closes: https://lore.kernel.org/linux-media/CA+G9fYvvNm-aYodLaAwwTjEGtX0YxR-1R14FOA5aHKt0sSVsYg@mail.gmail.com/ Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil [hverkuil: added Closes tags] Signed-off-by: Sasha Levin --- drivers/media/dvb-frontends/cxd2841er.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c index 493ba8b6b8f62..b2c251135ce1c 100644 --- a/drivers/media/dvb-frontends/cxd2841er.c +++ b/drivers/media/dvb-frontends/cxd2841er.c @@ -311,12 +311,8 @@ static int cxd2841er_set_reg_bits(struct cxd2841er_priv *priv, static u32 cxd2841er_calc_iffreq_xtal(enum cxd2841er_xtal xtal, u32 ifhz) { - u64 tmp; - - tmp = (u64) ifhz * 16777216; - do_div(tmp, ((xtal == SONY_XTAL_24000) ? 48000000 : 41000000)); - - return (u32) tmp; + return div_u64(ifhz * 16777216ull, + (xtal == SONY_XTAL_24000) ? 48000000 : 41000000); } static u32 cxd2841er_calc_iffreq(u32 ifhz) -- 2.39.5