From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 102342] mesa-17.1.7/src/gallium/auxiliary/pipebuffer/pb_cache.c:169]: (style) Suspicious condition Date: Mon, 21 Aug 2017 16:56:02 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1229883716==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E4D66E2A6 for ; Mon, 21 Aug 2017 16:56:02 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1229883716== Content-Type: multipart/alternative; boundary="15033345620.Be3af0C.23702"; charset="UTF-8" --15033345620.Be3af0C.23702 Date: Mon, 21 Aug 2017 16:56:02 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D102342 Bug ID: 102342 Summary: mesa-17.1.7/src/gallium/auxiliary/pipebuffer/pb_cache. c:169]: (style) Suspicious condition Product: Mesa Version: 17.1 Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: dcb314@hotmail.com QA Contact: dri-devel@lists.freedesktop.org mesa-17.1.7/src/gallium/auxiliary/pipebuffer/pb_cache.c:169]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses. Source code is if (!entry && (ret =3D pb_cache_is_buffer_compat(cur_entry, size, alignment, usage) > 0)) maybe better code if (!entry && ((ret =3D pb_cache_is_buffer_compat(cur_entry, size, alignment, usage)) > 0= )) --=20 You are receiving this mail because: You are the assignee for the bug.= --15033345620.Be3af0C.23702 Date: Mon, 21 Aug 2017 16:56:02 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 102342
Summary mesa-17.1.7/src/gallium/auxiliary/pipebuffer/pb_cache.c:169]:= (style) Suspicious condition
Product Mesa
Version 17.1
Hardware Other
OS All
Status NEW
Severity normal
Priority medium
Component Drivers/Gallium/radeonsi
Assignee dri-devel@lists.freedesktop.org
Reporter dcb314@hotmail.com
QA Contact dri-devel@lists.freedesktop.org

mesa-17.1.7/src/gallium/auxiliary/pipebuffer/pb_cache.c:169]: =
(style)
Suspicious condition (assignment + comparison); Clarify expression with
parentheses.

Source code is

      if (!entry && (ret =3D pb_cache_is_buffer_compat(cur_entry, s=
ize,
                                                     alignment, usage) >=
 0))

maybe better code

      if (!entry && ((ret =3D pb_cache_is_buffer_compat(cur_entry, =
size,
                                                     alignment, usage)) >=
; 0))


You are receiving this mail because:
  • You are the assignee for the bug.
= --15033345620.Be3af0C.23702-- --===============1229883716== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1229883716==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 102342] mesa-17.1.7/src/gallium/auxiliary/pipebuffer/pb_cache.c:169]: (style) Suspicious condition Date: Tue, 03 Apr 2018 06:09:47 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0080574108==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E9656E294 for ; Tue, 3 Apr 2018 06:09:47 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0080574108== Content-Type: multipart/alternative; boundary="15227357871.FEb4.20144" Content-Transfer-Encoding: 7bit --15227357871.FEb4.20144 Date: Tue, 3 Apr 2018 06:09:47 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D102342 Timothy Arceri changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #1 from Timothy Arceri --- Thanks for reporting this. Fixed by: commit 7e9b7ec094500f1245eed518592f99244e54a753 (HEAD -> master, origin/mas= ter, origin/HEAD) Author: Timothy Arceri Date: Sun Apr 1 09:32:28 2018 +1000 gallium/pipebuffer: fix parenthesis location Without this the return value will never get set to -1. This was first added in 49866c8f3457 and copied in 2b396eeed983. Fixes: 2b396eeed983 "gallium/pb_cache: add a copy of cache bufmgr independent of pb_manager" Reviewed-by: Marek Ol=C5=A1=C3=A1k Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3D102342 --=20 You are receiving this mail because: You are the assignee for the bug.= --15227357871.FEb4.20144 Date: Tue, 3 Apr 2018 06:09:47 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated Timothy Arceri changed bug 10234= 2
What Removed Added
Resolution --- FIXED
Status NEW RESOLVED

Commen= t # 1 on bug 10234= 2 from Timothy Arceri
Thanks for reporting this.

Fixed by:

commit 7e9b7ec094500f1245eed518592f99244e54a753 (HEAD -> master, origin/=
master,
origin/HEAD)
Author: Timothy Arceri <tar=
ceri@itsqueeze.com>
Date:   Sun Apr 1 09:32:28 2018 +1000

    gallium/pipebuffer: fix parenthesis location

    Without this the return value will never get set to -1. This
    was first added in 49866c8f3457 and copied in 2b396eeed983.

    Fixes: 2b396eeed983 "gallium/pb_cache: add a copy of cache bufmgr
independent of pb_manager"

    Reviewed-by: Marek Ol=C5=A1=C3=A1k <marek.olsak@amd.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.=
cgi?id=3D102342


You are receiving this mail because:
  • You are the assignee for the bug.
= --15227357871.FEb4.20144-- --===============0080574108== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0080574108==--