Messages in this thread | | | Date | Tue, 2 Sep 2003 22:11:50 +0200 | From | Jörn Engel <> | Subject | Re: Sparse warning: bitmap.h: bad constant expression |
| |
On Tue, 2 September 2003 10:38:44 -0700, Dave Olien wrote: > > I was lazy with my problem summary yesterday. The sparse warning is actually > about the declaration of the functions bitmap_shift_right() and > bitmap_shift_left() in bitmap.h. In these cases, the bits argument to > DECLARE_BITMAP() was an argument to the function, and th variable sized > array is in the scope of that function. > > The only uses of these functions I can find are in the macros > physids_shift_right, physids_shift_left, in mpsec.h, and cpus_shift_rigt > and cpus_shift_left, in cpumask_array.h. > > In all uses, the "bits" argument eventually resolves to being a constant. > It would require the inline expansion of the bitmap_shift_*() functions > to take advantage of that.
If your analysis is correct, this looks safe enough for now. It would be nice to replace it with something more explicit, but I just don't care enough yet.
Jörn
-- Fantasy is more important than knowlegde. Knowlegde is limited, while fantasy embraces the whole world. -- Albert Einstein - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |