2/13 2.4.22-rc2 fix __FUNCTION__ warnings drivers/hotplug
PATCH RESEND 1/1 2/13 2.4.22-rc2 fix __FUNCTION__ warnings drivers/hotplug
Hi people,
this patch fix the warning: concatenation of string literals with __FUNCTION__ is deprecated
cpqphp.h | 6 ++-- cpqphp_core.c | 30 +++++++++++------------ cpqphp_ctrl.c | 68 ++++++++++++++++++++++++++--------------------------- cpqphp_nvram.c | 2 - cpqphp_pci.c | 12 ++++----- pci_hotplug_core.c | 2 - pci_hotplug_util.c | 2 - 7 files changed, 61 insertions(+), 61 deletions(-)
drivers/hotplug/cpqphp.h +3 -3
@@ -747,7 +747,7 @@return 1 ; hp_slot = slot->device - ctrl->slot_device_offset; -dbg (__FUNCTION__": slot->device = %d, ctrl->slot_device_offset = %d \n" , slot->device, ctrl->slot_device_offset); +dbg ("%s: slot->device = %d, ctrl->slot_device_offset = %d \n" , __FUNCTION__, slot->device, ctrl->slot_device_offset); status = (readl (ctrl->hpc_reg +INT_INPUT_CLEAR ) & (0x01L << hp_slot));
@@ -785,7 +785,7 @@DECLARE_WAITQUEUE (wait, current);int retval =0 ; -dbg (__FUNCTION__" - start\n" ); +dbg ("%s - start\n" , __FUNCTION__);add_wait_queue (&ctrl->queue, &wait);set_current_state (TASK_INTERRUPTIBLE );/* Sleep for up to 1 second to wait for the LED to change. */
@@ -795,7 +795,7 @@if (signal_pending (current)) retval = -EINTR ; -dbg (__FUNCTION__" - end\n" ); +dbg ("%s - end\n" , __FUNCTION__);return retval; }
drivers/hotplug/cpqphp_core.c +15 -15
@@ -320,7 +320,7 @@void *slot_entry=NULL ;int result; -dbg (__FUNCTION__"\n" ); +dbg ("%s\n" , __FUNCTION__); tempdword =readl (ctrl->hpc_reg +INT_INPUT_CLEAR );
@@ -482,7 +482,7 @@u8 tbus, tdevice, tslot, bridgeSlot; -dbg (__FUNCTION__" %p, %d, %d, %p\n" , ops, bus_num, dev_num, slot); +dbg ("%s %p, %d, %d, %p\n" , __FUNCTION__, ops, bus_num, dev_num, slot); bridgeSlot =0xFF ;
@@ -598,7 +598,7 @@if (slot ==NULL )return -ENODEV ; -dbg (__FUNCTION__" - physical_slot = %s\n" , hotplug_slot->name); +dbg ("%s - physical_slot = %s\n" , __FUNCTION__, hotplug_slot->name); ctrl = slot->ctrl;if (ctrl ==NULL )
@@ -633,7 +633,7 @@if (slot ==NULL )return -ENODEV ; -dbg (__FUNCTION__" - physical_slot = %s\n" , hotplug_slot->name); +dbg ("%s - physical_slot = %s\n" , __FUNCTION__, hotplug_slot->name); ctrl = slot->ctrl;if (ctrl ==NULL )
@@ -673,7 +673,7 @@if (slot ==NULL )return -ENODEV ; -dbg (__FUNCTION__" - physical_slot = %s\n" , hotplug_slot->name); +dbg ("%s - physical_slot = %s\n" , __FUNCTION__, hotplug_slot->name); ctrl = slot->ctrl;if (ctrl ==NULL )
@@ -701,7 +701,7 @@struct slot *slot =get_slot (hotplug_slot, __FUNCTION__);struct controller *ctrl; -dbg (__FUNCTION__"\n" ); +dbg ("%s\n" , __FUNCTION__);if (slot ==NULL )return -ENODEV ;
@@ -722,7 +722,7 @@if (slot ==NULL )return -ENODEV ; -dbg (__FUNCTION__" - physical_slot = %s\n" , hotplug_slot->name); +dbg ("%s - physical_slot = %s\n" , __FUNCTION__, hotplug_slot->name); ctrl = slot->ctrl;if (ctrl ==NULL )
@@ -740,7 +740,7 @@if (slot ==NULL )return -ENODEV ; -dbg (__FUNCTION__" - physical_slot = %s\n" , hotplug_slot->name); +dbg ("%s - physical_slot = %s\n" , __FUNCTION__, hotplug_slot->name); ctrl = slot->ctrl;if (ctrl ==NULL )
@@ -758,7 +758,7 @@if (slot ==NULL )return -ENODEV ; -dbg (__FUNCTION__" - physical_slot = %s\n" , hotplug_slot->name); +dbg ("%s - physical_slot = %s\n" , __FUNCTION__, hotplug_slot->name); ctrl = slot->ctrl;if (ctrl ==NULL )
@@ -777,7 +777,7 @@if (slot ==NULL )return -ENODEV ; -dbg (__FUNCTION__" - physical_slot = %s\n" , hotplug_slot->name); +dbg ("%s - physical_slot = %s\n" , __FUNCTION__, hotplug_slot->name); ctrl = slot->ctrl;if (ctrl ==NULL )
@@ -865,7 +865,7 @@// TODO: This code can be made to support non-Compaq or Intel subsystem IDs rc =pci_read_config_word (pdev,PCI_SUBSYSTEM_VENDOR_ID , &subsystem_vid);if (rc) { -err (__FUNCTION__" : pci_read_config_word failed\n" ); +err ("%s : pci_read_config_word failed\n" , __FUNCTION__);return rc; }dbg ("Subsystem Vendor ID: %x\n" , subsystem_vid);
@@ -876,14 +876,14 @@ ctrl = (struct controller *)kmalloc (sizeof (struct controller ),GFP_KERNEL );if (!ctrl) { -err (__FUNCTION__" : out of memory\n" ); +err ("%s : out of memory\n" , __FUNCTION__);return -ENOMEM ; }memset (ctrl,0 ,sizeof (struct controller )); rc =pci_read_config_word (pdev,PCI_SUBSYSTEM_ID , &subsystem_deviceid);if (rc) { -err (__FUNCTION__" : pci_read_config_word failed\n" ); +err ("%s : pci_read_config_word failed\n" , __FUNCTION__); goto err_free_ctrl; }
@@ -1139,7 +1139,7 @@// Store PCI Config Space for all devices on this bus rc =cpqhp_save_config (ctrl, ctrl->bus,readb (ctrl->hpc_reg +SLOT_MASK ));if (rc) { -err (__FUNCTION__": unable to save PCI configuration data, error %d\n" , rc); +err ("%s: unable to save PCI configuration data, error %d\n" , __FUNCTION__, rc); goto err_iounmap; }
@@ -1169,7 +1169,7 @@ rc =ctrl_slot_setup (ctrl, smbios_start, smbios_table);if (rc) {err (msg_initialization_err,6 ); -err (__FUNCTION__": unable to save PCI configuration data, error %d\n" , rc); +err ("%s: unable to save PCI configuration data, error %d\n" , __FUNCTION__, rc); goto err_iounmap; }
drivers/hotplug/cpqphp_ctrl.c +34 -34
191 lines not on this page · raw message
drivers/hotplug/cpqphp_nvram.c +1 -1
@@ -160,7 +160,7 @@ (temp6 == 'Q')) { result =1 ; } -dbg (__FUNCTION__" - returned %d\n" , result); +dbg ("%s - returned %d\n" ,__FUNCTION__, result);return result; }
drivers/hotplug/cpqphp_pci.c +6 -6
@@ -139,7 +139,7 @@//We did not even find a hotplug rep of the function, create it //This code might be taken out if we can guarantee the creation of functions //in parallel (hotplug and Linux at the same time). -dbg ("@@@@@@@@@@@ cpqhp_slot_create in " __FUNCTION__"\n" ); +dbg ("@@@@@@@@@@@ cpqhp_slot_create in %s\n" , __FUNCTION__); temp_func =cpqhp_slot_create (bus->number);if (temp_func ==NULL )return -ENOMEM ;
@@ -306,7 +306,7 @@memset (&wrapped_dev,0 ,sizeof (struct pci_dev_wrapped ));memset (&wrapped_bus,0 ,sizeof (struct pci_bus_wrapped )); -dbg (__FUNCTION__": bus/dev/func = %x/%x/%x\n" ,func->bus, func->device, func->function); +dbg ("%s: bus/dev/func = %x/%x/%x\n" , __FUNCTION__, func->bus, func->device, func->function);for (j=0 ; j<8 ; j++) {struct pci_dev * temp =pci_find_slot (func->bus, (func->device <<3 ) | j);
@@ -354,10 +354,10 @@ fakedev.devfn = dev_num <<3 ; fakedev.bus = &fakebus; fakebus.number = bus_num; -dbg (__FUNCTION__": dev %d, bus %d, pin %d, num %d\n" , - dev_num, bus_num, int_pin, irq_num); +dbg ("%s: dev %d, bus %d, pin %d, num %d\n" , + __FUNCTION__, dev_num, bus_num, int_pin, irq_num); rc =pcibios_set_irq_routing (&fakedev, int_pin -0x0a , irq_num); -dbg (__FUNCTION__":rc %d\n" , rc); +dbg ("%s:rc %d\n" , __FUNCTION__, rc);if (!rc)return !rc;
@@ -1585,7 +1585,7 @@int rc =0 ;struct pci_resource *node;struct pci_resource *t_node; -dbg (__FUNCTION__"\n" ); +dbg ("%s\n" , __FUNCTION__);if (!func)return (1 );
drivers/hotplug/pci_hotplug_core.c +1 -1
@@ -49,7 +49,7 @@#define MY_NAME THIS_MODULE->name#endif -#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: "__FUNCTION__": " fmt , MY_NAME , ## arg); } while (0) +#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __FUNCTION__ , ## arg); } while (0) #define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg) #define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg) #define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
drivers/hotplug/pci_hotplug_util.c +1 -1
@@ -41,7 +41,7 @@#define MY_NAME THIS_MODULE->name#endif -#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: "__FUNCTION__": " fmt , MY_NAME , ## arg); } while (0) +#define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __FUNCTION__ , ## arg); } while (0) #define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg) #define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg) #define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
ciao,
djgera
Signature · 4 lines
Gerardo Exequiel Pozzi ( djgera ) http://www.vmlinuz.com.ar http://www.djgera.com.ar KeyID: 0x1B8C330D Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
Greg KH
AppliedQuoted 2 lines · Gerardo Exequiel Pozzi
Hi people,
this patch fix the warning: concatenation of string literals with__FUNCTION__is deprecated
Applied to my trees, I'll send it on to Marcelo in a bit.
thanks,
greg k-h