Skip to contentSkip to conversation

misc: replace remaining __FUNCTION__ with __func__

PATCH In review Harvey Harrison 2 participants 2 messages Oct 20, 2008

Subsystems (9)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: replace remaining __FUNCTION__ with __func__

__FUNCTION__ is gcc-specific, use __func__

---
These are the last occurences in-tree that are not already coming through a subsystem tree.

xtensa, staging and blackfin (serial driver and a fb driver) will catch the remaining ones as they merge.

 Documentation/DocBook/kernel-hacking.tmpl |    2 +-
 arch/arm/mach-iop13xx/include/mach/time.h |    4 ++--
 arch/arm/mach-pxa/include/mach/zylonite.h |    4 ++--
 arch/powerpc/include/asm/ptrace.h         |    2 +-
 drivers/net/usb/pegasus.c                 |    4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)
Documentation/DocBook/kernel-hacking.tmpl +1 -1
index 4c63e58..ae15d55 100644
@@ -1105,7 +1105,7 @@ static struct block_device_operations opt_fops = {
     </listitem>
     <listitem>
      <para>
-      Function names as strings (__FUNCTION__).
+      Function names as strings (__func__).
      </para>
     </listitem>
     <listitem>
arch/arm/mach-iop13xx/include/mach/time.h +2 -2
index 49213d9..d6d5252 100644
@@ -41,7 +41,7 @@ static inline unsigned long iop13xx_core_freq(void)
 		return 1200000000;
 	default:
 		printk("%s: warning unknown frequency, defaulting to 800Mhz\n",
-			__FUNCTION__);
+			__func__);
 	}
 
 	return 800000000;
@@ -60,7 +60,7 @@ static inline unsigned long iop13xx_xsi_bus_ratio(void)
 		return 4;
 	default:
 		printk("%s: warning unknown ratio, defaulting to 2\n",
-			__FUNCTION__);
+			__func__);
 	}
 
 	return 2;
arch/arm/mach-pxa/include/mach/zylonite.h +2 -2
index 0d35ca0..bf6785a 100644
@@ -30,7 +30,7 @@ extern void zylonite_pxa300_init(void);
 static inline void zylonite_pxa300_init(void)
 {
 	if (cpu_is_pxa300() || cpu_is_pxa310())
-		panic("%s: PXA300/PXA310 not supported\n", __FUNCTION__);
+		panic("%s: PXA300/PXA310 not supported\n", __func__);
 }
 #endif
 
@@ -40,7 +40,7 @@ extern void zylonite_pxa320_init(void);
 static inline void zylonite_pxa320_init(void)
 {
 	if (cpu_is_pxa320())
-		panic("%s: PXA320 not supported\n", __FUNCTION__);
+		panic("%s: PXA320 not supported\n", __func__);
 }
 #endif
 
arch/powerpc/include/asm/ptrace.h +1 -1
index 734e075..280a90c 100644
@@ -129,7 +129,7 @@ extern int ptrace_put_reg(struct task_struct *task, int regno,
 #define CHECK_FULL_REGS(regs)						      \
 do {									      \
 	if ((regs)->trap & 1)						      \
-		printk(KERN_CRIT "%s: partial register set\n", __FUNCTION__); \
+		printk(KERN_CRIT "%s: partial register set\n", __func__); \
 } while (0)
 #endif /* __powerpc64__ */
 
drivers/net/usb/pegasus.c +2 -2
index 38b90e7..7914867 100644
@@ -168,7 +168,7 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
 			netif_device_detach(pegasus->net);
 		if (netif_msg_drv(pegasus) && printk_ratelimit())
 			dev_err(&pegasus->intf->dev, "%s, status %d\n",
-					__FUNCTION__, ret);
+					__func__, ret);
 		goto out;
 	}
 
@@ -192,7 +192,7 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
 	if (!buffer) {
 		if (netif_msg_drv(pegasus))
 			dev_warn(&pegasus->intf->dev, "out of memory in %s\n",
-					__FUNCTION__);
+					__func__);
 		return -ENOMEM;
 	}
 	memcpy(buffer, data, size);
Signature · 1 line
1.6.0.2
#1 lore raw
Quoted 22 lines · Harvey Harrison

__FUNCTION__ is gcc-specific, use __func__

---
These are the last occurences in-tree that are not already coming through a subsystem tree.

xtensa, staging and blackfin (serial driver and a fb driver) will catch the remaining ones as they merge.

 Documentation/DocBook/kernel-hacking.tmpl |    2 +-
 arch/arm/mach-iop13xx/include/mach/time.h |    4 ++--
 arch/arm/mach-pxa/include/mach/zylonite.h |    4 ++--
 arch/powerpc/include/asm/ptrace.h         |    2 +-
 drivers/net/usb/pegasus.c                 |    4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)
Documentation/DocBook/kernel-hacking.tmpl +0 -0
index 4c63e58..ae15d55 100644

Documentation/DocBook/kernel-hacking.tmpl static struct block_device_operations opt_fops = { · line 1111

Quoted 8 lines
Documentation/DocBook/kernel-hacking.tmpl +1 -1
@@ -1105,7 +1105,7 @@ static struct block_device_operations opt_fops = {
     </listitem>
     <listitem>
      <para>
-      Function names as strings (__FUNCTION__).
+      Function names as strings (__func__).
      </para>
     </listitem>
     <listitem>

Ack that part.

Thanks.