Skip to contentSkip to conversation

fs/proc MIN/MAX removal

PATCH New Michael Veeck 1 participant 1 message Feb 26, 2004

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

PATCH 1/1 fs/proc MIN/MAX removal

Patch (against 2.6.3) removes unnecessary min/max macros and changes calls to use kernel.h macros instead.

Best Regards
Michael

fs/proc/generic.c +1 -5
@@ -37,10 +37,6 @@
 	.write		= proc_file_write,
 };
 
-#ifndef MIN
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
 /* buffer size is one page but our output routines use some slack for overruns */
 #define PROC_BLOCK_SIZE	(PAGE_SIZE - 1024)
 
@@ -61,7 +57,7 @@
 		return -ENOMEM;
 
 	while ((nbytes > 0) && !eof) {
-		count = MIN(PROC_BLOCK_SIZE, nbytes);
+		count = min_t(ssize_t, PROC_BLOCK_SIZE, nbytes);
 
 		start = NULL;
 		if (dp->get_info) {

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors