Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1480400rdd; Wed, 10 Jan 2024 23:45:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSXYA2km46+y/Aj8iMmhnz1HEQNXEU/D2xuAt4Yy/qaNnolzVJ2M4Br76dyJuqxeWr4ZQA X-Received: by 2002:a05:6358:2917:b0:175:a7e5:6ae7 with SMTP id y23-20020a056358291700b00175a7e56ae7mr952990rwb.10.1704959136801; Wed, 10 Jan 2024 23:45:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704959136; cv=none; d=google.com; s=arc-20160816; b=WQgsedqhL5FiMPFiArVWjJT6u3natFyapZ2qAOaYrV18PbRBKZpdx/r0egk9+pWgSN oe44ER8ELTY2SgyT5obUsY6iLVBm7gvu3YfBkAN5tlrT0aZ8No3NmYiBtIdnI7XWiZVN aauRAdOLO7yT5RGR/PVBX8AlSh4n2tTm17eSCaWzSBhvYoh8aMX0W3KwVwPiKTiDeyHr tHVyyB5w4m2ggNrltqyTLof01DzFeYLnnBzfmJb3qstADEiUS5+SQLJWxFwUbtHcU8a3 eoAGUcaWLaegEQJXYTJ2iM5Z7Sk/2KlX6+MOIkBH5ZZ6y9EFovsJwocJQpqdojFxajPD 2QsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=57+782vKmtQVIMhocgzTgERrVfKoYz+T2Ea2sdZaNjA=; fh=UUD9beM69Au7Qwz6m9wyKdgHdaSGHRPChCEGEbftc6w=; b=A0Y9uYhRf74nG8XtvyIuma8MB+/JYyLv2Kxr6Wkojh7igAccwj0wDLPc45eKznYKQh bHE6Gz6hiGc2ekPCi7CUdDmHRuw1skcG6Z+GpNf1vZQ16n7iVkyw/tGr4pOqNZBEIfl6 gwJJr4CeNsCY6JN2WmRcm09Gr0w6JMpBatlrGjnUlYFaiidREfvm/f5SOCwLj3kkfM71 6OswgHrFaqZtWjXa4r9PX7unDUQZfkIIyX+h5T8HrMGcXEL7ekSCJEekVCTinCZQmdnH bv8DdjqYj1Hpc+yeT3+lTQJU4RL6MNp83LwQ3oEoiDoYtohcRvGgKoXyNT2TM9eGRSyX iasA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=hbImOb54; spf=pass (google.com: domain of linux-kernel+bounces-23162-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id gm15-20020a17090b100f00b0028c4363dac8si578871pjb.130.2024.01.10.23.45.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 23:45:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23162-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=hbImOb54; spf=pass (google.com: domain of linux-kernel+bounces-23162-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EDDED2813F6 for ; Thu, 11 Jan 2024 07:44:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 524CDDDB8; Thu, 11 Jan 2024 07:44:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="hbImOb54" Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.4]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B731FDDA6 for ; Thu, 11 Jan 2024 07:44:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=57+782vKmtQVIMhocg zTgERrVfKoYz+T2Ea2sdZaNjA=; b=hbImOb544Rm+1F2maG9xh08RwkxpTo9U55 YrV21SRg05smP6fW8HNGcDoKMdGwHL4mUhY1lclrGVtT0sFYNL6ztqCjExdSoQsH LQTCyCSvmmlMkyEgiXfigKAuYTudnx+j1MUegV7fJuFwtr8D4MJEhAFmTVQygBP1 cPwrwvKcM= Received: from localhost.localdomain (unknown [182.148.14.173]) by gzga-smtp-mta-g0-2 (Coremail) with SMTP id _____wDnr5NfnJ9lIN+SAA--.21184S2; Thu, 11 Jan 2024 15:44:32 +0800 (CST) From: GuoHua Chen To: daniel@ffwll.ch, Xinhui.Pan@amd.com, airlied@gmail.com, christian.koenig@amd.com, alexander.deucher@amd.com Cc: linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, GuoHua Chen Subject: [PATCH] drm/radeon/dpm: Clean up errors in sumo_dpm.c Date: Thu, 11 Jan 2024 07:44:30 +0000 Message-Id: <20240111074430.10835-1-chenguohua_716@163.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID:_____wDnr5NfnJ9lIN+SAA--.21184S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxXFWUXr18WF4fGFyDKr4rKrg_yoW5Xw15pr W0yFsYya4Fq340yrWSyFn8JFyUt34UtFW0krWDKFs7ua1DAr1DZF9Yyw45Wry0yFW0gF9x XryIgrW0vry3A37anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UFdgAUUUUU= X-CM-SenderInfo: xfkh0w5xrk3tbbxrlqqrwthudrp/xtbBEhli1mVOBk6xsAABsc Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Fix the following errors reported by checkpatch: ERROR: that open brace { should be on the previous line ERROR: space prohibited before that close parenthesis ')' ERROR: spaces required around that '?' (ctx:VxW) Signed-off-by: GuoHua Chen --- drivers/gpu/drm/radeon/sumo_dpm.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/sumo_dpm.c b/drivers/gpu/drm/radeon/sumo_dpm.c index d49c145db437..21d27e6235f3 100644 --- a/drivers/gpu/drm/radeon/sumo_dpm.c +++ b/drivers/gpu/drm/radeon/sumo_dpm.c @@ -33,8 +33,7 @@ #define SUMO_MINIMUM_ENGINE_CLOCK 800 #define BOOST_DPM_LEVEL 7 -static const u32 sumo_utc[SUMO_PM_NUMBER_OF_TC] = -{ +static const u32 sumo_utc[SUMO_PM_NUMBER_OF_TC] = { SUMO_UTC_DFLT_00, SUMO_UTC_DFLT_01, SUMO_UTC_DFLT_02, @@ -52,8 +51,7 @@ static const u32 sumo_utc[SUMO_PM_NUMBER_OF_TC] = SUMO_UTC_DFLT_14, }; -static const u32 sumo_dtc[SUMO_PM_NUMBER_OF_TC] = -{ +static const u32 sumo_dtc[SUMO_PM_NUMBER_OF_TC] = { SUMO_DTC_DFLT_00, SUMO_DTC_DFLT_01, SUMO_DTC_DFLT_02, @@ -109,11 +107,11 @@ static void sumo_mg_clockgating_enable(struct radeon_device *rdev, bool enable) local1 = RREG32(CG_CGTT_LOCAL_1); if (enable) { - WREG32(CG_CGTT_LOCAL_0, (0 & CGCG_CGTT_LOCAL0_MASK) | (local0 & ~CGCG_CGTT_LOCAL0_MASK) ); - WREG32(CG_CGTT_LOCAL_1, (0 & CGCG_CGTT_LOCAL1_MASK) | (local1 & ~CGCG_CGTT_LOCAL1_MASK) ); + WREG32(CG_CGTT_LOCAL_0, (0 & CGCG_CGTT_LOCAL0_MASK) | (local0 & ~CGCG_CGTT_LOCAL0_MASK)); + WREG32(CG_CGTT_LOCAL_1, (0 & CGCG_CGTT_LOCAL1_MASK) | (local1 & ~CGCG_CGTT_LOCAL1_MASK)); } else { - WREG32(CG_CGTT_LOCAL_0, (0xFFFFFFFF & CGCG_CGTT_LOCAL0_MASK) | (local0 & ~CGCG_CGTT_LOCAL0_MASK) ); - WREG32(CG_CGTT_LOCAL_1, (0xFFFFCFFF & CGCG_CGTT_LOCAL1_MASK) | (local1 & ~CGCG_CGTT_LOCAL1_MASK) ); + WREG32(CG_CGTT_LOCAL_0, (0xFFFFFFFF & CGCG_CGTT_LOCAL0_MASK) | (local0 & ~CGCG_CGTT_LOCAL0_MASK)); + WREG32(CG_CGTT_LOCAL_1, (0xFFFFCFFF & CGCG_CGTT_LOCAL1_MASK) | (local1 & ~CGCG_CGTT_LOCAL1_MASK)); } } @@ -702,9 +700,9 @@ static void sumo_post_notify_alt_vddnb_change(struct radeon_device *rdev, u32 nbps1_new = 0; if (old_ps != NULL) - nbps1_old = (old_ps->flags & SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE)? 1 : 0; + nbps1_old = (old_ps->flags & SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE) ? 1 : 0; - nbps1_new = (new_ps->flags & SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE)? 1 : 0; + nbps1_new = (new_ps->flags & SUMO_POWERSTATE_FLAGS_FORCE_NBPS1_STATE) ? 1 : 0; if (nbps1_old == 0 && nbps1_new == 1) sumo_smu_notify_alt_vddnb_change(rdev, 1, 1); -- 2.17.1