Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2976767pxt; Mon, 9 Aug 2021 13:37:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaj7ix7TL/eNXf72WDnYcL1UpcItDWJ8p/4YnkRgpKAvqKEulqR7we6khr6L27hkAfSGcd X-Received: by 2002:a05:6402:5214:: with SMTP id s20mr174667edd.374.1628541454500; Mon, 09 Aug 2021 13:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628541454; cv=none; d=google.com; s=arc-20160816; b=0g14IkmeDTC7ZQBxOtAo6DYRprwhm6OuVwmVUSDtyqALydwtjeqTX5TAHA7MMcQIWf im5CaQ8CpdjwWcxZ27e87he0Cvr6ZqngFYJuiELrEBM/Xc6LnVgAPKcgCXCRSRj8llOV lRe73Ib3m05wrZOCzUMuaw3s4M1Tlc8bzTx3eQL4GQ5BWACW5PvVdrFYvPdAsdudZcak bSpCjVV6YjrhesTwMcmaWpbNV6M5HGJb59QNSL0SU7JLi/3VUV2Ru3SEERpo8LjHMWB2 rnliM0KubPpJVP/ZuQe0bHlBc/aArf8QiNXYYk8LyxpDFFY1HH65uY7WGoQdrr30uRb+ kU8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=4mNkfoQ58OXkFxY5lXT0JLBnZKMBlmPjenNWxHTzG5U=; b=YcEP/K+kQR3BVZNxAw6i60Z7DLiRue09GnxDegcCMHrtZ8WGr855ltruEWe8bBFOyM bwArH1mOXOMYLOcCicmeHt98Cz3nX65Ff8TUwc/hwZC10alPISyl72F0vAh92/dNrH5R 5Mzw+nG4XjP2xIDbZtxWO2Ygsic58I4TmZ4zsZ0cuSFXgWn282SekSH2CtVGs6EOkpX5 L0f6X3sXSG2xSucxntqpE0TZ2oRv8fZfMYKlcAvEQWV/OXgf1hqiqU9zzmC6V5Gg51Yi ZVLywZExdPI9w5UDD3+9dJAuAWy3WhGkzX0gEJWNu5UHNl5Y7PUHfwBL59bM9PsvfKpf pkcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HDi1+VGi; 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 s1si17353708ejv.457.2021.08.09.13.37.10; Mon, 09 Aug 2021 13:37:34 -0700 (PDT) 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=HDi1+VGi; 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 S235124AbhHIS2P (ORCPT + 99 others); Mon, 9 Aug 2021 14:28:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232130AbhHIS2N (ORCPT ); Mon, 9 Aug 2021 14:28:13 -0400 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60521C0613D3 for ; Mon, 9 Aug 2021 11:27:52 -0700 (PDT) Received: by mail-oi1-x230.google.com with SMTP id u10so24884372oiw.4 for ; Mon, 09 Aug 2021 11:27:52 -0700 (PDT) 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:content-transfer-encoding; bh=4mNkfoQ58OXkFxY5lXT0JLBnZKMBlmPjenNWxHTzG5U=; b=HDi1+VGiQq4I0uS40zFvgbSs8RSxYe0sbWq3bJu/Bh/F5NZONXb8z9Wo2hupnakHQv A4Tct8GU+hqFrZD3cR9w+n/3P8+nk9a9imS4Uq4XlePYvIckSXTs9eZ2+zHtMcqy3sQA cpIGgkvpw8Y5C6el2nlFYfCHpg/v4OE97spIvpsgKawGEp49hGU3fzApUTbdUHCkP5Qw 5DKUf47+LEbRqLCFcF5Gwi6KJvdDXCPrVTreYbedsJ1xmDgFidKujl/SoLGp08gDYpql sWaH+3gWW1XVj6QJloLbVWkKS91lpuaZk0OLQ98yNCTp+B3EFEdU/iFQ8sWjdkLbC+4U zgzA== 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:content-transfer-encoding; bh=4mNkfoQ58OXkFxY5lXT0JLBnZKMBlmPjenNWxHTzG5U=; b=gKhjJGsFhfhLZC/OF5+h4ntMhaMaxsGPnYV7vsEuSEzmnOy2pnngzb2365f96hYWHG xqCPVR/XZbhXgUkGvodEWJvhAqelzT7CfVmP7msqR9gizs6+9qytAHC7Qq7YQxNPqOyw zP5MWy2MhVM9ilox2x5DRVWsBn+l/3FRnA8GlJNUjn6IGhAkz0LHDwIipumoOuKU5C63 RxFCmzMSB2WUS80qykzoEjtbK+lYGJEYkhpbe7vrD70ZS9psSulnvCPY2brW1XbNJMpG +Zc6YLfzlzpOV7/tix/Hc9k7dk1jSW+QMe4xZMVZtSQsJQ8/+aykO3A7p6aL8iN2ZLeU mn8w== X-Gm-Message-State: AOAM533FAKj+T18/bv7fELKukQw0x+8COfudOC8aMMFTB0/wRx7/mvRO E69ht0/NpNd5xabYoROnVKywlnfTTKvIoDK+2vQ= X-Received: by 2002:a05:6808:1390:: with SMTP id c16mr16992375oiw.123.1628533671832; Mon, 09 Aug 2021 11:27:51 -0700 (PDT) MIME-Version: 1.0 References: <20210809025208.10182-1-rdunlap@infradead.org> In-Reply-To: <20210809025208.10182-1-rdunlap@infradead.org> From: Alex Deucher Date: Mon, 9 Aug 2021 14:27:40 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: use do-while-0 for DC_TRACE_LEVEL_MESSAGE() To: Randy Dunlap Cc: LKML , Wyatt Wood , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Harry Wentland , Leo Li , amd-gfx list , Maling list - DRI developers , David Airlie , Daniel Vetter Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 8, 2021 at 10:52 PM Randy Dunlap wrote: > > Building with W=3D1 complains about an empty 'else' statement, so use the > usual do-nothing-while-0 loop to quieten this warning. > > ../drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:113:53: warnin= g: suggest braces around empty body in an 'else' statement [-Wempty-body] > 113 | *state, retry_count); > > Fixes: b30eda8d416c ("drm/amd/display: Add ETW log to dmub_psr_get_state"= ) > Signed-off-by: Randy Dunlap > Cc: Wyatt Wood > Cc: Alex Deucher > Cc: Christian K=C3=B6nig > Cc: "Pan, Xinhui" > Cc: Harry Wentland > Cc: Leo Li > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Cc: David Airlie > Cc: Daniel Vetter Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- linux-next-20210806.orig/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.= c > +++ linux-next-20210806/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c > @@ -29,7 +29,7 @@ > #include "dmub/dmub_srv.h" > #include "core_types.h" > > -#define DC_TRACE_LEVEL_MESSAGE(...) /* do nothing */ > +#define DC_TRACE_LEVEL_MESSAGE(...) do {} while (0) /* do nothing */ > > #define MAX_PIPES 6 >