All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Julia Lawall <julia@diku.dk>
Cc: Christopher Li <sparse@chrisli.org>,
	yi.zhu@intel.com, linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Harvey Harrison <harvey.harrison@gmail.com>,
	Alexander Viro <viro@ftp.linux.org.uk>,
	linux-sparse@vger.kernel.org,
	Josh Triplett <josh@freedesktop.org>
Subject: Re: [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct
Date: Wed, 05 Mar 2008 12:20:10 +0000	[thread overview]
Message-ID: <20080305122010.GA999@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.64.0803050951550.28021@ask.diku.dk>


* Julia Lawall <julia@diku.dk> wrote:

> There are some legitimate uses of !x & y which are actually of the 
> form !x & !y, where x and y are function calls.  That is a not 
> particularly elegant way of getting both x and y to be evaluated and 
> then combining the results using "and".  If such code is considered 
> acceptable, then perhaps the sparse patch should be more complicated.

i tend to be of the opinion that the details in C source code should be 
visually obvious and should be heavily simplified down from what is 
'possible' language-wise - with most deviations and complications that 
depart from convention considered an error. I'd consider "!fn1() & 
!fn2()" a borderline coding style violation in any case - and it costs 
nothing to change it to "!fn1() && !fn2()".

	Ingo

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Julia Lawall <julia@diku.dk>
Cc: Christopher Li <sparse@chrisli.org>,
	yi.zhu@intel.com, linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Harvey Harrison <harvey.harrison@gmail.com>,
	Alexander Viro <viro@ftp.linux.org.uk>,
	linux-sparse@vger.kernel.org,
	Josh Triplett <josh@freedesktop.org>
Subject: Re: [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and &
Date: Wed, 5 Mar 2008 13:20:10 +0100	[thread overview]
Message-ID: <20080305122010.GA999@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.64.0803050951550.28021@ask.diku.dk>


* Julia Lawall <julia@diku.dk> wrote:

> There are some legitimate uses of !x & y which are actually of the 
> form !x & !y, where x and y are function calls.  That is a not 
> particularly elegant way of getting both x and y to be evaluated and 
> then combining the results using "and".  If such code is considered 
> acceptable, then perhaps the sparse patch should be more complicated.

i tend to be of the opinion that the details in C source code should be 
visually obvious and should be heavily simplified down from what is 
'possible' language-wise - with most deviations and complications that 
depart from convention considered an error. I'd consider "!fn1() & 
!fn2()" a borderline coding style violation in any case - and it costs 
nothing to change it to "!fn1() && !fn2()".

	Ingo

  reply	other threads:[~2008-03-05 12:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 20:44 [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of Julia Lawall
2008-02-26 20:44 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Julia Lawall
2008-02-26 22:47 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of.and & Tomas Winkler
2008-02-26 22:47   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Tomas Winkler
2008-02-27  0:59   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct John W. Linville
2008-02-27  0:59     ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & John W. Linville
     [not found] ` <Pine.LNX.4.64.0802262143570.18200-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org>
2008-03-05  6:38   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Ingo Molnar
2008-03-05  6:38     ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Ingo Molnar
2008-03-05  6:38     ` Ingo Molnar
2008-03-05  6:49     ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of.and & Christopher Li
2008-03-05  6:49       ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Christopher Li
2008-03-05  7:02       ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Ingo Molnar
2008-03-05  7:02         ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Ingo Molnar
     [not found]         ` <20080305070201.GA32434-X9Un+BFzKDI@public.gmane.org>
2008-03-05  7:09           ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Harvey Harrison
2008-03-05  7:09             ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Harvey Harrison
2008-03-05  7:09             ` Harvey Harrison
2008-03-05  8:19             ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Ingo Molnar
2008-03-05  8:19               ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Ingo Molnar
     [not found]               ` <20080305081904.GA17789-X9Un+BFzKDI@public.gmane.org>
2008-03-05 12:13                 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Derek M Jones
2008-03-05 12:13                   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Derek M Jones
2008-03-05 12:13                   ` Derek M Jones
2008-03-05  8:55           ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Julia Lawall
2008-03-05  8:55             ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Julia Lawall
2008-03-05  8:55             ` Julia Lawall
2008-03-05 12:20             ` Ingo Molnar [this message]
2008-03-05 12:20               ` Ingo Molnar
     [not found]               ` <20080305122010.GA999-X9Un+BFzKDI@public.gmane.org>
2008-03-05 12:30                 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of.and & Bart Van Assche
2008-03-05 12:30                   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Bart Van Assche
2008-03-05 12:30                   ` Bart Van Assche
     [not found]                   ` <e2e108260803050430o317d3e0dyed50e86cc4569746-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-05 12:36                     ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Ingo Molnar
2008-03-05 12:36                       ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Ingo Molnar
2008-03-05 12:36                       ` Ingo Molnar
2008-03-05 12:35                 ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct Julia Lawall
2008-03-05 12:35                   ` [PATCH 6/9] drivers/net/wireless/iwlwifi/iwl-4965.c: Correct use of ! and & Julia Lawall
2008-03-05 12:35                   ` Julia Lawall

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=20080305122010.GA999@elte.hu \
    --to=mingo@elte.hu \
    --cc=harvey.harrison@gmail.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=josh@freedesktop.org \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sparse@chrisli.org \
    --cc=viro@ftp.linux.org.uk \
    --cc=yi.zhu@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.