[MTD] potential division by 0 in cfi_build_cmd() and cfi_merge_status()?
Nicolas Pitre
nico at cam.org
Mon Jan 14 23:06:13 EST 2008
On Tue, 15 Jan 2008, Jörn Engel wrote:
> I don't think cfi_interleave(cfi) will ever be 0. But the functions
> definitely look a bit large for inlines. Anyone having both cfi_probe
> and jedec_probe will enjoy twice the kernel footprint from them.
> Patches to move that code out-of-line are welcome.
Beware.
The typical use case is for your embedded system to be configured with
your flash arrangement and not all possible combinations available under
the sun.
In that case it is most likely that cfi_interleave(cfi) will simplify to
a constant, and making this out of line _will_ enlarge your kernel, as
well as possibly breaking interaction with a XIP kernel on ARM.
So please don't push this out of line.
Nicolas
More information about the linux-mtd
mailing list