]> git.hungrycats.org Git - linux/commit
[PATCH] strip: use kernel min/max
authorRandy Dunlap <rddunlap@osdl.org>
Tue, 24 Feb 2004 08:27:37 +0000 (03:27 -0500)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 24 Feb 2004 08:27:37 +0000 (03:27 -0500)
commita49286ee9e1e7cf6f0453a4798c1984634c15e15
tree0ecbe4ef4e42873953a3af8076f2c5f3fe2d8dcc
parent68b9ef718acf03217b2e5918916a9843015cba70
[PATCH] strip: use kernel min/max

Domen Puncer schrieb:
>
> Just some suggestions...
>
>> #define ELEMENTS_OF(X) (sizeof(X) / sizeof((X)[0]))
>
> Remove this define and s/ELEMENTS_OF/ARRAY_SIZE/g
>

There are more occurances of redundant ARRAY_SIZEs in the kernel. I will
keep that in mind!

>
>
>>@@ -847,7 +845,7 @@
>> static int allocate_buffers(struct strip *strip_info, int mtu)
>> {
>>        struct net_device *dev = strip_info->dev;
>>-       int sx_size = MAX(STRIP_ENCAP_SIZE(MAX_RECV_MTU), 4096);
>>+       int sx_size = max((int)STRIP_ENCAP_SIZE(MAX_RECV_MTU), 4096);
>
>
> max_t?

Changed that to max_t and min_t. A newbie queston: What should when be
preferred and why?
drivers/net/wireless/strip.c