2009/12/7 Neil Horman <[email protected]>: > Update e1000 driver to not allow dma beyond the end of the allocated skb > [...] > +static inline u32 normalize_rx_len(u32 len) > +{ > + u32 match, last_match; > + > + > + for (match = 0x100; match <= 0x4000; match *= 2) { > + if (len <= match) > + return match; > + } > + > + return 0; > +} > +
You could use roundup_pow_of_two() instead. Best Regards, Michał Mirosław ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ E1000-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/e1000-devel
