From patchwork Sun Jan 15 07:17:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 43812 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp633759wrn; Sun, 15 Jan 2023 00:00:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXudOIsUzectUM2CdK1TUND0uzxlcuJsi747PE/WnDhPfqx+w34ZHu2RE3KY9Co7DlluS0H3 X-Received: by 2002:a17:903:428b:b0:192:feeb:b06d with SMTP id ju11-20020a170903428b00b00192feebb06dmr15306004plb.62.1673769633443; Sun, 15 Jan 2023 00:00:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673769633; cv=none; d=google.com; s=arc-20160816; b=zA8qqEWhP4or19qU8qZuQoe8aG+F2oVwKq7tZND4KbVW2wtN38uv1F1//EbxIX9d/m rTnvXR2Ai8m4tuKyfN9v7JGw5swVnc+m1fsCcz5pcwk/dtN1st8Kno/iRq2T7SB9Ndca 1FXFg5/so8sbsflRgHmxW1ffoTEOG59TD9RArlUFSYf2B8mkm5UwDvI3XqMVnuReVD9e ROUlEn3KRgXBkKahJHzWFpyBmZEe27uORsKWniQglHaoZSeRp8cBRmE4LZALRH4EQ7P3 WZELsnJE2dhhSbr0Wvux0e1jy38IcG8xzduCyRq0Kspm839mSX1r0jmcQF51ItrGYp+I ZKWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Pe58ubs7GGAYQVHhbFFWr6O43JaJeBkNJTINqBJRbeY=; b=ov7XfKRVBv94gHgUPG36b0s+tM/U3RsVmCCvyN9kJ7Er3eeHwj6VTRIvAB8B6s7J1O 6UWLv3ISxGx3cLX+4IuYGZHFePR5V/6uPnPQlp5ht3SdJqr2rxkTop1PXrUVn/tUpAui TQisc81sFmVCCsayZyDmb0ZLHBmG+EDbWCtwF1QYYcfj9fEr9JB8ZlhwomhFAjkou+b1 Uv/F3ZAlwWjYsGuu03Z5N7ZBFcuRt4mIHoyuAGVE1neJM6dug0pC73Gj62uR700fqgJo rB8Aq8y6cv5tgtLA54e0/9Huzo0FSPjDeeJMPimcSnEBPi8R908Lyez3XuzLM1tUrXjz w0xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=VQOO7un7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o10-20020a170902d4ca00b00186e8c3782esi3277557plg.386.2023.01.15.00.00.21; Sun, 15 Jan 2023 00:00:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=VQOO7un7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231130AbjAOHTj (ORCPT + 99 others); Sun, 15 Jan 2023 02:19:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230088AbjAOHSZ (ORCPT ); Sun, 15 Jan 2023 02:18:25 -0500 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 770A0C14A for ; Sat, 14 Jan 2023 23:17:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673767061; bh=k7u5aS66zy2fmuck3/VN5zNUw4xK14B+PFhiVV5QSGQ=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=VQOO7un7PPsAFbAr7KLG2+tIkjqC7C0QcZmQbjuHusQ18C1pFFrQHmd+RKrWKh4NP javzOLx2ZdrFw/pEEx9HxL7fj4GGE7To2jNQxQlDX3Z1kEbEMnlLSzq/he5g09DJpZ eqaHh0L3aPZisPBRejM6T4OxJQzFQ4PHneoXf/Sk= Received: by b-5.in.mailobj.net [192.168.90.15] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sun, 15 Jan 2023 08:17:41 +0100 (CET) X-EA-Auth: gJML6+RJH0TCGtjLi2DcR+NBXo7OT6FysMxuzOTd0N300DEI59IhkImS0QOaE82bWbmULJnwFnOdmU0aCdOgs6ZHYd2Kcspi Date: Sun, 15 Jan 2023 12:47:37 +0530 From: Deepak R Varma To: Evan Quan , Alex Deucher , Christian =?iso-8859-1?q?K=F6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar Subject: [PATCH 3/3] drm/amd/pm/powerplay/smumgr/ci: use bitwise or for bitmasks addition Message-ID: <6be220cf26f5416dc7e3dbd13ad42f6e7353d960.1673766696.git.drv@mailo.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755074667439567296?= X-GMAIL-MSGID: =?utf-8?q?1755074667439567296?= For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c index 5ca3c422f7d4..a164d12b88ad 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c @@ -2203,7 +2203,7 @@ static int ci_program_mem_timing_parameters(struct pp_hwmgr *hwmgr) struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); if (data->need_update_smu7_dpm_table & - (DPMTABLE_OD_UPDATE_SCLK + DPMTABLE_OD_UPDATE_MCLK)) + (DPMTABLE_OD_UPDATE_SCLK | DPMTABLE_OD_UPDATE_MCLK)) return ci_program_memory_timing_parameters(hwmgr); return 0;