Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4303993ybe; Mon, 9 Sep 2019 07:24:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4ASKPy1oMT4Yd7Tj6cnMya0MEZxR9J9D9AkboJWUvtUDsEpzUrMci8wbg5Ppqf7qTjdac X-Received: by 2002:a50:b501:: with SMTP id y1mr24521133edd.167.1568039079595; Mon, 09 Sep 2019 07:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568039079; cv=none; d=google.com; s=arc-20160816; b=lHF5FU0phfG3aQSSoBUDwdmjKG69Bc8eeGWfyEYUBmFBErcZIreo51x5zprTurq1qg 484AB+LQKnggN9YMxDZeHNB6cMChEgXTdatOzmD+yjYrVXD0r6LL1v3IuTYxGcBNPBTz sc/t1I1oz0nR/p2s6YDml1uqx8e4/qreLH9syGyMw5MGU8rq1X/M8H4S73ScQ7u6x+Pt VsNxW32ie4TAcWhbQiHtTvmifkhYl87i4KgFFxQKnObJHV2wU45pc0cYLo9PxEJmRK7r GpBJs+oa3E1bxEZK0lww57j1V3Z6fIV333shiYWEWKY4dJII8vLMG8SN01Q9LWOORak6 LGgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=e7eA4TFiax+IpWz4ZBj8yfhtlvkgl3W+E1T6Ih3BFts=; b=eYDdsA9h3W4h2lYY1EtE2JlBj4MfG+f6jfdahjX3hWFAQtSsKA4fdg1tHMqKF+JD3+ kMT3PNhMhh2/glaPzd+nvFXfDtogCpDZyqCyeHhu9PPWGDPRIXmSPsMh9SqTkfm4iemH RlzjP2QsIzVrJtfRIE/0CdPptZmioHcgxuZdi+cNByrlwpLKUhiF6au2Q0jYJ1LBn3y0 3726GKjnBCznqQTir3MtD66wE1Sa4yCBf+YuSfkdewxIlQqeZYXZIgpnzP0D672PDqbs 9dpkEhc56eQdDJDEbWJNJfTykluxC9g6DRCLvxYWmLNtSmLoeTN0IOWKmhC41SRNBMk2 medg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KPePtxne; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1si7414003eja.25.2019.09.09.07.24.15; Mon, 09 Sep 2019 07:24:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KPePtxne; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726573AbfIIEbz (ORCPT + 99 others); Mon, 9 Sep 2019 00:31:55 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34429 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbfIIEbz (ORCPT ); Mon, 9 Sep 2019 00:31:55 -0400 Received: by mail-pl1-f194.google.com with SMTP id d3so5996477plr.1 for ; Sun, 08 Sep 2019 21:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=e7eA4TFiax+IpWz4ZBj8yfhtlvkgl3W+E1T6Ih3BFts=; b=KPePtxneizbd2oR42TZs5GjLHclye/D8S+i23XA0Fj8s3hqwGfvGHBirF5uxu5j9gW a6TGX1XFQbmS4Mvqij4vwJ0fRRFfFQ4sr6acc2omLXGYal4NooqdstYDlrx/XQ3i4eZh IKjudpm687JAlftFhifPgIiFXgj9ru1aAHuL2TcnkoQaaca5OyuHIrAPZZ0gDez3+v3A X709lmx5toLrLuhyxbwzKvbrKSZNtZQcye4sNriZsU6jau8/jaeXmJFy3uIkWBv+Sjp/ kjSCwAdgntqhUgsLuAG6ssKq6012TPEUwwMRGV4Hn0iz1g3w9y8gYEk4GBeIbAK6cPH6 nuTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=e7eA4TFiax+IpWz4ZBj8yfhtlvkgl3W+E1T6Ih3BFts=; b=p9gHPW/5pf/UatkrLgoHU102p1sPySURrE2NjPO74e3549oHSq905Gq7DbgZ2iRkbr h9euTU4/A31YFdIjSlu9okuuIPTvKbPldNO9m7xH66Rhtptbv0XZrZQezJOffJssBFA0 HG1B1+AG8hUr1i6bJRfNYa1I0hi1W6r/mrbYKdEzy0QZL3S0FD2icDX4SMbkkRsOSSWP 3KSshsAEUdZMFrTkQgmflPV58V5lbJxKQ/MEg1KELsdiMzqXPqlIA1ZKsevHFMx79yfB Pzsx/fDNchJE8TTbPw2nrXF+NO5jYPgLCn39wqgATVj3rpzj4HY/S6tDW44pTW8VRzhw bE3Q== X-Gm-Message-State: APjAAAXpfD4fTf3RRBj2xTi442pK692FfLwrAglQgnmYfbbQqqKs7boI RXN0o8NgljVeOupnIK8U2W4= X-Received: by 2002:a17:902:a618:: with SMTP id u24mr20696843plq.342.1568003514746; Sun, 08 Sep 2019 21:31:54 -0700 (PDT) Received: from LGEARND20B15 ([27.122.242.75]) by smtp.gmail.com with ESMTPSA id x8sm13449170pfn.106.2019.09.08.21.31.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Sep 2019 21:31:54 -0700 (PDT) Date: Mon, 9 Sep 2019 13:31:48 +0900 From: Austin Kim To: alexander.deucher@amd.com, airlied@linux.ie, daniel@ffwll.ch Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, christian.koenig@amd.com, David1.Zhou@amd.com Subject: [PATCH] drm/amd/powerplay: Remove unnecessary comparison statement Message-ID: <20190909043148.GA112744@LGEARND20B15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org size contain non-negative value since it is declared as uint32_t. So below statement is always false. if (size < 0) Remove unnecessary comparison. Signed-off-by: Austin Kim --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c index 12c0e46..3c7c68e 100644 --- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c @@ -1134,9 +1134,6 @@ static int navi10_set_power_profile_mode(struct smu_context *smu, long *input, u } if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_CUSTOM) { - if (size < 0) - return -EINVAL; - ret = smu_update_table(smu, SMU_TABLE_ACTIVITY_MONITOR_COEFF, WORKLOAD_PPLIB_CUSTOM_BIT, (void *)(&activity_monitor), false); -- 2.6.2