On Tue, 2016-04-05 at 12:12 -0400, David Miller wrote: > As Joe suggested, it is not reasonable to expect all compilers to be > able to figure > out the result of all of the index increments in this function lead > to a specific > constant value. > > Your only option is to either keep the code as-is, or add proper > error reporting to > this function and to all callers, in order to handle the situation at > run time which > I realize is exactly what you are trying to avoid. > > If this crashes at run time with the BUG_ON(), it's going to happen > really quickly > when you bring the interface up. So I don't see > the run time check as so tragic.
So we're ok with just not changing this then, and living with a crash? That's fine with me, I suppose. Should the second WARN_ONCE be changed to a BUG_ON as well to get a crash instead of just a warning? Thanks, Jake