mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Auke Kok <auke-jan.h.kok@intel.com>,
	randy.dunlap@oracle.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [condingstyle] Add chapter on tests
Date: Sun, 27 May 2007 23:01:46 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.60.0705272256240.4530@poirot.grange> (raw)
In-Reply-To: <Pine.LNX.4.61.0705262213000.7344@yvahk01.tjqt.qr>

On Sat, 26 May 2007, Jan Engelhardt wrote:

> +Testing for a flag, as done in the following example, is redundant and
> +can be shortened.
> +
> +	if ((v & GFP_KERNEL) == GFP_KERNEL)
> +		return;
> +
> +should become
> +
> +	if (v & GFP_KERNEL)
> +		return;

This looks wrong to me. These two are only equivalent if the "flag" only 
has 1 bit. And already here you fall into this trap:

#define GFP_KERNEL	(__GFP_WAIT | __GFP_IO | __GFP_FS)

Thanks
Guennadi
---
Guennadi Liakhovetski

  parent reply	other threads:[~2007-05-27 21:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-25 17:25 [PATCH 1/2] [CodingStyle] Add comment to not put spaces before tabs Auke Kok
2007-05-25 17:25 ` [PATCH 2/2] [condingstyle] Add chapter on tests Auke Kok
2007-05-25 17:34   ` Stefan Richter
2007-05-25 17:40     ` Kok, Auke
2007-05-26 19:27   ` Jan Engelhardt
2007-05-26 20:13     ` [PATCH] " Jan Engelhardt
2007-05-26 22:35       ` Scott Preece
2007-05-27 14:37       ` Stefan Richter
2007-05-27 15:02         ` Jan Engelhardt
2007-05-27 15:23           ` Stefan Richter
2007-05-27 15:52             ` Jan Engelhardt
2007-05-27 21:01       ` Guennadi Liakhovetski [this message]
2007-05-27 18:04     ` [PATCH 2/2] " Kok, Auke
2007-05-27 20:17       ` Pekka Enberg
2007-05-27 16:08   ` Jesper Juhl
2007-05-25 17:32 ` [PATCH 1/2] [CodingStyle] Add comment to not put spaces before tabs Stefan Richter
2007-05-25 19:43   ` H. Peter Anvin
2007-05-25 20:29     ` Kok, Auke
2007-05-25 21:26       ` H. Peter Anvin

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=Pine.LNX.4.60.0705272256240.4530@poirot.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=auke-jan.h.kok@intel.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.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 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®