From: Jim Quigley <jim.quigley@xxxxxxxxxx> Date: Thu, 20 Jul 2017 21:19:52 +0100 > On 20/07/2017 20:35, David Miller wrote: >>> + if ((vdev->dev_no == port_data->dev_no) && >>> + (!(strcmp((char *)&vdev->type, port_data->type))) && >> vdev->type is a char pointer already, there is no need for this cast >> and it's looks awful as well :-) > > vdev->type is defined as > > char type[VIO_MAX_TYPE_LEN]; > > and removing the cast results in :- > > drivers/block/sunvdc.c: In function 'vdc_device_probed': > drivers/block/sunvdc.c:891: warning: passing argument 1 of 'strcmp' > from incompatible pointer type > ./include/linux/string.h:42: note: expected 'const char *' but > argument is of type 'char (*)[32]' That's unfortunate, ok. >> >>> + return 1; >>> + } else { >>> + return 0; >> Please use "bool" as the return type and true/false here. > > It needs to be an int for device_find_child(). Ok. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html