* [PATCH] phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP()
@ 2024-07-10 6:45 André Draszik
2024-07-26 6:02 ` André Draszik
2024-08-01 6:55 ` Vinod Koul
0 siblings, 2 replies; 4+ messages in thread
From: André Draszik @ 2024-07-10 6:45 UTC (permalink / raw)
To: Vinod Koul, Kishon Vijay Abraham I, Krzysztof Kozlowski, Alim Akhtar
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-phy, linux-arm-kernel, linux-samsung-soc, linux-kernel,
André Draszik
Use of FIELD_PREP_CONST() was a thinko - it's meant to be used for
(constant) initialisers, not constant values.
Use FIELD_PREP() where possible. It has better error checking and is
therefore the preferred macro to use in those cases.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
drivers/phy/samsung/phy-exynos5-usbdrd.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
index df52b78a120b..0cc5c4249447 100644
--- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
+++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
@@ -607,7 +607,7 @@ exynos5_usbdrd_usbdp_g2_v4_ctrl_pma_ready(struct exynos5_usbdrd_phy *phy_drd)
reg = readl(regs_base + EXYNOS850_DRD_SECPMACTL);
reg &= ~SECPMACTL_PMA_REF_FREQ_SEL;
- reg |= FIELD_PREP_CONST(SECPMACTL_PMA_REF_FREQ_SEL, 1);
+ reg |= FIELD_PREP(SECPMACTL_PMA_REF_FREQ_SEL, 1);
/* SFR reset */
reg |= (SECPMACTL_PMA_LOW_PWR | SECPMACTL_PMA_APB_SW_RST);
reg &= ~(SECPMACTL_PMA_ROPLL_REF_CLK_SEL |
@@ -1123,19 +1123,19 @@ static void exynos850_usbdrd_utmi_init(struct exynos5_usbdrd_phy *phy_drd)
reg &= ~SSPPLLCTL_FSEL;
switch (phy_drd->extrefclk) {
case EXYNOS5_FSEL_50MHZ:
- reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 7);
+ reg |= FIELD_PREP(SSPPLLCTL_FSEL, 7);
break;
case EXYNOS5_FSEL_26MHZ:
- reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 6);
+ reg |= FIELD_PREP(SSPPLLCTL_FSEL, 6);
break;
case EXYNOS5_FSEL_24MHZ:
- reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 2);
+ reg |= FIELD_PREP(SSPPLLCTL_FSEL, 2);
break;
case EXYNOS5_FSEL_20MHZ:
- reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 1);
+ reg |= FIELD_PREP(SSPPLLCTL_FSEL, 1);
break;
case EXYNOS5_FSEL_19MHZ2:
- reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 0);
+ reg |= FIELD_PREP(SSPPLLCTL_FSEL, 0);
break;
default:
dev_warn(phy_drd->dev, "unsupported ref clk: %#.2x\n",
---
base-commit: 82d01fe6ee52086035b201cfa1410a3b04384257
change-id: 20240710-phy-field-prep-be6982d38215
Best regards,
--
André Draszik <andre.draszik@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP()
2024-07-10 6:45 [PATCH] phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP() André Draszik
@ 2024-07-26 6:02 ` André Draszik
2024-07-26 17:56 ` Sam Protsenko
2024-08-01 6:55 ` Vinod Koul
1 sibling, 1 reply; 4+ messages in thread
From: André Draszik @ 2024-07-26 6:02 UTC (permalink / raw)
To: Vinod Koul, Kishon Vijay Abraham I, Krzysztof Kozlowski, Alim Akhtar
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-phy, linux-arm-kernel, linux-samsung-soc, linux-kernel
Hi,
On Wed, 2024-07-10 at 07:45 +0100, André Draszik wrote:
> Use of FIELD_PREP_CONST() was a thinko - it's meant to be used for
> (constant) initialisers, not constant values.
>
> Use FIELD_PREP() where possible. It has better error checking and is
> therefore the preferred macro to use in those cases.
>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
> ---
> drivers/phy/samsung/phy-exynos5-usbdrd.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Any comments on this patch?
Cheers,
Andre'
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP()
2024-07-26 6:02 ` André Draszik
@ 2024-07-26 17:56 ` Sam Protsenko
0 siblings, 0 replies; 4+ messages in thread
From: Sam Protsenko @ 2024-07-26 17:56 UTC (permalink / raw)
To: André Draszik
Cc: Vinod Koul, Kishon Vijay Abraham I, Krzysztof Kozlowski,
Alim Akhtar, Peter Griffin, Tudor Ambarus, Will McVicker,
kernel-team, linux-phy, linux-arm-kernel, linux-samsung-soc,
linux-kernel
On Fri, Jul 26, 2024 at 1:02 AM André Draszik <andre.draszik@linaro.org> wrote:
>
> Hi,
>
> On Wed, 2024-07-10 at 07:45 +0100, André Draszik wrote:
> > Use of FIELD_PREP_CONST() was a thinko - it's meant to be used for
> > (constant) initialisers, not constant values.
> >
> > Use FIELD_PREP() where possible. It has better error checking and is
> > therefore the preferred macro to use in those cases.
> >
> > Signed-off-by: André Draszik <andre.draszik@linaro.org>
> > ---
> > drivers/phy/samsung/phy-exynos5-usbdrd.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
>
> Any comments on this patch?
>
Looks good to me:
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
> Cheers,
> Andre'
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP()
2024-07-10 6:45 [PATCH] phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP() André Draszik
2024-07-26 6:02 ` André Draszik
@ 2024-08-01 6:55 ` Vinod Koul
1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2024-08-01 6:55 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Krzysztof Kozlowski, Alim Akhtar,
André Draszik
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-phy, linux-arm-kernel, linux-samsung-soc, linux-kernel
On Wed, 10 Jul 2024 07:45:07 +0100, André Draszik wrote:
> Use of FIELD_PREP_CONST() was a thinko - it's meant to be used for
> (constant) initialisers, not constant values.
>
> Use FIELD_PREP() where possible. It has better error checking and is
> therefore the preferred macro to use in those cases.
>
>
> [...]
Applied, thanks!
[1/1] phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP()
commit: 7e6c2ffe6c2284a10f77079670e3b26b43df4443
Best regards,
--
Vinod Koul <vkoul@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-01 6:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-10 6:45 [PATCH] phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP() André Draszik
2024-07-26 6:02 ` André Draszik
2024-07-26 17:56 ` Sam Protsenko
2024-08-01 6:55 ` Vinod Koul
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®