On Wed, Dec 21, 2022 at 01:08:14PM +0100, Claudio Jeker wrote:
> In general I think finding such errors quickly would be nice.
> Is there a way to make this a compile time error? I guess that requires
> some ugly macro magic.

I agree a compile time check would be better but I don't have
a good idea of how to achieve it.  Perhaps type and flags could
be made to be different types.

There also is a tradeoff in terms of added work and future
effort in porting stuff from other BSDs.

> Also depending on KMEMSTAT to trigger the error seems not the best design.

I agree.  I went with this change because it was the smallest
change with no added runtime overhead that worked in GENERIC.

-m.

-- 
Rumour is information distilled so finely that it can filter
through anything.
-- (Terry Pratchett, Feet of Clay)

Reply via email to