All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Colin King <colin.king@canonical.com>,
	"David S . Miller" <davem@davemloft.net>,
	pravin shelar <pshelar@ovn.org>,
	Wei Yongjun <weiyongjun1@huawei.com>,
	Florian Westphal <fw@strlen.de>,
	Tycho Andersen <tycho.andersen@canonical.com>,
	Tom Herbert <tom@herbertland.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] genetlink: fix unsigned int comparison with less than zero
Date: Sun, 13 Nov 2016 08:31:44 +0100	[thread overview]
Message-ID: <1479022304.4897.0.camel@sipsolutions.net> (raw)
In-Reply-To: <CAM_iQpUw-PYmksL2StciJiM-8C+y3w9T_Vo4=pVKnjQzTwKvLg@mail.gmail.com> (sfid-20161113_062527_710881_19064851)


> > 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

  reply	other threads:[~2016-11-13  7:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-10 15:57 [PATCH] genetlink: fix unsigned int comparison with less than zero Colin King
2016-11-10 17:11 ` Cong Wang
2016-11-12 21:37   ` Johannes Berg
2016-11-13  5:25     ` Cong Wang
2016-11-13  7:31       ` Johannes Berg [this message]
2016-11-13 17:15 ` David Miller
2016-11-14  6:29   ` Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479022304.4897.0.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.org \
    --cc=tom@herbertland.com \
    --cc=tycho.andersen@canonical.com \
    --cc=weiyongjun1@huawei.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.