Remove superfluous name casts
Subsystems (10)
cover Remove superfluous name casts
Hi all,
These days most "name" members in driver model structures are "const char*", so there's no longer a need to cast const names to "char *".
[01/12] powerpc/windfarm: Remove superfluous name casts [02/12] mtd: Remove superfluous name casts [03/12] mtd: pasemi_nand.c: Remove superfluous name cast [04/12] PCI/portdrv: Remove superfluous name cast [05/12] pcmcia: Remove superfluous name casts [06/12] staging: Remove superfluous name casts [07/12] staging: r8188eu: Remove superfluous name cast [08/12] staging: usbip: Remove superfluous name cast [09/12] usb: core: Remove superfluous name casts [10/12] mtd: ms02-nv: Remove superfluous name cast [11/12] usb: gadget: Remove superfluous name casts [12/12] usb: host: Remove superfluous name casts
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
PATCH 1/12 powerpc/windfarm: Remove superfluous name casts
wf_sensor.name is "const char *"
--- drivers/macintosh/windfarm_lm75_sensor.c | 2 +- drivers/macintosh/windfarm_max6690_sensor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/macintosh/windfarm_lm75_sensor.c +1 -1
@@ -133,7 +133,7 @@ static int wf_lm75_probe(struct i2c_client *client, lm->inited =0 ; lm->ds1775 = ds1775; lm->i2c = client; - lm->sens.name = (char *)name;/* XXX fix constness in structure */ + lm->sens.name = name; lm->sens.ops = &wf_lm75_ops;i2c_set_clientdata (client, lm);
drivers/macintosh/windfarm_max6690_sensor.c +1 -1
@@ -95,7 +95,7 @@ static int wf_max6690_probe(struct i2c_client *client, } max->i2c = client; - max->sens.name = (char *)name;/* XXX fix constness in structure */ + max->sens.name = name; max->sens.ops = &wf_max6690_ops;i2c_set_clientdata (client, max);
Signature · 1 line
1.7.9.5
PATCH 2/12 mtd: Remove superfluous name casts
In reply to Geert Uytterhoevenmap_info.name is "const char *"
--- drivers/mtd/maps/pxa2xx-flash.c | 2 +- drivers/mtd/maps/sun_uflash.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/maps/pxa2xx-flash.c +1 -1
@@ -61,7 +61,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev)if (!info)return -ENOMEM ; - info->map.name = (char *) flash->name; + info->map.name = flash->name; info->map.bankwidth = flash->width; info->map.phys = res->start; info->map.size =resource_size (res);
drivers/mtd/maps/sun_uflash.c +1 -1
@@ -75,7 +75,7 @@ int uflash_devinit(struct platform_device *op, struct device_node *dp) up->name =of_get_property (dp,"model" ,NULL );if (up->name &&0 <strlen (up->name)) - up->map.name = (char *)up->name; + up->map.name = up->name; up->map.phys = op->resource[0 ].start;
Signature · 1 line
1.7.9.5
Brian Norris
AppliedRe: [PATCH 02/12] mtd: Remove superfluous name casts
Quoted 5 lines · Geert Uytterhoeven
map_info.name is "const char *"
Signed-off-by Geert Uytterhoeven <[email protected]>Cc David Woodhouse <[email protected]>
Pushed to l2-mtd.git/next. Thanks!
Brian
PATCH 3/12 mtd: pasemi_nand.c: Remove superfluous name cast
In reply to Geert Uytterhoevendevice_driver.name is "const char *"
--- drivers/mtd/nand/pasemi_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/pasemi_nand.c +1 -1
@@ -223,7 +223,7 @@ MODULE_DEVICE_TABLE(of, pasemi_nand_match);static struct platform_driver pasemi_nand_driver = { .driver = { - .name = (char *)driver_name, + .name = driver_name, .owner =THIS_MODULE , .of_match_table = pasemi_nand_match, },
Signature · 1 line
1.7.9.5
Re: [PATCH 03/12] mtd: pasemi_nand.c: Remove superfluous name cast
Quoted 5 lines · Geert Uytterhoeven
device_driver.name is "const char *"
Signed-off-by Geert Uytterhoeven <[email protected]>Cc Olof Johansson <[email protected]>
-Olof
Brian Norris
AppliedRe: [PATCH 03/12] mtd: pasemi_nand.c: Remove superfluous name cast
In reply to Geert UytterhoevenQuoted 5 lines · Geert Uytterhoeven
device_driver.name is "const char *"
Signed-off-by Geert Uytterhoeven <[email protected]>Cc Olof Johansson <[email protected]>
Pushed to l2-mtd.git/next. Thanks!
Brian
PATCH 4/12 PCI/portdrv: Remove superfluous name cast
In reply to Geert Uytterhoevendevice_driver.name is "const char *"
--- drivers/pci/pcie/portdrv_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/portdrv_core.c +1 -1
@@ -553,7 +553,7 @@ int pcie_port_service_register(struct pcie_port_service_driver *new)if (pcie_ports_disabled)return -ENODEV ; - new->driver.name = (char *)new->name; + new->driver.name = new->name; new->driver.bus = &pcie_port_bus_type; new->driver.probe = pcie_port_probe_service; new->driver.remove = pcie_port_remove_service;
Signature · 1 line
1.7.9.5
Re: [PATCH 04/12] PCI/portdrv: Remove superfluous name cast
Quoted 5 lines · Geert Uytterhoeven
device_driver.name is "const char *"
Signed-off-by Geert Uytterhoeven <[email protected]>Cc Bjorn Helgaas <[email protected]>
Applied to pci/misc for v3.14, thanks!
Quoted 20 lines
--- drivers/pci/pcie/portdrv_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/pcie/portdrv_core.c +1
-1@@ -553,7 +553,7 @@ int pcie_port_service_register(struct pcie_port_service_driver *new)if (pcie_ports_disabled)return -ENODEV ; - new->driver.name = (char *)new->name; + new->driver.name = new->name; new->driver.bus = &pcie_port_bus_type; new->driver.probe = pcie_port_probe_service; new->driver.remove = pcie_port_remove_service;Signature · 1 line
1.7.9.5
PATCH 5/12 pcmcia: Remove superfluous name casts
In reply to Geert Uytterhoevendevice_driver.name is "const char *"
--- drivers/pcmcia/bfin_cf_pcmcia.c | 2 +- drivers/pcmcia/electra_cf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/pcmcia/bfin_cf_pcmcia.c +1 -1
@@ -303,7 +303,7 @@ static int bfin_cf_remove(struct platform_device *pdev)static struct platform_driver bfin_cf_driver = { .driver = { - .name = (char *)driver_name, + .name = driver_name, .owner =THIS_MODULE , }, .probe = bfin_cf_probe,
drivers/pcmcia/electra_cf.c +1 -1
@@ -359,7 +359,7 @@ MODULE_DEVICE_TABLE(of, electra_cf_match);static struct platform_driver electra_cf_driver = { .driver = { - .name = (char *)driver_name, + .name = driver_name, .owner =THIS_MODULE , .of_match_table = electra_cf_match, },
Signature · 1 line
1.7.9.5
PATCH 6/12 staging: Remove superfluous name casts
In reply to Geert Uytterhoevendevice_driver.name is "const char *"
--- drivers/staging/dwc2/platform.c | 2 +- drivers/staging/usbip/vhci_hcd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/dwc2/platform.c +1 -1
@@ -134,7 +134,7 @@ MODULE_DEVICE_TABLE(of, dwc2_of_match_table);static struct platform_driver dwc2_platform_driver = { .driver = { - .name = (char *)dwc2_driver_name, + .name = dwc2_driver_name, .of_match_table = dwc2_of_match_table, }, .probe = dwc2_driver_probe,
drivers/staging/usbip/vhci_hcd.c +1 -1
@@ -1108,7 +1108,7 @@ static struct platform_driver vhci_driver = { .suspend = vhci_hcd_suspend, .resume = vhci_hcd_resume, .driver = { - .name = (char *) driver_name, + .name = driver_name, .owner = THIS_MODULE, }, };
Signature · 1 line
1.7.9.5
PATCH 7/12 staging: r8188eu: Remove superfluous name cast
In reply to Geert Uytterhoevenusb_driver.name is "const char *"
--- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/os_dep/usb_intf.c +1 -1
@@ -71,7 +71,7 @@ struct rtw_usb_drv { };static struct rtw_usb_drv rtl8188e_usb_drv = { - .usbdrv.name = (char *)"r8188eu" , + .usbdrv.name ="r8188eu" , .usbdrv.probe = rtw_drv_init, .usbdrv.disconnect = rtw_dev_remove, .usbdrv.id_table = rtw_usb_id_tbl,
Signature · 1 line
1.7.9.5
PATCH 8/12 staging: usbip: Remove superfluous name cast
In reply to Geert Uytterhoevenplatform_device.name is "const char *"
--- drivers/staging/usbip/vhci_hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/usbip/vhci_hcd.c +1 -1
@@ -1125,7 +1125,7 @@ static void the_pdev_release(struct device *dev)static struct platform_device the_pdev = {/* should be the same name as driver_name */ - .name = (char *) driver_name, + .name = driver_name, .id =-1 , .dev = { .release = the_pdev_release,
Signature · 1 line
1.7.9.5
PATCH 9/12 usb: core: Remove superfluous name casts
In reply to Geert Uytterhoevendevice_driver.name is "const char *"
--- drivers/usb/core/driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/core/driver.c +2 -2
@@ -839,7 +839,7 @@ int usb_register_device_driver(struct usb_device_driver *new_udriver,return -ENODEV ; new_udriver->drvwrap.for_devices =1 ; - new_udriver->drvwrap.driver.name = (char *) new_udriver->name; + new_udriver->drvwrap.driver.name = new_udriver->name; new_udriver->drvwrap.driver.bus = &usb_bus_type; new_udriver->drvwrap.driver.probe = usb_probe_device; new_udriver->drvwrap.driver.remove = usb_unbind_device;
@@ -900,7 +900,7 @@ int usb_register_driver(struct usb_driver *new_driver, struct module *owner,return -ENODEV ; new_driver->drvwrap.for_devices =0 ; - new_driver->drvwrap.driver.name = (char *) new_driver->name; + new_driver->drvwrap.driver.name = new_driver->name; new_driver->drvwrap.driver.bus = &usb_bus_type; new_driver->drvwrap.driver.probe = usb_probe_interface; new_driver->drvwrap.driver.remove = usb_unbind_interface;
Signature · 1 line
1.7.9.5
PATCH 10/12 mtd: ms02-nv: Remove superfluous name cast
In reply to Geert Uytterhoevenmtd_info.name is "const char *"
--- drivers/mtd/devices/ms02-nv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/devices/ms02-nv.c +1 -1
@@ -205,7 +205,7 @@ static int __init ms02nv_init_one(ulong addr) mtd->type =MTD_RAM ; mtd->flags =MTD_CAP_RAM ; mtd->size = fixsize; - mtd->name = (char *)ms02nv_name; + mtd->name = ms02nv_name; mtd->owner =THIS_MODULE ; mtd->_read = ms02nv_read; mtd->_write = ms02nv_write;
Signature · 1 line
1.7.9.5
Brian Norris
AppliedRe: [PATCH 10/12] mtd: ms02-nv: Remove superfluous name cast
Quoted 5 lines · Geert Uytterhoeven
mtd_info.name is "const char *"
Signed-off-by Geert Uytterhoeven <[email protected]>Cc David Woodhouse <[email protected]>
Pushed to l2-mtd.git/next. Thanks!
Brian
PATCH 11/12 usb: gadget: Remove superfluous name casts
In reply to Geert Uytterhoevendevice_driver.name is "const char *"
--- drivers/usb/gadget/fsl_qe_udc.c | 2 +- drivers/usb/gadget/fsl_udc_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/gadget/fsl_qe_udc.c +1 -1
@@ -2717,7 +2717,7 @@ MODULE_DEVICE_TABLE(of, qe_udc_match);static struct platform_driver udc_driver = { .driver = { - .name = (char *)driver_name, + .name = driver_name, .owner =THIS_MODULE , .of_match_table = qe_udc_match, },
drivers/usb/gadget/fsl_udc_core.c +1 -1
@@ -2666,7 +2666,7 @@ static struct platform_driver udc_driver = { .suspend = fsl_udc_suspend, .resume = fsl_udc_resume, .driver = { - .name = (char *)driver_name, + .name = driver_name, .owner = THIS_MODULE,/* udc suspend/resume called from OTG driver */ .suspend = fsl_udc_otg_suspend,
Signature · 1 line
1.7.9.5
PATCH 12/12 usb: host: Remove superfluous name casts
In reply to Geert Uytterhoevendevice_driver.name is "const char *"
--- drivers/usb/host/imx21-hcd.c | 2 +- drivers/usb/host/isp116x-hcd.c | 2 +- drivers/usb/host/isp1362-hcd.c | 2 +- drivers/usb/host/r8a66597-hcd.c | 2 +- drivers/usb/host/u132-hcd.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/usb/host/imx21-hcd.c +1 -1
@@ -1926,7 +1926,7 @@ failed_request_mem:static struct platform_driver imx21_hcd_driver = { .driver = { - .name = (char *)hcd_name, + .name = hcd_name, }, .probe = imx21_probe, .remove = imx21_remove,
drivers/usb/host/isp116x-hcd.c +1 -1
@@ -1775,7 +1775,7 @@ static struct platform_driver isp116x_driver = { .suspend = isp116x_suspend, .resume = isp116x_resume, .driver = { - .name = (char *)hcd_name, + .name = hcd_name, .owner = THIS_MODULE, }, };
drivers/usb/host/isp1362-hcd.c +1 -1
@@ -2829,7 +2829,7 @@ static struct platform_driver isp1362_driver = { .suspend = isp1362_suspend, .resume = isp1362_resume, .driver = { - .name = (char *)hcd_name, + .name = hcd_name, .owner = THIS_MODULE, }, };
drivers/usb/host/r8a66597-hcd.c +1 -1
@@ -2534,7 +2534,7 @@ static struct platform_driver r8a66597_driver = { .probe = r8a66597_probe, .remove = r8a66597_remove, .driver = { - .name = (char *) hcd_name, + .name = hcd_name, .owner = THIS_MODULE, .pm = R8A66597_DEV_PM_OPS, },
drivers/usb/host/u132-hcd.c +1 -1
@@ -3217,7 +3217,7 @@ static struct platform_driver u132_platform_driver = { .suspend = u132_suspend, .resume = u132_resume, .driver = { - .name = (char *)hcd_name, + .name = hcd_name, .owner = THIS_MODULE, }, };
Signature · 1 line
1.7.9.5