Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1112363pxb; Fri, 22 Jan 2021 07:27:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJztkrhfx12xpqz3S2mq4NTaij4/GNAVaZyZnl3xEVLlYypy2hnhmgX5X75RjtXZK7LrNiMO X-Received: by 2002:a17:906:1719:: with SMTP id c25mr3423737eje.251.1611329262684; Fri, 22 Jan 2021 07:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611329262; cv=none; d=google.com; s=arc-20160816; b=bompsAsH+xD8R4PsfNE8v/nDjo7v1bUvAfGUMGct4cL4MSsLLLq66ASUdHt4qkIo/x b6LXUqBBsaYKMHVL5Zihsqrd1W33j6zyOkXhoK9aQbxXwJXvH0WLExI96KP/ViuqyHY6 eTDRu46cz/oWpsPGLAsa/m5v7/nCMaetVVoxBsusG0ang/YQLlgC93XxOElxl8xHuW19 5SpJJsuvoDlbYMPfkc215EzQ0Obm7E351IfSloTQYIC+sPZ0NXEZKL+4jw/jlXHLb5Fg fn5STkj9IrM1jcXINxIXPhpPm+X+JKE5hfSOK8lokd7QqgTKNn9OgO17LqvfkbrkXVYb NrNw== 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; bh=Jf6n3DsoXVVcVocxCYqq1sO3ZDxVz7ewrnQFjyK60OU=; b=xtYN4W6865/6VviSTyoAK3XJXzFtohYdIdlUDde89VzFPKBBQVygRxxrsTG0E48qVZ sZDGrTcBfNmsWUttMw3DT/6nZjvjqUdUNEd0IBgwoEi4TgGS/7OQ0j5PNGQLAM9sppuO ZLfAmPSYk8RY2Eaay6uNSqXYjaYKzrVvNoZtc1cdk+OXJ77W66Bf9CK7I4zKLn6JyaIT Cq5RTPL9ulTP7nfmQ7qrL6LZpe6wKpQPtvt7r/pwjyR+prVN0jl8o6t0uEOt7VwU70l8 4P/aRS4IekTvN0rBV5wpCdTdkASyeNZMgAEv15Fb8pxVugyC/6vYycEqLpJgzqq4qM10 qwbQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b24si3662767edx.243.2021.01.22.07.27.18; Fri, 22 Jan 2021 07:27:42 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728697AbhAVP00 (ORCPT + 99 others); Fri, 22 Jan 2021 10:26:26 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:44904 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729087AbhAVPBK (ORCPT ); Fri, 22 Jan 2021 10:01:10 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l2xvC-0007un-JU; Fri, 22 Jan 2021 15:00:22 +0000 From: Colin King To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , Huang Rui , Aaron Liu , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] drm/amdgpu: Fix masking binary not operator on two mask operations Date: Fri, 22 Jan 2021 15:00:22 +0000 Message-Id: <20210122150022.209454-1-colin.king@canonical.com> X-Mailer: git-send-email 2.29.2 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 From: Colin Ian King Currently the ! operator is incorrectly being used to flip bits on mask values. Fix this by using the bit-wise ~ operator instead. Addresses-Coverity: ("Logical vs. bitwise operator") Fixes: 3c9a7b7d6e75 ("drm/amdgpu: update mmhub mgcg&ls for mmhub_v2_3") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c index 1961745e89c7..ab9be5ad5a5f 100644 --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c @@ -531,12 +531,12 @@ mmhub_v2_3_update_medium_grain_light_sleep(struct amdgpu_device *adev, if (enable && (adev->cg_flags & AMD_CG_SUPPORT_MC_LS)) { data &= ~MM_ATC_L2_CGTT_CLK_CTRL__MGLS_OVERRIDE_MASK; - data1 &= !(DAGB0_WR_CGTT_CLK_CTRL__LS_OVERRIDE_MASK | + data1 &= ~(DAGB0_WR_CGTT_CLK_CTRL__LS_OVERRIDE_MASK | DAGB0_WR_CGTT_CLK_CTRL__LS_OVERRIDE_WRITE_MASK | DAGB0_WR_CGTT_CLK_CTRL__LS_OVERRIDE_READ_MASK | DAGB0_WR_CGTT_CLK_CTRL__LS_OVERRIDE_RETURN_MASK | DAGB0_WR_CGTT_CLK_CTRL__LS_OVERRIDE_REGISTER_MASK); - data2 &= !(DAGB0_RD_CGTT_CLK_CTRL__LS_OVERRIDE_MASK | + data2 &= ~(DAGB0_RD_CGTT_CLK_CTRL__LS_OVERRIDE_MASK | DAGB0_RD_CGTT_CLK_CTRL__LS_OVERRIDE_WRITE_MASK | DAGB0_RD_CGTT_CLK_CTRL__LS_OVERRIDE_READ_MASK | DAGB0_RD_CGTT_CLK_CTRL__LS_OVERRIDE_RETURN_MASK | -- 2.29.2