Skip to contentSkip to conversation

Convert last few uses of __FUNCTION__ to __func__

PATCH In review Joe Perches 2 participants 9 messages Mar 25, 2014

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

cover Convert last few uses of __FUNCTION__ to __func__

Outside of staging, there aren't any more uses of __FUNCTION__ now...

Joe Perches (5):
powerpc: Convert last uses of __FUNCTION__ to __func__
x86: Convert last uses of __FUNCTION__ to __func__
block: Convert last uses of __FUNCTION__ to __func__
i915: Convert last uses of __FUNCTION__ to __func__
slab: Convert last uses of __FUNCTION__ to __func__

 arch/powerpc/platforms/pseries/nvram.c       | 11 +++++------
 arch/x86/kernel/hpet.c                       |  2 +-
 arch/x86/kernel/rtc.c                        |  4 ++--
 arch/x86/platform/intel-mid/intel_mid_vrtc.c |  2 +-
 drivers/block/drbd/drbd_int.h                |  8 ++++----
 drivers/block/xen-blkfront.c                 |  4 ++--
 drivers/gpu/drm/i915/dvo_ns2501.c            | 15 ++++++---------
 mm/slab.h                                    |  2 +-
 8 files changed, 22 insertions(+), 26 deletions(-)
Signature · 7 lines
1.8.1.2.459.gbcd45b4.dirty

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#6 lore raw

PATCH 4/5 i915: Convert last uses of __FUNCTION__ to __func__

Just about all of these have been converted to __func__, so convert the last uses.

---
 drivers/gpu/drm/i915/dvo_ns2501.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/dvo_ns2501.c +6 -9
index 954acb2..e40cd26 100644
@@ -234,7 +234,7 @@ static enum drm_mode_status ns2501_mode_valid(struct intel_dvo_device *dvo,
 {
 	DRM_DEBUG_KMS
 	    ("%s: is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
-	     __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
+	     __func__, mode->hdisplay, mode->htotal, mode->vdisplay,
 	     mode->vtotal);
 
 	/*
@@ -262,7 +262,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
 
 	DRM_DEBUG_KMS
 	    ("%s: set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
-	     __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
+	     __func__, mode->hdisplay, mode->htotal, mode->vdisplay,
 	     mode->vtotal);
 
 	/*
@@ -277,8 +277,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
 		if (mode->hdisplay == 800 && mode->vdisplay == 600) {
 			/* mode 277 */
 			ns->reg_8_shadow &= ~NS2501_8_BPAS;
-			DRM_DEBUG_KMS("%s: switching to 800x600\n",
-				      __FUNCTION__);
+			DRM_DEBUG_KMS("%s: switching to 800x600\n", __func__);
 
 			/*
 			 * No, I do not know where this data comes from.
@@ -341,8 +340,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
 
 		} else if (mode->hdisplay == 640 && mode->vdisplay == 480) {
 			/* mode 274 */
-			DRM_DEBUG_KMS("%s: switching to 640x480\n",
-				      __FUNCTION__);
+			DRM_DEBUG_KMS("%s: switching to 640x480\n", __func__);
 			/*
 			 * No, I do not know where this data comes from.
 			 * It is just what the video bios left in the DVO, so
@@ -406,8 +404,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
 
 		} else if (mode->hdisplay == 1024 && mode->vdisplay == 768) {
 			/* mode 280 */
-			DRM_DEBUG_KMS("%s: switching to 1024x768\n",
-				      __FUNCTION__);
+			DRM_DEBUG_KMS("%s: switching to 1024x768\n", __func__);
 			/*
 			 * This might or might not work, actually. I'm silently
 			 * assuming here that the native panel resolution is
@@ -459,7 +456,7 @@ static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable)
 	unsigned char ch;
 
 	DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to %i\n",
-		      __FUNCTION__, enable);
+		      __func__, enable);
 
 	ch = ns->reg_8_shadow;
 
Signature · 1 line
1.8.1.2.459.gbcd45b4.dirty
#1 lore raw

PATCH 1/5 powerpc: Convert last uses of __FUNCTION__ to __func__

In reply to Joe Perches

Just about all of these have been converted to __func__, so convert the last uses.

---
 arch/powerpc/platforms/pseries/nvram.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
arch/powerpc/platforms/pseries/nvram.c +5 -6
index d7096f2..0cc240b 100644
@@ -298,13 +298,13 @@ int nvram_write_os_partition(struct nvram_os_partition *part, char * buff,
 
 	rc = ppc_md.nvram_write((char *)&info, sizeof(struct err_log_info), &tmp_index);
 	if (rc <= 0) {
-		pr_err("%s: Failed nvram_write (%d)\n", __FUNCTION__, rc);
+		pr_err("%s: Failed nvram_write (%d)\n", __func__, rc);
 		return rc;
 	}
 
 	rc = ppc_md.nvram_write(buff, length, &tmp_index);
 	if (rc <= 0) {
-		pr_err("%s: Failed nvram_write (%d)\n", __FUNCTION__, rc);
+		pr_err("%s: Failed nvram_write (%d)\n", __func__, rc);
 		return rc;
 	}
 	
@@ -351,15 +351,14 @@ int nvram_read_partition(struct nvram_os_partition *part, char *buff,
 					sizeof(struct err_log_info),
 					&tmp_index);
 		if (rc <= 0) {
-			pr_err("%s: Failed nvram_read (%d)\n", __FUNCTION__,
-									rc);
+			pr_err("%s: Failed nvram_read (%d)\n", __func__, rc);
 			return rc;
 		}
 	}
 
 	rc = ppc_md.nvram_read(buff, length, &tmp_index);
 	if (rc <= 0) {
-		pr_err("%s: Failed nvram_read (%d)\n", __FUNCTION__, rc);
+		pr_err("%s: Failed nvram_read (%d)\n", __func__, rc);
 		return rc;
 	}
 
@@ -869,7 +868,7 @@ static void oops_to_nvram(struct kmsg_dumper *dumper,
 		break;
 	default:
 		pr_err("%s: ignoring unrecognized KMSG_DUMP_* reason %d\n",
-						__FUNCTION__, (int) reason);
+		       __func__, (int) reason);
 		return;
 	}
 
Signature · 1 line
1.8.1.2.459.gbcd45b4.dirty
#2 lore raw

PATCH 2/5 x86: Convert last uses of __FUNCTION__ to __func__

In reply to Joe Perches

Just about all of these have been converted to __func__, so convert the last uses.

---
 arch/x86/kernel/hpet.c                       | 2 +-
 arch/x86/kernel/rtc.c                        | 4 ++--
 arch/x86/platform/intel-mid/intel_mid_vrtc.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/hpet.c +1 -1
index 55db6a2..2e8a506 100644
@@ -171,7 +171,7 @@ static void _hpet_print_config(const char *function, int line)
 #define hpet_print_config()					\
 do {								\
 	if (hpet_verbose)					\
-		_hpet_print_config(__FUNCTION__, __LINE__);	\
+		_hpet_print_config(__func__, __LINE__);		\
 } while (0)
 
 /*
arch/x86/kernel/rtc.c +2 -2
index ca9622a..05d91d5 100644
@@ -49,11 +49,11 @@ int mach_set_rtc_mmss(const struct timespec *now)
 		retval = set_rtc_time(&tm);
 		if (retval)
 			printk(KERN_ERR "%s: RTC write failed with error %d\n",
-			       __FUNCTION__, retval);
+			       __func__, retval);
 	} else {
 		printk(KERN_ERR
 		       "%s: Invalid RTC value: write of %lx to RTC failed\n",
-			__FUNCTION__, nowtime);
+		       __func__, nowtime);
 		retval = -EINVAL;
 	}
 	return retval;
arch/x86/platform/intel-mid/intel_mid_vrtc.c +1 -1
index 4762cff..cb595ad 100644
@@ -110,7 +110,7 @@ int vrtc_set_mmss(const struct timespec *now)
 		spin_unlock_irqrestore(&rtc_lock, flags);
 	} else {
 		pr_err("%s: Invalid vRTC value: write of %lx to vRTC failed\n",
-			__FUNCTION__, now->tv_sec);
+		       __func__, now->tv_sec);
 		retval = -EINVAL;
 	}
 	return retval;
Signature · 1 line
1.8.1.2.459.gbcd45b4.dirty
#4 lore raw

PATCH 3/5 block: Convert last uses of __FUNCTION__ to __func__

In reply to Joe Perches

Just about all of these have been converted to __func__, so convert the last uses.

---
 drivers/block/drbd/drbd_int.h | 8 ++++----
 drivers/block/xen-blkfront.c  | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/block/drbd/drbd_int.h +4 -4
index e7093d4..e312f73 100644
@@ -1781,7 +1781,7 @@ static inline void inc_ap_pending(struct drbd_device *device)
 			func, line,					\
 			atomic_read(&device->which))
 
-#define dec_ap_pending(device) _dec_ap_pending(device, __FUNCTION__, __LINE__)
+#define dec_ap_pending(device) _dec_ap_pending(device, __func__, __LINE__)
 static inline void _dec_ap_pending(struct drbd_device *device, const char *func, int line)
 {
 	if (atomic_dec_and_test(&device->ap_pending_cnt))
@@ -1800,7 +1800,7 @@ static inline void inc_rs_pending(struct drbd_device *device)
 	atomic_inc(&device->rs_pending_cnt);
 }
 
-#define dec_rs_pending(device) _dec_rs_pending(device, __FUNCTION__, __LINE__)
+#define dec_rs_pending(device) _dec_rs_pending(device, __func__, __LINE__)
 static inline void _dec_rs_pending(struct drbd_device *device, const char *func, int line)
 {
 	atomic_dec(&device->rs_pending_cnt);
@@ -1821,14 +1821,14 @@ static inline void inc_unacked(struct drbd_device *device)
 	atomic_inc(&device->unacked_cnt);
 }
 
-#define dec_unacked(device) _dec_unacked(device, __FUNCTION__, __LINE__)
+#define dec_unacked(device) _dec_unacked(device, __func__, __LINE__)
 static inline void _dec_unacked(struct drbd_device *device, const char *func, int line)
 {
 	atomic_dec(&device->unacked_cnt);
 	ERR_IF_CNT_IS_NEGATIVE(unacked_cnt, func, line);
 }
 
-#define sub_unacked(device, n) _sub_unacked(device, n, __FUNCTION__, __LINE__)
+#define sub_unacked(device, n) _sub_unacked(device, n, __func__, __LINE__)
 static inline void _sub_unacked(struct drbd_device *device, int n, const char *func, int line)
 {
 	atomic_sub(n, &device->unacked_cnt);
drivers/block/xen-blkfront.c +2 -2
index efe1b47..375aea5 100644
@@ -1366,8 +1366,8 @@ static int blkfront_probe(struct xenbus_device *dev,
 
 			if (major != XENVBD_MAJOR) {
 				printk(KERN_INFO
-						"%s: HVM does not support vbd %d as xen block device\n",
-						__FUNCTION__, vdevice);
+				       "%s: HVM does not support vbd %d as xen block device\n",
+				       __func__, vdevice);
 				return -ENODEV;
 			}
 		}
Signature · 1 line
1.8.1.2.459.gbcd45b4.dirty
#5 lore raw

PATCH 3/5 block: Convert last uses of __FUNCTION__ to __func__

In reply to Joe Perches

Just about all of these have been converted to __func__, so convert the last uses.

---
 drivers/block/drbd/drbd_int.h | 8 ++++----
 drivers/block/xen-blkfront.c  | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/block/drbd/drbd_int.h +4 -4
index e7093d4..e312f73 100644
@@ -1781,7 +1781,7 @@ static inline void inc_ap_pending(struct drbd_device *device)
 			func, line,					\
 			atomic_read(&device->which))
 
-#define dec_ap_pending(device) _dec_ap_pending(device, __FUNCTION__, __LINE__)
+#define dec_ap_pending(device) _dec_ap_pending(device, __func__, __LINE__)
 static inline void _dec_ap_pending(struct drbd_device *device, const char *func, int line)
 {
 	if (atomic_dec_and_test(&device->ap_pending_cnt))
@@ -1800,7 +1800,7 @@ static inline void inc_rs_pending(struct drbd_device *device)
 	atomic_inc(&device->rs_pending_cnt);
 }
 
-#define dec_rs_pending(device) _dec_rs_pending(device, __FUNCTION__, __LINE__)
+#define dec_rs_pending(device) _dec_rs_pending(device, __func__, __LINE__)
 static inline void _dec_rs_pending(struct drbd_device *device, const char *func, int line)
 {
 	atomic_dec(&device->rs_pending_cnt);
@@ -1821,14 +1821,14 @@ static inline void inc_unacked(struct drbd_device *device)
 	atomic_inc(&device->unacked_cnt);
 }
 
-#define dec_unacked(device) _dec_unacked(device, __FUNCTION__, __LINE__)
+#define dec_unacked(device) _dec_unacked(device, __func__, __LINE__)
 static inline void _dec_unacked(struct drbd_device *device, const char *func, int line)
 {
 	atomic_dec(&device->unacked_cnt);
 	ERR_IF_CNT_IS_NEGATIVE(unacked_cnt, func, line);
 }
 
-#define sub_unacked(device, n) _sub_unacked(device, n, __FUNCTION__, __LINE__)
+#define sub_unacked(device, n) _sub_unacked(device, n, __func__, __LINE__)
 static inline void _sub_unacked(struct drbd_device *device, int n, const char *func, int line)
 {
 	atomic_sub(n, &device->unacked_cnt);
drivers/block/xen-blkfront.c +2 -2
index efe1b47..375aea5 100644
@@ -1366,8 +1366,8 @@ static int blkfront_probe(struct xenbus_device *dev,
 
 			if (major != XENVBD_MAJOR) {
 				printk(KERN_INFO
-						"%s: HVM does not support vbd %d as xen block device\n",
-						__FUNCTION__, vdevice);
+				       "%s: HVM does not support vbd %d as xen block device\n",
+				       __func__, vdevice);
 				return -ENODEV;
 			}
 		}
Signature · 1 line
1.8.1.2.459.gbcd45b4.dirty
#8 lore raw

PATCH 5/5 slab: Convert last uses of __FUNCTION__ to __func__

In reply to Joe Perches

Just about all of these have been converted to __func__, so convert the last uses.

---
 mm/slab.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/slab.h +1 -1
index 3045316..0d13b70 100644
@@ -249,7 +249,7 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
 		return cachep;
 
 	pr_err("%s: Wrong slab cache. %s but object is from %s\n",
-		__FUNCTION__, cachep->name, s->name);
+	       __func__, cachep->name, s->name);
 	WARN_ON_ONCE(1);
 	return s;
 }
Signature · 7 lines
1.8.1.2.459.gbcd45b4.dirty

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#7 lore raw

Re: [PATCH 4/5] i915: Convert last uses of __FUNCTION__ to __func__

In reply to Joe Perches
Quoted 4 lines · Joe Perches

Just about all of these have been converted to __func__, so convert the last uses.

Pulled into drm-intel, should land in 3.15.

Thanks, Daniel

Quoted 68 lines
---
 drivers/gpu/drm/i915/dvo_ns2501.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/dvo_ns2501.c +6 -9
index 954acb2..e40cd26 100644
@@ -234,7 +234,7 @@ static enum drm_mode_status ns2501_mode_valid(struct intel_dvo_device *dvo,
 {
 	DRM_DEBUG_KMS
 	    ("%s: is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
-	     __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
+	     __func__, mode->hdisplay, mode->htotal, mode->vdisplay,
 	     mode->vtotal);
 
 	/*
@@ -262,7 +262,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
 
 	DRM_DEBUG_KMS
 	    ("%s: set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
-	     __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
+	     __func__, mode->hdisplay, mode->htotal, mode->vdisplay,
 	     mode->vtotal);
 
 	/*
@@ -277,8 +277,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
 		if (mode->hdisplay == 800 && mode->vdisplay == 600) {
 			/* mode 277 */
 			ns->reg_8_shadow &= ~NS2501_8_BPAS;
-			DRM_DEBUG_KMS("%s: switching to 800x600\n",
-				      __FUNCTION__);
+			DRM_DEBUG_KMS("%s: switching to 800x600\n", __func__);
 
 			/*
 			 * No, I do not know where this data comes from.
@@ -341,8 +340,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
 
 		} else if (mode->hdisplay == 640 && mode->vdisplay == 480) {
 			/* mode 274 */
-			DRM_DEBUG_KMS("%s: switching to 640x480\n",
-				      __FUNCTION__);
+			DRM_DEBUG_KMS("%s: switching to 640x480\n", __func__);
 			/*
 			 * No, I do not know where this data comes from.
 			 * It is just what the video bios left in the DVO, so
@@ -406,8 +404,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
 
 		} else if (mode->hdisplay == 1024 && mode->vdisplay == 768) {
 			/* mode 280 */
-			DRM_DEBUG_KMS("%s: switching to 1024x768\n",
-				      __FUNCTION__);
+			DRM_DEBUG_KMS("%s: switching to 1024x768\n", __func__);
 			/*
 			 * This might or might not work, actually. I'm silently
 			 * assuming here that the native panel resolution is
@@ -459,7 +456,7 @@ static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable)
 	unsigned char ch;
 
 	DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to %i\n",
-		      __FUNCTION__, enable);
+		      __func__, enable);
 
 	ch = ns->reg_8_shadow;
 
Signature · 1 line
1.8.1.2.459.gbcd45b4.dirty
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#3 lore raw

RFC PATCH 1/1 MAINTAINERS: Remove Venkatesh from HPET, move to CREDITS

In reply to Joe Perches

Seems he's gone off to bigger/better things.
So long, etc...

---
 CREDITS     | 3 +++
 MAINTAINERS | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)
CREDITS +3 -0
index ae3dbc0..ce275b6 100644
@@ -2725,6 +2725,9 @@ N: Greg Page
 E: [email protected]
 D: IPX development and support
 
+N: Venkatesh Pallipadi (Venki)
+D: x86/HPET
+
 N: David Parsons
 E: [email protected]
 D: improved memory detection code.
MAINTAINERS +1 -2
index e1724d5..e134f91 100644
@@ -4181,8 +4181,7 @@ F:	include/linux/hpet.h
 F:	include/uapi/linux/hpet.h
 
 HPET:	x86
-M:	"Venkatesh Pallipadi (Venki)" <[email protected]>
-S:	Maintained
+S:	Orphan
 F:	arch/x86/kernel/hpet.c
 F:	arch/x86/include/asm/hpet.h