Subject: Re: [PATCH] genetlink: fix unsigned int comparison with less than zero

From: Johannes Berg <[email-masked]>
Date: Sun, 13 Nov 2016 08:31:44 +0100

> > I suppose it could be, since family IDs are allocated in a 16-bit
> > range
> > anyway. But family IDs can also never actually be negative, so
> > having
> > an unsigned int in the struct makes sense too.
> 
> All idr_* API's accept int, rather than unsigned int. This is my
> point.

Sure, but that's an internal implementation detail. The struct
genl_family is also an external API towards its users, and there
negative numbers make no sense whatsoever.

johannes