[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?
Showing
Please register or sign in to comment