Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3653586pxb; Mon, 24 Jan 2022 14:31:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZzwUULPSrWwKJFQYRQZVtB+zr+qn0T8x3aeTKXNdPqEeMkWniI/eoV7ZcLbhvI82Tucsx X-Received: by 2002:a17:90b:255:: with SMTP id fz21mr417098pjb.226.1643063487737; Mon, 24 Jan 2022 14:31:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063487; cv=none; d=google.com; s=arc-20160816; b=o2fUxktsFRJuqi9FZWKB4aMcYRhrgOXF4ostVnJ4BW1wvCrQwWknPdPfmwM9iLlOaw +OVnQOUklZ3aF8dygDgEMFV+2rbHQ65YM6vD45qLv+hRxYFMlMVpJNlCLFxwXD7WKOTp 9Mvtt7yBIjxMMHxxHu/kDYxTrLt39CzN0EvXvxCVW89iTpYTgZ2yeYIu3N2CZc5XnFzb Z0SqrANNFsGc6Gxo9hSZjM2rV9yyyXvV79WdeA/u63VTUV/l6vpMnIGuRwQ/dom0S4Ja 2ydlI8z1MgWk5AvUtAMAfpzPsSNauigOAUMp8PqoWRvQat3F2zQza9cWjuc9jxnRbADC tWhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wyMvRdYooGkNnpiPbja1/uSfdA1/U9snsdIqkkHvJEc=; b=JRGnZ+UOip+BQ0llnMiEauOKBVV6sL9aWzzmhr6cSmcNJBB3xbjLfAH0qausvAO0uD qLX3lJ5kScg5qMS2HOo9ct8UbspaIkdFJ6XszXEYEtj6jDSgZeiifbXgKbTgt1bJbfxj sVSW+uWi/E8s53noi3xQcOwC1mlLGr0I2DVSwnHEAMTfw7mCCOLsfUaiHYC0LqiCqOnx c25TZTdcPAKCmKZSF0WCYVbkGrkM6GVlCwU8qCCX+OaEZOZw1cbMpDyxENqhhbtx4PE4 op2iLrOI1NYMgGEKABv8bojZKRu7p+GAklxcLcPD5hrLqxXIVFQZbSc+xNISO0iizw2+ HsJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=htyyJ1Z3; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si505203pjf.91.2022.01.24.14.31.15; Mon, 24 Jan 2022 14:31:27 -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=@google.com header.s=20210112 header.b=htyyJ1Z3; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1587465AbiAXW20 (ORCPT + 99 others); Mon, 24 Jan 2022 17:28:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1454645AbiAXVdT (ORCPT ); Mon, 24 Jan 2022 16:33:19 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52909C075972 for ; Mon, 24 Jan 2022 12:21:22 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id u14so21341598lfo.11 for ; Mon, 24 Jan 2022 12:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wyMvRdYooGkNnpiPbja1/uSfdA1/U9snsdIqkkHvJEc=; b=htyyJ1Z3GRsmUZan58N3Prr0pEBcELIKOR7HkjpOyyQX11oHKKsVhGziUzHRAk9gAQ qKIJ1la4FQPjdeduY0TumzsXC1keATPYK+6nRTIgrBg2Yx3j+qLswnmWYNKKkUD32SGa NEUVgy1cbCWp9ftv9S/S5W24Xf77OuvIUUPVXQgqfByM1wogeIS6Un6jOyUF9MMCkpXG teWa0koFmo2WyVhH9ii5kbYSuulkh24QTq4DkaKRlSHApSrAqcmB2KzC4vQu8X9FU9gv 2EOV8xLbbtvhhc9TN8f/mQhQ6bw3lBLH/4ZukkYU7sfiq5QPCY/xyIFbbSA1hYPq/sPZ OO2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wyMvRdYooGkNnpiPbja1/uSfdA1/U9snsdIqkkHvJEc=; b=B5LU5nNDO4HuF+KKzLY2NJ20Cm2UkD2Gny+ghaP5gwu8NpOEswkHxSTFVuTAUpCApu R1MhPtKpChywxbT48Q1+6Xc3Ua7uC81V2ggp4s40gML02iOp5C07XvxSRguYOlqlwMHz dIiAPakSfI//otD2gb2ZePsrTV25r7Ebp0ro3W/iBks1h0mdRgRKGJ8b13LJKsLmRH48 VT5chSBW89G06HstWHxt3NdCP6vI19b6lg3+K4FpZQeUh2p7PBcd4+V+HSFTSqo62eGt 2dvO37gTYCbSe81bqEiPBAloOl5yxzRYk1esIfa7wMaXi22z2WuGgnvlH7+wIb21iXes ib3w== X-Gm-Message-State: AOAM530nFHRXG1lZytNBFlekI1spQ8287nDfrwkcepUXYJjuWQnshn9m lzELxtn/6kTlHhSSMxb4IqAc+44PMXxdxpzblrBkAQ== X-Received: by 2002:a19:ad02:: with SMTP id t2mr14058303lfc.82.1643055680456; Mon, 24 Jan 2022 12:21:20 -0800 (PST) MIME-Version: 1.0 References: <20220119224628.123084-1-colin.i.king@gmail.com> In-Reply-To: <20220119224628.123084-1-colin.i.king@gmail.com> From: Nick Desaulniers Date: Mon, 24 Jan 2022 12:21:07 -0800 Message-ID: Subject: Re: [PATCH] drm/radeon: remove redundant assignment to reg To: Colin Ian King Cc: Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , Xinhui.Pan@amd.com, David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 19, 2022 at 2:46 PM Colin Ian King wrote: > > 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 Thanks for the patch! Reviewed-by: Nick Desaulniers > --- > 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 > > -- Thanks, ~Nick Desaulniers