diff mbox series

[2/2] drivers: usb: musb: Fix comparison between pointer and integer warn

Message ID 20200422105027.89221-2-arnaud.ferraris@collabora.com
State New
Delegated to: Marek Vasut
Headers show
Series [1/2] drivers: usb: musb: Fail if the ctrl mod register is missing | expand

Commit Message

Arnaud Ferraris April 22, 2020, 10:50 a.m. UTC
From: Adrian Ratiu <adrian.ratiu@collabora.com>

drivers/usb/musb-new/ti-musb.c: In function 'ti_musb_ofdata_to_platdata':
drivers/usb/musb-new/ti-musb.c:93:30: warning: comparison between pointer and integer
	if (platdata->ctrl_mod_base == FDT_ADDR_T_NONE) {}

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
---

 drivers/usb/musb-new/ti-musb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Arnaud Ferraris April 22, 2020, 1:27 p.m. UTC | #1
Le 22/04/2020 à 12:53, Marek Vasut a écrit :
> On 4/22/20 12:50 PM, Arnaud Ferraris wrote:
>> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
>> index 4e88652433..0c124a2c5e 100644
>> --- a/drivers/usb/musb-new/ti-musb.c
>> +++ b/drivers/usb/musb-new/ti-musb.c
>> @@ -91,7 +91,7 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev)
>>  	phys = fdtdec_lookup_phandle(fdt, node, "phys");
>>  	ctrl_mod = fdtdec_lookup_phandle(fdt, phys, "ti,ctrl_mod");
>>  	platdata->ctrl_mod_base = (void *)fdtdec_get_addr(fdt, ctrl_mod, "reg");
>> -	if (platdata->ctrl_mod_base == FDT_ADDR_T_NONE) {
>> +	if (platdata->ctrl_mod_base == (void *)FDT_ADDR_T_NONE) {
>>  		pr_err("MUSB ctrl mod missing\n");
> 
> Is this patching the same code as 1/2 ?
> 

It is indeed. I kept it that way as the original commits were from
different authors and different times, but I can squash those.

Cheers,
Arnaud
diff mbox series

Patch

diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 4e88652433..0c124a2c5e 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -91,7 +91,7 @@  static int ti_musb_ofdata_to_platdata(struct udevice *dev)
 	phys = fdtdec_lookup_phandle(fdt, node, "phys");
 	ctrl_mod = fdtdec_lookup_phandle(fdt, phys, "ti,ctrl_mod");
 	platdata->ctrl_mod_base = (void *)fdtdec_get_addr(fdt, ctrl_mod, "reg");
-	if (platdata->ctrl_mod_base == FDT_ADDR_T_NONE) {
+	if (platdata->ctrl_mod_base == (void *)FDT_ADDR_T_NONE) {
 		pr_err("MUSB ctrl mod missing\n");
 		return -ENOENT;
 	}