Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1201666pxb; Fri, 21 Jan 2022 12:07:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvkVxZiXOkwE4CQSJu9yWHPOFEjEMN2+f957vF/Sr45DdqO3iJxh9uoCUxymDaLIQr0zzX X-Received: by 2002:a05:6a00:cc6:b0:4c3:b9cd:f088 with SMTP id b6-20020a056a000cc600b004c3b9cdf088mr4916864pfv.48.1642795679590; Fri, 21 Jan 2022 12:07:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642795679; cv=none; d=google.com; s=arc-20160816; b=EF90jVQDvvDCdFCZwB2L7b5nl6sBybJBqS40cJpBYjBwkMbRC5Tj2kFTNp41qtRCxe 5T/KXYQR/zmRbX/TjL5+TRzEnPp7MN2iYWhsyP8Twdb5B7uCInqXsmXl01/hA9wMMBKV 5KDlA7g/7Psb/pl7U9YIqCKAO8p8KSz4Utaqx1SNq1Lmj6NAVsFAl2DQa7Ru59w1XFzr geazEbZ2C7GTIEVKaD9nvjir9gXAFU9laJuwOvw+Hf+xtQ4vbJwJ0dBt534Zir4vYRlC FDQ1LABO/TmuiGkvMjCJfKVw+20Zrd5HvWmXoTdDmIF5rPjd3GHHQrlBU3H0GPkmtfn7 GPxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dozCW/4nG3udLwOhRUS1K5kLFfVXF4cNdQjF1vkmvlo=; b=CJdaNFuh/Sz7/ZizifAuPmsd0nHZ4xJ976NUVxTZ345wpD2x4zICY8pxVkrl4JNgkr eL/ruoX85Lv5zGCkB6pVtawU1mXR4wpyVvKZweJl/84F/Ojnfsk1ZJKsLUBU2Wh5YA8t IrKuyOYVTde/Zf1mg/qgqw/h9mX2UO1cCxcSOeZM2qEsISFB+ikmdfoL5T0hLzXWkz8n Wcq6EJ4VPMEQouBlfitFFtO7zNGs9C1pluEPRCNBe5kM7fo17svu9cvX/tm44CdfdUrj W8p0GDYbZxev6pSFsmL1JX6Pp57MpmlcyziLj3C8BheqpLtcD7c6eCHZh+cIT3F6yrQZ OTLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eTuSHohy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w25si6847670pgk.153.2022.01.21.12.07.47; Fri, 21 Jan 2022 12:07:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eTuSHohy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357606AbiASWqc (ORCPT + 99 others); Wed, 19 Jan 2022 17:46:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbiASWqb (ORCPT ); Wed, 19 Jan 2022 17:46:31 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E71CC061574; Wed, 19 Jan 2022 14:46:30 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id w26so8234698wmi.0; Wed, 19 Jan 2022 14:46:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dozCW/4nG3udLwOhRUS1K5kLFfVXF4cNdQjF1vkmvlo=; b=eTuSHohyTQB9Bmao7dqcPpa5iKgzaCjRBmINJezn9uUIsQIY4xO+7pmWpTVF4wcLIG gJPXwv1OyMMCfBpUj3UrZY4ymzGYu8uV2D+/V4rKdRa1tf2kSDeSAPHIhrbq3GEkyV/7 C3v8D1BvXLf9U8Y8NdhEF5iNRuFqvH1l5RVHHLHoyJgogkZtBpV9PDF6+AeUMZovg6/2 ruYB4kiA9sXp+gcvkbgN4aAXJbtYldRjVg3Ajg9nVpI5yw2rPc0necow6Xz3WD5D9hXi /UoIXE4A+U9vwKr8XaOIB+wRLsKWr9PzhocGZQrqTgWc4YTeI1xNTRZn+Ie5sofugWDE GFpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dozCW/4nG3udLwOhRUS1K5kLFfVXF4cNdQjF1vkmvlo=; b=EMkRNJoi+DvLifv3WOffk8U4oU1lxkgfFN8Og7IpBym96FCSBUWLK60UNskTaM4NUj 5WBao9OSpt1WV6Iv9oplzt2+aALK7U0kh5oLUCp7m02DHqiqhhjJtLIvDzAGKnUHtOvX O8FgU8CVFaXaYNw1KV2aWa/NfcvElNA9YjYZDqu/2R55TtVJgJBvY1RRREzmjUuDY+TC iqsqf+L5VZSYs6O/IlwGf56c0ookfDf4zD3Rz7Ds2yvA0vJ29aZpmeSeg2fhpTCxmxtF DrWYLQZ1mTl7qNgsllH+R8i8NQdmMCjA69gHb/i2SO+SwLcNfejNF/PR2n0asBXqRrVr hkkA== X-Gm-Message-State: AOAM531Q+V6payDEIWd/zbIdIw4HlQQIl81GkfE0m3ThV6rep1HV/ML0 aRbAa8IAVZ0hoV8OxC4k8D43EiB1/aldvg== X-Received: by 2002:a1c:4d01:: with SMTP id o1mr4298033wmh.170.1642632389084; Wed, 19 Jan 2022 14:46:29 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id t17sm1109531wrs.10.2022.01.19.14.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 14:46:28 -0800 (PST) From: Colin Ian King To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , Xinhui.Pan@amd.com, David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] drm/radeon: remove redundant assignment to reg Date: Wed, 19 Jan 2022 22:46:28 +0000 Message-Id: <20220119224628.123084-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pointer reg is being assigned a value that is not read, the exit path via label 'out' never accesses it. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/gpu/drm/radeon/radeon_object.c:570:3: warning: Value stored to 'reg' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King --- drivers/gpu/drm/radeon/radeon_object.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 56ede9d63b12..87536d205593 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -567,7 +567,6 @@ int radeon_bo_get_surface_reg(struct radeon_bo *bo) return 0; if (bo->surface_reg >= 0) { - reg = &rdev->surface_regs[bo->surface_reg]; i = bo->surface_reg; goto out; } -- 2.33.1