NetBSD Problem Report #54812
From www@netbsd.org Tue Dec 31 08:30:43 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 89D187A187
for <gnats-bugs@gnats.NetBSD.org>; Tue, 31 Dec 2019 08:30:43 +0000 (UTC)
Message-Id: <20191231083042.9F86A7A1DA@mollari.NetBSD.org>
Date: Tue, 31 Dec 2019 08:30:42 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/dev/i2c/cx24227.c: 2 * Suspicious condition
X-Send-Pr-Version: www-1.0
>Number: 54812
>Category: kern
>Synopsis: src/sys/dev/i2c/cx24227.c: 2 * Suspicious condition
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: thorpej
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 31 08:35:00 +0000 2019
>Closed-Date: Sat Apr 11 12:53:27 +0000 2020
>Last-Modified: Sat Apr 11 12:53:27 +0000 2020
>Originator: David Binderman
>Release: cvs-20191230
>Organization:
>Environment:
>Description:
1.
src/sys/dev/i2c/cx24227.c:111:5: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition]
Source code is
if ((error = iic_acquire_bus(sc->tag, 0) != 0))
return error;
Maybe better source code
if ((error = iic_acquire_bus(sc->tag, 0)) != 0)
return error;
2.
src/sys/dev/i2c/cx24227.c:133:5: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition]
Duplicate.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Tue, 31 Dec 2019 14:22:49 +0000
Responsible-Changed-Why:
Take.
From: "Jason R Thorpe" <thorpej@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54812 CVS commit: src/sys/dev/i2c
Date: Tue, 31 Dec 2019 14:25:34 +0000
Module Name: src
Committed By: thorpej
Date: Tue Dec 31 14:25:33 UTC 2019
Modified Files:
src/sys/dev/i2c: cx24227.c
Log Message:
Fix mis-placed parentheses. PR kern/54812.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/i2c/cx24227.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: thorpej@NetBSD.org
State-Changed-When: Tue, 31 Dec 2019 14:37:48 +0000
State-Changed-Why:
Please confirm that the issue is fixed with:
$NetBSD: cx24227.c,v 1.11 2019/12/31 14:25:33 thorpej Exp $
State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sat, 11 Apr 2020 12:53:27 +0000
State-Changed-Why:
I expect the reporter can't provide significant feedback regarding the hardware beyond that the code looks suspicious (already done).
Thanks for the report!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.