From patchwork Mon Aug 31 18:13:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 7100751 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6DBDBBEEC1 for ; Mon, 31 Aug 2015 18:09:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7AD7C2069F for ; Mon, 31 Aug 2015 18:09:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 22F4C20697 for ; Mon, 31 Aug 2015 18:09:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 36BA26E4AB; Mon, 31 Aug 2015 11:08:58 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by gabe.freedesktop.org (Postfix) with ESMTPS id 23A216E2CF; Mon, 31 Aug 2015 11:08:56 -0700 (PDT) Received: by wiclp12 with SMTP id lp12so6996865wic.1; Mon, 31 Aug 2015 11:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=p9FKR3D43FWKchM6PAqxfSKyD2KAQ4J9hfoPix7jQuQ=; b=LoDGkQQDkFp+hMX9GLPpFCfvhzmrJtkLV82/OxpMB7HP/dTz8DbbjhP94LGfax21Py MIVCwmsWRATXtN85wweAosFjwV+HvAYDMiZDeSCAVI8IApmZgN5lHGsZlisUV0CR1PWU XTrSUDge4Dtzufx879FpOkbI71LDhfSKHCDk6s5dbXj7KSGkd83H2j1WfylsKa3OPn15 1RmxA2dNgmiWbQPq3qcYXlG2RJDDgr3t/DqGS3RbXIrpicJtumCJabcbLrQ4DMCytBgX QJQlZsotK1/kvCGoSp8D9PbivPyOHUFM7WP1+5zTyaNdqv9osVPF3ZqYMV+1KmI87DfU +G+g== X-Received: by 10.180.80.200 with SMTP id t8mr20707939wix.18.1441044534403; Mon, 31 Aug 2015 11:08:54 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by smtp.gmail.com with ESMTPSA id im10sm23318758wjb.40.2015.08.31.11.08.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Aug 2015 11:08:53 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Date: Mon, 31 Aug 2015 19:13:12 +0100 Message-Id: <1441044792-13906-1-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1440434060-31347-3-git-send-email-emil.l.velikov@gmail.com> References: <1440434060-31347-3-git-send-email-emil.l.velikov@gmail.com> Cc: intel-gfx@lists.freedesktop.org, emil.l.velikov@gmail.com Subject: [Intel-gfx] [PATCH libdrm v2] intel: resolve shadowing warnings X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP v2: keep the bo_gem declaration in exec2() within the loop (Chris) Cc: Chris Wilson Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Emil Velikov Reviewed-by: Chris Wilson --- intel/intel_bufmgr_fake.c | 2 +- intel/intel_bufmgr_gem.c | 7 +++---- intel/intel_decode.c | 7 ++----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c index 75387b7..551e05d 100644 --- a/intel/intel_bufmgr_fake.c +++ b/intel/intel_bufmgr_fake.c @@ -1460,7 +1460,7 @@ restart: assert(ret == 0); if (bufmgr_fake->exec != NULL) { - int ret = bufmgr_fake->exec(bo, used, bufmgr_fake->exec_priv); + ret = bufmgr_fake->exec(bo, used, bufmgr_fake->exec_priv); if (ret != 0) { pthread_mutex_unlock(&bufmgr_fake->lock); return ret; diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 2723e21..7303903 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -2165,8 +2165,7 @@ drm_intel_gem_bo_exec(drm_intel_bo *bo, int used, drm_intel_gem_dump_validation_list(bufmgr_gem); for (i = 0; i < bufmgr_gem->exec_count; i++) { - drm_intel_bo *bo = bufmgr_gem->exec_bos[i]; - drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; + bo_gem = (drm_intel_bo_gem *) bufmgr_gem->exec_bos[i]; bo_gem->idle = false; @@ -2260,8 +2259,8 @@ skip_execution: drm_intel_gem_dump_validation_list(bufmgr_gem); for (i = 0; i < bufmgr_gem->exec_count; i++) { - drm_intel_bo *bo = bufmgr_gem->exec_bos[i]; - drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *)bo; + drm_intel_bo_gem *bo_gem = + (drm_intel_bo_gem *) bufmgr_gem->exec_bos[i]; bo_gem->idle = false; diff --git a/intel/intel_decode.c b/intel/intel_decode.c index 2b902a3..345d457 100644 --- a/intel/intel_decode.c +++ b/intel/intel_decode.c @@ -3630,7 +3630,6 @@ decode_3d_965(struct drm_intel_decode *ctx) case 0x7a00: if (IS_GEN6(devid) || IS_GEN7(devid)) { - unsigned int i; if (len != 4 && len != 5) fprintf(out, "Bad count in PIPE_CONTROL\n"); @@ -3732,8 +3731,6 @@ decode_3d_965(struct drm_intel_decode *ctx) if (opcode_3d->func) { return opcode_3d->func(ctx); } else { - unsigned int i; - instr_out(ctx, 0, "%s\n", opcode_3d->name); for (i = 1; i < len; i++) { @@ -3883,9 +3880,9 @@ drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx, void drm_intel_decode_set_output_file(struct drm_intel_decode *ctx, - FILE *out) + FILE *output) { - ctx->out = out; + ctx->out = output; } /**