mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@redhat.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	law@redhat.com, stable@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] posix_types.h: Cleanup stale __NFDBITS and related definitions
Date: Wed, 25 Jul 2012 21:27:14 -0400	[thread overview]
Message-ID: <20120726012713.GA2356@zod.bos.redhat.com> (raw)
In-Reply-To: <1343258796.5132.164.camel@deadeye.wl.decadent.org.uk>

On Thu, Jul 26, 2012 at 12:26:36AM +0100, Ben Hutchings wrote:
> On Wed, 2012-07-25 at 10:40 -0400, Josh Boyer wrote:
> > Recently, glibc made a change to suppress sign-conversion warnings in FD_SET
> > (glibc commit ceb9e56b3d1).  This uncovered an issue with the kernel's
> > definition of __NFDBITS if applications #include <linux/types.h> after
> > including <sys/select.h>.  A build failure would be seen when passing the
> > -Werror=sign-compare and -D_FORTIFY_SOURCE=2 flags to gcc.
> > 
> > It was suggested that the kernel should either match the glibc definition of
> > __NFDBITS or remove that entirely.  The current in-kernel uses of __NFDBITS
> > can be replaced with BITS_PER_LONG, and there are no uses of the related
> > __FDELT and __FDMASK defines.  Given that, we'll continue the cleanup that
> > was started with commit 8b3d1cda4f5f ("posix_types: Remove fd_set macros")
> > and drop the remaining unused macros.
> > 
> > Additionally, linux/time.h has similar macros defined that expand to nothing
> > so we'll remove those at the same time.
> > 
> > Reported-by: Jeff Law <law@redhat.com>
> > Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> > CC: <stable@vger.kernel.org>
> 
> # v3.4+
> 
> (as 8b3d1cda4f5f went into 3.4)
>

Indeed.  However, I believe Linus pointed out that even before
8b3d1cda4f5f the macros that were removed weren't actually used.
It's likely safe to go back further than just 3.4.

I'll verify again in the morning and include the furthest back we could
remove these.  For now, let's go with what you suggest to be safe.

josh

  reply	other threads:[~2012-07-26  1:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25 14:40 Josh Boyer
2012-07-25 23:26 ` Ben Hutchings
2012-07-26  1:27   ` Josh Boyer [this message]
2012-07-26  1:33     ` Jonathan Nieder
2012-07-26  1:42       ` Josh Boyer
2012-07-26  3:34         ` Jonathan Nieder
2012-07-26  2:01     ` Ben Hutchings

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=20120726012713.GA2356@zod.bos.redhat.com \
    --to=jwboyer@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ben@decadent.org.uk \
    --cc=law@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®