From: Chongchong Gu <chongchonggu21@gmail.com>
To: vkoul@kernel.org
Cc: kishon@kernel.org, aford173@gmail.com,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org,
guchongchong <guchongchong@xiaomi.com>
Subject: [PATCH v3 0/1] phy: freescale: limit div value in FIELD_PREP()
Date: Wed, 19 Feb 2025 18:54:10 +0800 [thread overview]
Message-ID: <cover.1739961770.git.guchongchong@xiaomi.com> (raw)
From: guchongchong <guchongchong@xiaomi.com>
In fsl_samsung_hdmi_phy_configure_pll_lock_det, the variable named
div becomes 4 after loop. It must less than 4 in function named
FIELD_PREP(REG12_CK_DIV_MASK, div).
A way to reproduce when run the following shell command
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4
The error log is following:
'''
In file included from <command-line>:
In function ‘fsl_samsung_hdmi_phy_configure_pll_lock_det’,
inlined from ‘fsl_samsung_hdmi_phy_configure’ at drivers/phy/freescale/phy-fsl-samsung-hdmi.c:469:2:
././include/linux/compiler_types.h:542:38: error: call to ‘__compiletime_assert_538’ declared with attribute error: FIELD_PREP: value too large for the field
...
drivers/phy/freescale/phy-fsl-samsung-hdmi.c:344:9: note: in expansion of macro ‘FIELD_PREP’
344 | writeb(FIELD_PREP(REG12_CK_DIV_MASK, div), phy->regs + PHY_REG(12));
| ^~~~~~~~~~
make[5]: *** [scripts/Makefile.build:207:drivers/phy/freescale/phy-fsl-samsung-hdmi.o] error 1
'''
changes in v3
- Simplified code structure
changes in v2
- modify the commit message
guchongchong (1):
phy: freescale: limit div value in FIELD_PREP()
drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.48.1
next reply other threads:[~2025-02-19 10:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 10:54 Chongchong Gu [this message]
2025-02-19 10:54 ` [PATCH v3 1/1] " Chongchong Gu
2025-02-19 11:29 ` Adam Ford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1739961770.git.guchongchong@xiaomi.com \
--to=chongchonggu21@gmail.com \
--cc=aford173@gmail.com \
--cc=guchongchong@xiaomi.com \
--cc=kishon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®