LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "S.Çağlar Onur" <caglar@pardus.org.tr>
To: Richard Knutsson <ricknu-0@student.ltu.se>
Cc: linux-kernel@vger.kernel.org, davem@davemloft.net,
	torvalds@linux-foundation.org, hidave.darkstar@gmail.com,
	marcel@holtmann.org
Subject: Re: [PATCH] Silent compiler warning introduced by acea6852f32b8805e166d885ed7e9f0c7cd10d41 ([BLUETOOTH]: Move children of connection device to NULL before connection down.)
Date: Sun, 10 Feb 2008 16:21:21 +0200	[thread overview]
Message-ID: <200802101621.26432.caglar@pardus.org.tr> (raw)
In-Reply-To: <47AEC941.1070504@student.ltu.se>

[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]

Hi;

10 Şub 2008 Paz tarihinde, Richard Knutsson şunları yazmıştı: 
> S.Çağlar Onur wrote:
> > Hi;
> >
> > Following patch silents
> >
> > net/bluetooth/hci_sysfs.c: In function `del_conn':
> > net/bluetooth/hci_sysfs.c:339: warning: suggest parentheses around assignment used as truth value
> >
> > compiler warning introduced by commit acea6852f32b8805e166d885ed7e9f0c7cd10d41 ([BLUETOOTH]: Move children of connection device to NULL before connection down.)
> >
> > Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
> >
> >  net/bluetooth/hci_sysfs.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
> > index e13cf5e..d2d1e4f 100644
> > --- a/net/bluetooth/hci_sysfs.c
> > +++ b/net/bluetooth/hci_sysfs.c
> > @@ -336,7 +336,7 @@ static void del_conn(struct work_struct *work)
> >  	struct device *dev;
> >  	struct hci_conn *conn = container_of(work, struct hci_conn, work);
> >  
> > -	while (dev = device_find_child(&conn->dev, NULL, __match_tty)) {
> > +	while ((dev = device_find_child(&conn->dev, NULL, __match_tty)) != NULL) {
> >   
> Why do you need '!= NULL'?

I thought its more readable than

while ((dev = device_find_child(&conn->dev, NULL, __match_tty))) {

Cheers
-- 
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-02-10 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-10  2:57 S.Çağlar Onur
2008-02-10  9:52 ` Richard Knutsson
2008-02-10 14:21   ` S.Çağlar Onur [this message]
2008-02-10 18:58     ` Linus Torvalds
2008-02-10 22:05       ` S.Çağlar Onur
2008-02-11 12:53         ` Stefan Richter

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=200802101621.26432.caglar@pardus.org.tr \
    --to=caglar@pardus.org.tr \
    --cc=davem@davemloft.net \
    --cc=hidave.darkstar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=ricknu-0@student.ltu.se \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [PATCH] Silent compiler warning introduced by acea6852f32b8805e166d885ed7e9f0c7cd10d41 ([BLUETOOTH]: Move children of connection device to NULL before connection down.)' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).