[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1479022304.4897.0.camel@sipsolutions.net>
Date: Sun, 13 Nov 2016 08:31:44 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Colin King <colin.king@...onical.com>,
"David S . Miller" <davem@...emloft.net>,
pravin shelar <pshelar@....org>,
Wei Yongjun <weiyongjun1@...wei.com>,
Florian Westphal <fw@...len.de>,
Tycho Andersen <tycho.andersen@...onical.com>,
Tom Herbert <tom@...bertland.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] genetlink: fix unsigned int comparison with less than
zero
> > 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
Powered by blists - more mailing lists