Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1537903pxb; Fri, 26 Feb 2021 13:30:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwX2HaJqmrWWMYrNr996E17FXNq1/9gr4tEdhDwg4OQiCGuD6m5XcYBDKKIQt+VH3FKz9E5 X-Received: by 2002:a17:906:ca02:: with SMTP id jt2mr5470809ejb.312.1614375039377; Fri, 26 Feb 2021 13:30:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614375039; cv=none; d=google.com; s=arc-20160816; b=n+ySPbP3bxawwcDNl7EOMR57IiXT15vXU+/iRIgCeuHs8ho/baN5JBpduZU60moWD1 zLXQo6SlEFO+zCgx2ULNh49RbRAp70O5lIDrZAzDqH7KNNNxe4L8EKguOE7hPk7QRuNs +UKt9dsXrNBnbH4DcNr7Ejs4yr5LyOY8P2Yurq3XIRlYIgPPrCvrkDVdsQeclaoZQHRi 4qKmstbsjrnaxL/WiaEZNHyWaEOdW1AkKIBeLtBRLgSrw19orJ7p4OO4kzJ5N1bpUQM5 3ndC4aJp4oz6YJ262QLzvg7m30v9RUzszJim1MjwHBxsOYdSqbazHJdqAk2XGotlVy7w oxvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=k0FQBH3XZRWaOEVdA/TaIzgXzrKxsUm8rwjI33W19Xo=; b=rQNpuTwIA/t1sBv2djJy7UxPRAyNI9FK/h0f0xD6aog3sAtTRcSP1F5V+th28XVfAa YM2gtCWLP/fA2vuxvPaCV6YXENGmEx/zXSUT6hNm4NCIa59bONN1LvzrCccdyiDvrY7y NJ32yKyuulczLzAos7Mk+508bdzTmbqnt8ZuRONkvJdZjadXnWLOaPxB/wYr52Z8bkOn YBpP9HUk2tTTmf4QqNZLXwrOCx0Ibbc5GXbTOEK0/4N8PGPA9pEuy5HkLeIt1V8wM0Eo LBTv4cd3Z16PfGQIsfTM9sHfJB5pvq3Txy+RxJnV+Nxy6QsrK9SfrGbyNpgEc9xLh3y8 5G5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ulH6dibl; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si6213154edk.467.2021.02.26.13.30.16; Fri, 26 Feb 2021 13:30:39 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ulH6dibl; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230282AbhBZV3f (ORCPT + 99 others); Fri, 26 Feb 2021 16:29:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230032AbhBZV30 (ORCPT ); Fri, 26 Feb 2021 16:29:26 -0500 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EBDAC06174A for ; Fri, 26 Feb 2021 13:28:46 -0800 (PST) Received: by mail-ot1-x336.google.com with SMTP id d9so10378797ote.12 for ; Fri, 26 Feb 2021 13:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k0FQBH3XZRWaOEVdA/TaIzgXzrKxsUm8rwjI33W19Xo=; b=ulH6diblgdIknIaJzStXLEnNMmRTYNNeQtO4iHIMd4VzYKb5VvExX8hjLev31N9TKm 7H/jkB0x6hbwcbBHoYcj+/Q9g4aeNgiHROw/yuQFrUzLvsTFilnXVm5YgQM6psNjAYgE oam7aoCc/pErNv0iVJF9d/Z6X1POWJ08ASKMieRCrrhiTq0e6k2HtynAcQ7iHoOhKugh XqQaOXSVUt7poktCQ3v0GWLjvV45jNunoKYLPlyM8AUaj3LKwHeo7IKWw2EbzRXbETCg ikbgwbjMtnuVp7I+tZGMmXi4LmIJD27z2Egk4CZmfjdn/Mu38p1TXBs28Yrnqr9o5Gm3 XpYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k0FQBH3XZRWaOEVdA/TaIzgXzrKxsUm8rwjI33W19Xo=; b=KlpAp9FtNFDw1V4fOnzXQGsEU2xyIpRdqMA41JJeRWE+2nukJcQ+thh6y71PIQLx7J 3sGan0hYioAR0B/IjboPgCgZh66vdhss5N/EsVeYOuZDPvJW5BTw+x6on1aJtmHJyqF+ WhgrRrrbGcl/LMsKbRwVrc+24N30mHfVIr9sZglTrsyyJ6OBoiXmirzqD05huLQ3WMs9 P1OU8u7SUOLaeVxwc93Gmd8CAmdt2ECnaVXLrVeTPy1hhnRa19TRCgVLPOkfAjZdzwdh P7Q00Xlnexi3YAOYX/gxf43rMPlJbH6g1caYCc5CzmHkhpc/Eistn+qcVmi+rf6VJMdM w4Bg== X-Gm-Message-State: AOAM5326RPTEMLHF7NvXV3Rn/7082mtJGYeS2O8hfRxJ4d23npovj0ZT mfbjZs10xRe3EmapkIsuH8Zc0idREUf2oy9k5Yg= X-Received: by 2002:a9d:760a:: with SMTP id k10mr3929555otl.23.1614374925511; Fri, 26 Feb 2021 13:28:45 -0800 (PST) MIME-Version: 1.0 References: <1614331036-110338-1-git-send-email-jiapeng.chong@linux.alibaba.com> In-Reply-To: <1614331036-110338-1-git-send-email-jiapeng.chong@linux.alibaba.com> From: Alex Deucher Date: Fri, 26 Feb 2021 16:28:34 -0500 Message-ID: Subject: Re: [PATCH] drm/amd/pm/swsmu: Remove unnecessary conversion to bool To: Jiapeng Chong Cc: "Deucher, Alexander" , Dave Airlie , LKML , Maling list - DRI developers , amd-gfx list , Christian Koenig Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 4:17 AM Jiapeng Chong wrote: > > Fix the following coccicheck warnings: > > ./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:924:47-52: > WARNING: conversion to bool not needed here. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > index af73e14..2382438 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c > @@ -921,7 +921,7 @@ static bool sienna_cichlid_is_support_fine_grained_dpm(struct smu_context *smu, > dpm_desc = &pptable->DpmDescriptor[clk_index]; > > /* 0 - Fine grained DPM, 1 - Discrete DPM */ > - return dpm_desc->SnapToDiscrete == 0 ? true : false; > + return dpm_desc->SnapToDiscrete == 0; > } > > static bool sienna_cichlid_is_od_feature_supported(struct smu_11_0_7_overdrive_table *od_table, > -- > 1.8.3.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel