From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Dilger, Andreas" <andreas.dilger@intel.com>,
"Drokin, Oleg" <oleg.drokin@intel.com>,
James Simmons <jsimmons@infradead.org>,
"Eremin, Dmitry" <dmitry.eremin@intel.com>,
Lustre Development List <lustre-devel@lists.lustre.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [lustre-devel] [PATCH] staging: lustre: shut up clang warnings on CLASSERT()
Date: Thu, 2 Feb 2017 11:43:57 +0100 [thread overview]
Message-ID: <20170202104357.GB22904@kroah.com> (raw)
In-Reply-To: <CAK8P3a1oT+yp_kP-faQMdVun7ny9gfSpby3Ae0xmEpzmuGEJCA@mail.gmail.com>
On Thu, Feb 02, 2017 at 11:40:32AM +0100, Arnd Bergmann wrote:
> On Thu, Feb 2, 2017 at 10:54 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
> >> > index aab15d8112a4..2d5435029185 100644
> >> > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
> >> > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
> >> > @@ -291,7 +291,7 @@ do { \
> >> > * value after conversion...
> >> > *
> >> > */
> >> > -#define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0)
> >> > +#define CLASSERT(cond) do {switch (42) {case (cond): case 0: default: break; } } while (0)
> >
> > Ugh, why not just use the in-kernel ASSERT macro instead?
>
> We don't have one ;-)
Oh nice!
> I've done a semi-automated patch to replace CLASSERT() with the respective
> BUILD_BUG_ON() now, but that patch is quite large.
Should be easy to script, I missed that this was a build-time check.
Heck, I'll take a script to do this, or I can just do it in my end.
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Dilger, Andreas" <andreas.dilger@intel.com>,
"Drokin, Oleg" <oleg.drokin@intel.com>,
James Simmons <jsimmons@infradead.org>,
"Eremin, Dmitry" <dmitry.eremin@intel.com>,
Lustre Development List <lustre-devel@lists.lustre.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: lustre: shut up clang warnings on CLASSERT()
Date: Thu, 2 Feb 2017 11:43:57 +0100 [thread overview]
Message-ID: <20170202104357.GB22904@kroah.com> (raw)
In-Reply-To: <CAK8P3a1oT+yp_kP-faQMdVun7ny9gfSpby3Ae0xmEpzmuGEJCA@mail.gmail.com>
On Thu, Feb 02, 2017 at 11:40:32AM +0100, Arnd Bergmann wrote:
> On Thu, Feb 2, 2017 at 10:54 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
> >> > index aab15d8112a4..2d5435029185 100644
> >> > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
> >> > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
> >> > @@ -291,7 +291,7 @@ do { \
> >> > * value after conversion...
> >> > *
> >> > */
> >> > -#define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0)
> >> > +#define CLASSERT(cond) do {switch (42) {case (cond): case 0: default: break; } } while (0)
> >
> > Ugh, why not just use the in-kernel ASSERT macro instead?
>
> We don't have one ;-)
Oh nice!
> I've done a semi-automated patch to replace CLASSERT() with the respective
> BUILD_BUG_ON() now, but that patch is quite large.
Should be easy to script, I missed that this was a build-time check.
Heck, I'll take a script to do this, or I can just do it in my end.
thanks,
greg k-h
next prev parent reply other threads:[~2017-02-02 10:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 16:52 [lustre-devel] [PATCH] staging: lustre: shut up clang warnings on CLASSERT() Arnd Bergmann
2017-02-01 16:52 ` Arnd Bergmann
2017-02-02 7:50 ` [lustre-devel] " Dilger, Andreas
2017-02-02 7:50 ` Dilger, Andreas
2017-02-02 9:54 ` [lustre-devel] " Greg Kroah-Hartman
2017-02-02 9:54 ` Greg Kroah-Hartman
2017-02-02 10:40 ` [lustre-devel] " Arnd Bergmann
2017-02-02 10:40 ` Arnd Bergmann
2017-02-02 10:43 ` Greg Kroah-Hartman [this message]
2017-02-02 10:43 ` Greg Kroah-Hartman
2017-02-02 11:22 ` [lustre-devel] " Arnd Bergmann
2017-02-02 11:22 ` Arnd Bergmann
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=20170202104357.GB22904@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andreas.dilger@intel.com \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=dmitry.eremin@intel.com \
--cc=jsimmons@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.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.