All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [RFC] Regarding min/max
@ 2007-02-03  1:23 Richard Knutsson
  2007-02-03  1:45 ` Randy Dunlap
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Richard Knutsson @ 2007-02-03  1:23 UTC (permalink / raw)
  To: kernel-janitors

Hi

Regarding converting:

	a = x < y ? x : y;

with
	a = min(x, y);
and etc.

What about variables in structs? It seem to not like the multiple lines in min()/max(),
so why not introduce something like:
#define __min(x,y)	((x) < (y) ? (x) : (y))
(and use __min() in min() also)? Then there would be no problem to clean up in the structs
+ the underscores should make people aware it does not type-check.

Just a thought
/Richard Knutsson


_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-03 20:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-03  1:23 [KJ] [RFC] Regarding min/max Richard Knutsson
2007-02-03  1:45 ` Randy Dunlap
2007-02-03  7:42 ` Robert P. J. Day
2007-02-03  8:38 ` Jaco Kroon
2007-02-03 19:01 ` Richard Knutsson
2007-02-03 20:04 ` Srdjan Todorovic
2007-02-03 20:10 ` Jaco Kroon

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.