Re: [PATCH] Silent compiler warning introduced by acea6852f32b8805e166d885ed7e9f0c7cd10d41 ([BLUETOOTH]: Move children of connection device to NULL before connection down.)

Previous thread: [RFC] ipvs: Cleanup sync daemon code by Sven Wegener on Saturday, February 9, 2008 - 4:38 pm. (4 messages)

Next thread: [PATCH] Silent compiler warning introduced by 11b0cc3a4af65413ca3bb5698769e091486e0b22 (x25_asy: Fix ref count rule violation) by S.Çağlar on Saturday, February 9, 2008 - 8:06 pm. (1 message)

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) {
 		device_move(dev, NULL);
 		put_device(dev);
 	}

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!
--


Hi;

10 =C5=9Eub 2008 Paz tarihinde, Richard Knutsson =C5=9Funlar=C4=B1 yazm=C4=
cd10d41 ([BLUETOOTH]: Move children of connection device to NULL before con=

I thought its more readable than

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

Cheers
=2D-=20
S.=C3=87a=C4=9Flar 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 hou=
se!

Yes indeed. I hate the idiotic "double parenthesis without any meaning". 
I'd much rather see "((..) != NULL)" than "((..))", because the latter is 
totally meaningless semantically (although gcc gives it semantics).

		Linus
--


Hi;


But you still not merged this one :), is there any problem exists or would you prefer this comes from with a subsystem tree (which means i'm doing wrong thing with sending these trivial patches to you)?

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!
--


I don't know exactly what Linus prefers, but I think the guidelines in
Documentation/SubmittingPatches, sections "Select e-mail destination"
and "Select your CC (e-mail carbon copy) list" adequately answer your
question.
-- 
Stefan Richter
-=====-==--- --=- -=-==
http://arcgraph.de/sr/
--

Previous thread: [RFC] ipvs: Cleanup sync daemon code by Sven Wegener on Saturday, February 9, 2008 - 4:38 pm. (4 messages)

Next thread: [PATCH] Silent compiler warning introduced by 11b0cc3a4af65413ca3bb5698769e091486e0b22 (x25_asy: Fix ref count rule violation) by S.Çağlar on Saturday, February 9, 2008 - 8:06 pm. (1 message)