* [Kernel-janitors] [PATCH] drivers/media/video/saa5249.c MIN/MAX
@ 2004-02-07 15:34 Michael Veeck
0 siblings, 0 replies; only message in thread
From: Michael Veeck @ 2004-02-07 15:34 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 148 bytes --]
Hi!
Patch (against 2.6.3-rc1) removes unnecessary min/max macros and changes
calls to use kernel.h macros instead.
Feedback always welcome
Michael
[-- Attachment #2: minmax_drivers_media.patch --]
[-- Type: text/plain, Size: 1075 bytes --]
diff -Naur linux-2.6.2.org/drivers/media/video/saa5249.c linux-2.6.2.new/drivers/media/video/saa5249.c
--- linux-2.6.2.org/drivers/media/video/saa5249.c 2004-02-04 04:44:14.000000000 +0100
+++ linux-2.6.2.new/drivers/media/video/saa5249.c 2004-02-06 12:05:41.000000000 +0100
@@ -122,10 +122,6 @@
#define FALSE 0
#define TRUE 1
#endif
-#ifndef MIN
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#endif
#define RESCHED do { cond_resched(); } while(0)
@@ -518,8 +514,8 @@
{
int len;
char buf[16];
- start = MAX(req->start, 32);
- end = MIN(req->end, 39);
+ start = max(req->start, 32);
+ end = min(req->end, 39);
len=end-start+1;
if (i2c_senddata(t, 8, 0, 0, start, -1) ||
i2c_getdata(t, len, buf))
@@ -532,8 +528,8 @@
{
char buf[32];
int len;
- start = MAX(req->start, 7);
- end = MIN(req->end, 31);
+ start = max(req->start, 7);
+ end = min(req->end, 31);
len=end-start+1;
if (i2c_senddata(t, 8, 0, 0, start, -1) ||
i2c_getdata(t, len, buf))
[-- Attachment #3: Type: text/plain, Size: 163 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-02-07 15:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-07 15:34 [Kernel-janitors] [PATCH] drivers/media/video/saa5249.c MIN/MAX Michael Veeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.