[PATCH 0/2] Fix the potential warning without DM_REGULATOR

When CONFIG_DM_REGULATOR is disabled, there are some warnings. This patch-set is fixed them.
drivers/phy/meson-g12a-usb2.c: In function 'phy_meson_g12a_usb2_power_on': drivers/phy/meson-g12a-usb2.c:70:35: warning: unused variable 'priv' [-Wunused-variable] 70 | struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev); | ^~~~ drivers/phy/meson-g12a-usb2.c: In function 'phy_meson_g12a_usb2_power_off': drivers/phy/meson-g12a-usb2.c:86:35: warning: unused variable 'priv' [-Wunused-variable] 86 | struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev); | ^~~~ LD drivers/phy/built-in.o CC drivers/video/simple_panel.o CC drivers/video/meson/meson_dw_hdmi.o drivers/video/meson/meson_dw_hdmi.c: In function 'meson_dw_hdmi_probe': drivers/video/meson/meson_dw_hdmi.c:382:18: warning: unused variable 'supply' [-Wunused-variable] 382 | struct udevice *supply; | ^~~~~~
Jaehoon Chung (2): phy: meson-g12a-usb2: fix the potential build warning video: meson: meson_dw_hdmi: fix the potential build warning
drivers/phy/meson-g12a-usb2.c | 4 ++-- drivers/video/meson/meson_dw_hdmi.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)

Fix the potential build warning.
Signed-off-by: Jaehoon Chung jh80.chung@samsung.com --- drivers/phy/meson-g12a-usb2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c index a1e621975867..447ce7283db2 100644 --- a/drivers/phy/meson-g12a-usb2.c +++ b/drivers/phy/meson-g12a-usb2.c @@ -66,10 +66,10 @@ struct phy_meson_g12a_usb2_priv {
static int phy_meson_g12a_usb2_power_on(struct phy *phy) { +#if CONFIG_IS_ENABLED(DM_REGULATOR) struct udevice *dev = phy->dev; struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
-#if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->phy_supply) { int ret = regulator_set_enable(priv->phy_supply, true); if (ret) @@ -82,10 +82,10 @@ static int phy_meson_g12a_usb2_power_on(struct phy *phy)
static int phy_meson_g12a_usb2_power_off(struct phy *phy) { +#if CONFIG_IS_ENABLED(DM_REGULATOR) struct udevice *dev = phy->dev; struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
-#if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->phy_supply) { int ret = regulator_set_enable(priv->phy_supply, false); if (ret) {

Fix the potential build warning.
Signed-off-by: Jaehoon Chung jh80.chung@samsung.com --- drivers/video/meson/meson_dw_hdmi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c index 7b2ff94eba58..5d74f7f1a740 100644 --- a/drivers/video/meson/meson_dw_hdmi.c +++ b/drivers/video/meson/meson_dw_hdmi.c @@ -379,7 +379,9 @@ static int meson_dw_hdmi_probe(struct udevice *dev) struct meson_dw_hdmi *priv = dev_get_priv(dev); struct reset_ctl_bulk resets; struct clk_bulk clocks; +#if CONFIG_IS_ENABLED(DM_REGULATOR) struct udevice *supply; +#endif int ret;
priv->dev = dev;

On 06/11/2020 06:57, Jaehoon Chung wrote:
When CONFIG_DM_REGULATOR is disabled, there are some warnings. This patch-set is fixed them.
drivers/phy/meson-g12a-usb2.c: In function 'phy_meson_g12a_usb2_power_on': drivers/phy/meson-g12a-usb2.c:70:35: warning: unused variable 'priv' [-Wunused-variable] 70 | struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev); | ^~~~ drivers/phy/meson-g12a-usb2.c: In function 'phy_meson_g12a_usb2_power_off': drivers/phy/meson-g12a-usb2.c:86:35: warning: unused variable 'priv' [-Wunused-variable] 86 | struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev); | ^~~~ LD drivers/phy/built-in.o CC drivers/video/simple_panel.o CC drivers/video/meson/meson_dw_hdmi.o drivers/video/meson/meson_dw_hdmi.c: In function 'meson_dw_hdmi_probe': drivers/video/meson/meson_dw_hdmi.c:382:18: warning: unused variable 'supply' [-Wunused-variable] 382 | struct udevice *supply; | ^~~~~~
Jaehoon Chung (2): phy: meson-g12a-usb2: fix the potential build warning video: meson: meson_dw_hdmi: fix the potential build warning
drivers/phy/meson-g12a-usb2.c | 4 ++-- drivers/video/meson/meson_dw_hdmi.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
Thanks,
Applied to u-boot-amlogic
Neil
participants (2)
-
Jaehoon Chung
-
Neil Armstrong