From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C06A9C433DF for ; Tue, 11 Aug 2020 19:41:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C8D2206DC for ; Tue, 11 Aug 2020 19:41:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C8D2206DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 263846E7D1; Tue, 11 Aug 2020 19:41:24 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id DC4C56E5D5; Tue, 11 Aug 2020 19:41:22 +0000 (UTC) IronPort-SDR: eexYEmH/6fgF2MW+9DQJ6Mg8RdwdUBhiCDUBul8zg55w/7MU+NwYq+ejAnkItEUhRXqoL4Dq1K iDCG1iBLa2rQ== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="151249372" X-IronPort-AV: E=Sophos;i="5.76,301,1592895600"; d="scan'208";a="151249372" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 12:41:22 -0700 IronPort-SDR: 5iNQThVkDLiJNDfCIGC8AbXe65rvbx4/Mw3hkBvgih/FD6AyWjemvLHpk8aA2X6EA6Jzoxn+xN 0ziO7oXJJ3oQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,301,1592895600"; d="scan'208";a="276376765" Received: from lkp-server01.sh.intel.com (HELO 71729f5ca340) ([10.239.97.150]) by fmsmga007.fm.intel.com with ESMTP; 11 Aug 2020 12:41:21 -0700 Received: from kbuild by 71729f5ca340 with local (Exim 4.92) (envelope-from ) id 1k5a9A-0000jY-Fb; Tue, 11 Aug 2020 19:41:20 +0000 Date: Wed, 12 Aug 2020 03:41:08 +0800 From: kernel test robot To: Chris Wilson Subject: [PATCH] drm/i915/gt: fix itnull.cocci warnings Message-ID: <20200811194108.GA12904@295007ce90c4> References: <202008120355.g31CBwfF%lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202008120355.g31CBwfF%lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, kbuild-all@lists.01.org, Matthew Auld , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: kernel test robot drivers/gpu/drm/i915/gt/gen6_ppgtt.c:263:6-8: ERROR: iterator variable bound on line 262 cannot be NULL drivers/gpu/drm/i915/gt/gen6_ppgtt.c:322:7-9: ERROR: iterator variable bound on line 321 cannot be NULL Many iterators have the property that the first argument is always bound to a real list element, never NULL. Semantic patch information: False positives arise for some iterators that do not have this property, or in cases when the loop cursor is reassigned. The latter should only happen when the matched code is on the way to a loop exit (break, goto, or return). Generated by: scripts/coccinelle/iterators/itnull.cocci Fixes: 1d567ec61933 ("drm/i915/gt: Switch to object allocations for page directories") Signed-off-by: kernel test robot --- tree: git://anongit.freedesktop.org/drm-intel drm-intel-next-queued head: 06b108297b5cc24418e91c1103587ac7ca6fd03f commit: 1d567ec619333e54283dcd02780ab9a71ef86e44 [27/28] drm/i915/gt: Switch to object allocations for page directories Please take the patch only if it's a positive warning. Thanks! gen6_ppgtt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/i915/gt/gen6_ppgtt.c +++ b/drivers/gpu/drm/i915/gt/gen6_ppgtt.c @@ -260,8 +260,9 @@ static void gen6_ppgtt_free_pd(struct ge u32 pde; gen6_for_all_pdes(pt, pd, pde) - if (pt) - free_px(&ppgtt->base.vm, pt); + { + free_px(&ppgtt->base.vm, pt); + } } static void gen6_ppgtt_cleanup(struct i915_address_space *vm) @@ -319,7 +320,7 @@ static void pd_vma_unbind(struct i915_ad /* Free all no longer used page tables */ gen6_for_all_pdes(pt, ppgtt->base.pd, pde) { - if (!pt || atomic_read(&pt->used)) + if (atomic_read(&pt->used)) continue; free_px(&ppgtt->base.vm, pt); _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48AA2C433E0 for ; Tue, 11 Aug 2020 19:41:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F30D4206DC for ; Tue, 11 Aug 2020 19:41:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F30D4206DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A89A6E5D5; Tue, 11 Aug 2020 19:41:23 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id DC4C56E5D5; Tue, 11 Aug 2020 19:41:22 +0000 (UTC) IronPort-SDR: eexYEmH/6fgF2MW+9DQJ6Mg8RdwdUBhiCDUBul8zg55w/7MU+NwYq+ejAnkItEUhRXqoL4Dq1K iDCG1iBLa2rQ== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="151249372" X-IronPort-AV: E=Sophos;i="5.76,301,1592895600"; d="scan'208";a="151249372" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 12:41:22 -0700 IronPort-SDR: 5iNQThVkDLiJNDfCIGC8AbXe65rvbx4/Mw3hkBvgih/FD6AyWjemvLHpk8aA2X6EA6Jzoxn+xN 0ziO7oXJJ3oQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,301,1592895600"; d="scan'208";a="276376765" Received: from lkp-server01.sh.intel.com (HELO 71729f5ca340) ([10.239.97.150]) by fmsmga007.fm.intel.com with ESMTP; 11 Aug 2020 12:41:21 -0700 Received: from kbuild by 71729f5ca340 with local (Exim 4.92) (envelope-from ) id 1k5a9A-0000jY-Fb; Tue, 11 Aug 2020 19:41:20 +0000 Date: Wed, 12 Aug 2020 03:41:08 +0800 From: kernel test robot To: Chris Wilson Message-ID: <20200811194108.GA12904@295007ce90c4> References: <202008120355.g31CBwfF%lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202008120355.g31CBwfF%lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.10.1 (2018-07-13) Subject: [Intel-gfx] [PATCH] drm/i915/gt: fix itnull.cocci warnings X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, kbuild-all@lists.01.org, Matthew Auld , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: kernel test robot drivers/gpu/drm/i915/gt/gen6_ppgtt.c:263:6-8: ERROR: iterator variable bound on line 262 cannot be NULL drivers/gpu/drm/i915/gt/gen6_ppgtt.c:322:7-9: ERROR: iterator variable bound on line 321 cannot be NULL Many iterators have the property that the first argument is always bound to a real list element, never NULL. Semantic patch information: False positives arise for some iterators that do not have this property, or in cases when the loop cursor is reassigned. The latter should only happen when the matched code is on the way to a loop exit (break, goto, or return). Generated by: scripts/coccinelle/iterators/itnull.cocci Fixes: 1d567ec61933 ("drm/i915/gt: Switch to object allocations for page directories") Signed-off-by: kernel test robot --- tree: git://anongit.freedesktop.org/drm-intel drm-intel-next-queued head: 06b108297b5cc24418e91c1103587ac7ca6fd03f commit: 1d567ec619333e54283dcd02780ab9a71ef86e44 [27/28] drm/i915/gt: Switch to object allocations for page directories Please take the patch only if it's a positive warning. Thanks! gen6_ppgtt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/i915/gt/gen6_ppgtt.c +++ b/drivers/gpu/drm/i915/gt/gen6_ppgtt.c @@ -260,8 +260,9 @@ static void gen6_ppgtt_free_pd(struct ge u32 pde; gen6_for_all_pdes(pt, pd, pde) - if (pt) - free_px(&ppgtt->base.vm, pt); + { + free_px(&ppgtt->base.vm, pt); + } } static void gen6_ppgtt_cleanup(struct i915_address_space *vm) @@ -319,7 +320,7 @@ static void pd_vma_unbind(struct i915_ad /* Free all no longer used page tables */ gen6_for_all_pdes(pt, ppgtt->base.pd, pde) { - if (!pt || atomic_read(&pt->used)) + if (atomic_read(&pt->used)) continue; free_px(&ppgtt->base.vm, pt); _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7782612067588015242==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] drm/i915/gt: fix itnull.cocci warnings Date: Wed, 12 Aug 2020 03:41:08 +0800 Message-ID: <20200811194108.GA12904@295007ce90c4> In-Reply-To: <202008120355.g31CBwfF%lkp@intel.com> List-Id: --===============7782612067588015242== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot drivers/gpu/drm/i915/gt/gen6_ppgtt.c:263:6-8: ERROR: iterator variable boun= d on line 262 cannot be NULL drivers/gpu/drm/i915/gt/gen6_ppgtt.c:322:7-9: ERROR: iterator variable boun= d on line 321 cannot be NULL Many iterators have the property that the first argument is always bound to a real list element, never NULL. Semantic patch information: False positives arise for some iterators that do not have this property, or in cases when the loop cursor is reassigned. The latter should only happen when the matched code is on the way to a loop exit (break, goto, or return). Generated by: scripts/coccinelle/iterators/itnull.cocci Fixes: 1d567ec61933 ("drm/i915/gt: Switch to object allocations for page di= rectories") Signed-off-by: kernel test robot --- tree: git://anongit.freedesktop.org/drm-intel drm-intel-next-queued head: 06b108297b5cc24418e91c1103587ac7ca6fd03f commit: 1d567ec619333e54283dcd02780ab9a71ef86e44 [27/28] drm/i915/gt: Switc= h to object allocations for page directories Please take the patch only if it's a positive warning. Thanks! gen6_ppgtt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/i915/gt/gen6_ppgtt.c +++ b/drivers/gpu/drm/i915/gt/gen6_ppgtt.c @@ -260,8 +260,9 @@ static void gen6_ppgtt_free_pd(struct ge u32 pde; = gen6_for_all_pdes(pt, pd, pde) - if (pt) - free_px(&ppgtt->base.vm, pt); + { + free_px(&ppgtt->base.vm, pt); + } } = static void gen6_ppgtt_cleanup(struct i915_address_space *vm) @@ -319,7 +320,7 @@ static void pd_vma_unbind(struct i915_ad = /* Free all no longer used page tables */ gen6_for_all_pdes(pt, ppgtt->base.pd, pde) { - if (!pt || atomic_read(&pt->used)) + if (atomic_read(&pt->used)) continue; = free_px(&ppgtt->base.vm, pt); --===============7782612067588015242==--