usb: phy: msm: cast to unsigned long int
Subsystems (2)
PATCH 1/3 usb: phy: msm: cast to unsigned long int
this solves the following build warning found when running compile tests.
drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]
pdata->phy_type = (int) id->data;
^---
all patches are on top of Ivan's 20 patch series.
drivers/usb/phy/phy-msm-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/phy-msm-usb.c +1 -1
@@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) motg->pdata = pdata; id =of_match_device (msm_otg_dt_match, &pdev->dev); - pdata->phy_type = (int ) id->data; + pdata->phy_type = (unsigned long int ) id->data; motg->link_rst =devm_reset_control_get (&pdev->dev,"link" );if (IS_ERR (motg->link_rst))
Signature · 1 line
2.0.0.rc1
A message that is not in the archive (sent off-list or not yet received): 1398875916-14461-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org
PATCH 2/3 usb: phy: msm: switch over to writel()
Remove that single instance of writel_relaxed()
call which is only available on ARM architecture.
This will let us build test this driver on all
different architectures.
--- drivers/usb/phy/phy-msm-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/phy-msm-usb.c +1 -1
@@ -1600,7 +1600,7 @@ static int msm_otg_probe(struct platform_device *pdev)if (IS_ERR (phy_select))return PTR_ERR (phy_select);/* Enable second PHY with the OTG port */ -writel_relaxed (0x1 , phy_select); +writel (0x1 , phy_select); }dev_info (&pdev->dev,"OTG regs = %p\n" , motg->regs);
Signature · 6 lines
2.0.0.rc1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] usb: phy: msm: switch over to writel()
Quoted 7 lines · Felipe Balbi
Remove that single instance of
writel_relaxed()
call which is only available on ARM architecture.This will let us build test this driver on all
different architectures.Signed-off-by Felipe Balbi <[email protected]>
Quoted 17 lines
--- drivers/usb/phy/phy-msm-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/phy/phy-msm-usb.c +1
-1@@ -1600,7 +1600,7 @@ static int msm_otg_probe(struct platform_device *pdev)if (IS_ERR (phy_select))return PTR_ERR (phy_select);/* Enable second PHY with the OTG port */ -writel_relaxed (0x1 , phy_select); +writel (0x1 , phy_select); }dev_info (&pdev->dev,"OTG regs = %p\n" , motg->regs);
Quoted 21 lines · Felipe Balbi
this solves the following build warning found when running compile tests.
drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]pdata->phy_type = (int) id->data; ^Signed-off-by Felipe Balbi <[email protected]>---
all patches are on top of Ivan's 20 patch series.
drivers/usb/phy/phy-msm-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/phy/phy-msm-usb.c +0
-0
drivers/usb/phy/phy-msm-usb.c static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) · line 1459
Quoted 5 lines
drivers/usb/phy/phy-msm-usb.c +1
-1@@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) motg->pdata = pdata; id =of_match_device (msm_otg_dt_match, &pdev->dev); - pdata->phy_type = (int ) id->data; + pdata->phy_type = (unsigned long int ) id->data;
Probably cast to enum msm_usb_phy_type will be better.
Regards,
Ivan
drivers/usb/phy/phy-msm-usb.c static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) · line 1462
Quoted 3 lines
drivers/usb/phy/phy-msm-usb.c +0
-0motg->link_rst =devm_reset_control_get (&pdev->dev,"link" );if (IS_ERR (motg->link_rst))
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 24 lines · Ivan T. Ivanov
Quoted 23 lines · Felipe Balbi
this solves the following build warning found when running compile tests.
drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]pdata->phy_type = (int) id->data; ^Signed-off-by Felipe Balbi <[email protected]>---
all patches are on top of Ivan's 20 patch series.
drivers/usb/phy/phy-msm-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/phy/phy-msm-usb.c +0
-0@@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) motg->pdata = pdata;
Quoted 5 lines
drivers/usb/phy/phy-msm-usb.c static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) · line 1459
Quoted 3 lines
drivers/usb/phy/phy-msm-usb.c +1
-1id =of_match_device (msm_otg_dt_match, &pdev->dev); - pdata->phy_type = (int ) id->data; + pdata->phy_type = (unsigned long int ) id->data;Probably cast to enum
msm_usb_phy_typewill be better.
will do.
Signature · 1 line
balbi
Quoted 25 lines · Felipe Balbi
Quoted 24 lines · Ivan T. Ivanov
Quoted 23 lines · Felipe Balbi
this solves the following build warning found when running compile tests.
drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]pdata->phy_type = (int) id->data; ^Signed-off-by Felipe Balbi <[email protected]>---
all patches are on top of Ivan's 20 patch series.
drivers/usb/phy/phy-msm-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/phy/phy-msm-usb.c +0
-0@@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) motg->pdata = pdata;
Quoted 7 lines
Quoted 5 lines
drivers/usb/phy/phy-msm-usb.c static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) · line 1459
Quoted 3 lines
drivers/usb/phy/phy-msm-usb.c +1
-1id =of_match_device (msm_otg_dt_match, &pdev->dev); - pdata->phy_type = (int ) id->data; + pdata->phy_type = (unsigned long int ) id->data;Probably cast to enum
msm_usb_phy_typewill be better.will do.
commit fe8ef54c824e5b01192462ef82861e65f57d299c
Author: Felipe Balbi <[email protected]> Date: Wed Apr 30 11:33:04 2014 -0500
usb: phy: msm: cast to unsigned long int
this solves the following build warning found when running compile tests.
drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:
drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]
pdata->phy_type = (int) id->data;
^
drivers/usb/phy/phy-msm-usb.c +1 -1
@@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) motg->pdata = pdata; id =of_match_device (msm_otg_dt_match, &pdev->dev); - pdata->phy_type = (int ) id->data; + pdata->phy_type = (enum msm_usb_phy_type ) id->data; motg->link_rst =devm_reset_control_get (&pdev->dev,"link" );if (IS_ERR (motg->link_rst))
Signature · 1 line
balbi
PATCH 3/3 usb: phy: msm: enable build on other architectures
In reply to Felipe BalbiBy adding COMPILE_TEST to the list of dependencies we can build test this driver on all other architectures which is very valuable for maintainers applying patches and to find silly mistakes during development.
--- drivers/usb/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/Kconfig +1 -1
@@ -172,7 +172,7 @@ config USB_ISP1301 config USB_MSM_OTG tristate "Qualcomm on-chip USB OTG controller support" - depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM) + depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM || COMPILE_TEST) select USB_PHY help Enable this to support the USB OTG transceiver on Qualcomm chips. It
Signature · 1 line
2.0.0.rc1
Re: [PATCH 3/3] usb: phy: msm: enable build on other architectures
Quoted 6 lines · Felipe Balbi
By adding
COMPILE_TESTto the list of dependencies we can build test this driver on all other architectures which is very valuable for maintainers applying patches and to find silly mistakes during development.Signed-off-by Felipe Balbi <[email protected]>
Quoted 17 lines
--- drivers/usb/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/phy/Kconfig +1
-1@@ -172,7 +172,7 @@ config USB_ISP1301 config USB_MSM_OTG tristate "Qualcomm on-chip USB OTG controller support" - depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM) + depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM || COMPILE_TEST) select USB_PHY help Enable this to support the USB OTG transceiver on Qualcomm chips. It