Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp981829pxb; Wed, 6 Apr 2022 06:00:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRaJZG0mzCREE77Y7PRbXdNq60xqfxQVFVAXKMHdQ9d0XrZi0rbc2aI5rdN+4HtWaqd+Vl X-Received: by 2002:a17:902:c206:b0:156:ad2c:756e with SMTP id 6-20020a170902c20600b00156ad2c756emr8500394pll.63.1649250006520; Wed, 06 Apr 2022 06:00:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649250006; cv=none; d=google.com; s=arc-20160816; b=Y5ONaNqqtx+L3ojjEAy7WR+wb60zkjyCsQru7EVNjbMJ7XrKLQUFV0dXP/y31Vs3hl 5SwzKYieXFaJAvkGiBDveh2kWduzwTJE4MbqG2unPLeyJ64c1dkDkSM+akrVDf/2C4oG 5/FUmzTUOwtEDOnmwv9q7u/8YQYLhKrj275HOC+gwv1BL3bCQrnss3PUhEci2kfAEjVk baLiL96yArhABKYHUVKBySDkijxsMBb047YCqXaAlO1SGcFpN9WSJoGWhjpUgPAcJ2Ml 4Io33MRUH400YgMPB15VU2lPPTL77iBuBwH7io+cM6w9X57H9exuWaWCUeQud37dhkDV 50/g== 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=bxKqK2XNY4gRVlPJC2xJqtnMP47aAtqK7bCRdORZQrc=; b=gpW/DPjifHrUih82F8epyCnP7f4LXwEVokKPL+9SU8zw2QdCI9kblrXoKNR+pzcqP5 GMUQ/P3/W49PpnF08uOmbvZfGarxaxzZ+MVV7uteNDs+c8Lm6BJ4d060hEdGV5ZIKpu3 JUwy/yGTEPFHpEOxxfZdkoCEXVjojvqDfAZx2jMSv/LLravdX3LJ2BQWVXCNy3K+BBSN 3LAaa94+nqDeU1226PpJune24blhG/sBGgklounyH5cu6cQK2HKtJz6SXYG8uOFbcUoB KA1O/ldSSgt/kdhmvdobHC3vsf8+LQUI79QpYWYkb4uZkVp+rXaX3CZ68Fwb5YcEN90Q 6kZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pPMhHD+M; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w14-20020a637b0e000000b003989594cce7si15543561pgc.872.2022.04.06.06.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:00:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pPMhHD+M; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC359149D09; Wed, 6 Apr 2022 03:13:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1849743AbiDFCkE (ORCPT + 99 others); Tue, 5 Apr 2022 22:40:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1574552AbiDEW4c (ORCPT ); Tue, 5 Apr 2022 18:56:32 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75CA0197AC7 for ; Tue, 5 Apr 2022 14:38:23 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id d5so724747lfj.9 for ; Tue, 05 Apr 2022 14:38:23 -0700 (PDT) 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=bxKqK2XNY4gRVlPJC2xJqtnMP47aAtqK7bCRdORZQrc=; b=pPMhHD+MAeCOHNTEHA/NpfXCwZpLhzs4orOzrp/sfSfjhe/NVw9jqmSdaz70eZjqcR 5o+2PV5F7QxxcmHTa8f6dNstumF3Bgv/gf8pWeNhL92TVdFP5PDHzDOoRJk5nLuBT0nS Jd1XoFDylIGl8besXC0b/wp9t8DBqdw1LRLz1HySjABgaPBfJls6Zszkyb83sFtIXLBl x7DLWhNpP05EDwn4zDvh3/5kTeSgrs/vR5QgrL0lKRUw9/WB6jSazvA40N5k1wEL+bJi 2+PfQeE4zNpnRiCg30HJ7RKvxj6OZihDtemYYzyAROjixwHBVKJbKZ0wixHYaNKh9va7 t1gg== 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=bxKqK2XNY4gRVlPJC2xJqtnMP47aAtqK7bCRdORZQrc=; b=U9lYH06mwrFiAZGcsYaee154v5EbWZoXRGtyx+q+YVyWAfgkTqQAMSvRSVYyL2972+ av1fhLhPxh2Oa8rBat634EmLoGeI6EralTgRUJwjuWwCNoneSJYgcaCjLapQZFKljveP 38IBr1pWBApWSNuUtazE6EhETBEDlfSNnHxjhoQM8hc4euTTaw+28UOEsh2UbFnZHISO hsslbAHk4d4SXw2CQfUbx5CuIZm7Dj85VMtSIgOL+sULrxM3xTZ1fnRBx6ZWxPmu1izD krd2WO0fk9t2Vrii6vq8ajFb0yLU+diJ4vQPzkKtWeEajqtmViB76RKQGlUPY7afcNlS zGZA== X-Gm-Message-State: AOAM5309FKTpCN09j2hqngSlQssM8HYpDzaHnGu0e1sYfrtKWGQZZEUB Ng0RgPelwpwI+oSwTnL/GJqaXLY8xCiOIw== X-Received: by 2002:a05:6512:3d8e:b0:44a:3ad1:8bae with SMTP id k14-20020a0565123d8e00b0044a3ad18baemr3806975lfv.231.1649194682658; Tue, 05 Apr 2022 14:38:02 -0700 (PDT) Received: from noname.. ([2a02:2698:8c2a:226e:6d9:f5ff:fecb:a8ab]) by smtp.googlemail.com with ESMTPSA id v17-20020a2e7a11000000b0024b127cfc2bsm1033175ljc.127.2022.04.05.14.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 14:38:02 -0700 (PDT) From: Grigory Vasilyev To: Rodrigo Siqueira , Melissa Wen Cc: Grigory Vasilyev , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Guchun Chen , Joseph Greathouse , Bhaskar Chowdhury , Lee Jones , Evan Quan , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amdgpu: Unnecessary code in gfx_v7_0.c Date: Wed, 6 Apr 2022 00:37:59 +0300 Message-Id: <20220405213800.90205-1-h0tc0d3@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The code is useless and doesn't change the value. (0 << GB_ADDR_CONFIG__ROW_SIZE__SHIFT) = 0 gb_addr_config | 0 = gb_addr_config Perhaps there could be 1 instead of 0, but this does not correspond with the logic of the switch. Signed-off-by: Grigory Vasilyev --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 1cb5db17d2b9..5ed84a6467ee 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c @@ -4409,16 +4409,14 @@ static void gfx_v7_0_gpu_early_init(struct amdgpu_device *adev) /* fix up row size */ gb_addr_config &= ~GB_ADDR_CONFIG__ROW_SIZE_MASK; switch (adev->gfx.config.mem_row_size_in_kb) { - case 1: - default: - gb_addr_config |= (0 << GB_ADDR_CONFIG__ROW_SIZE__SHIFT); - break; case 2: gb_addr_config |= (1 << GB_ADDR_CONFIG__ROW_SIZE__SHIFT); break; case 4: gb_addr_config |= (2 << GB_ADDR_CONFIG__ROW_SIZE__SHIFT); break; + default: + break; } adev->gfx.config.gb_addr_config = gb_addr_config; } -- 2.35.1