Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13976356pxu; Mon, 4 Jan 2021 09:26:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxp6j8DkUNSOPbaa5EwSVsG8J7ru2GJnUvdHP9Lscx9YxryC3QI9TM44qQ4oYJdUjgNR9DW X-Received: by 2002:a17:906:254b:: with SMTP id j11mr67803007ejb.326.1609781194616; Mon, 04 Jan 2021 09:26:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609781194; cv=none; d=google.com; s=arc-20160816; b=OV/d26CIaaFdrNhmLiLog+mtBFk2xlOIsprjb8ankE+Q51QNUFoJ+1+LoqMGM93QAY 1j4pwI5jrCEh3/GZe+qtdVpItTomLkLPhlU3WGvB7FZChDn5thr5udghS1tNLBEYRax4 x0oauVDS57igoTUY/VWxyFtJlimU1Dpm49z5Pzb84GB9s9KjQi++8nbNOXRW9yU7hkMo aebJRmkpRlV35EBBCYcSs/Rq45P4n+e1GES2yg5vUL2CGCoiAcF4RDngeGiWLGmmKE1b lGJYUOjLNXlIjFQYwPUhPVeJcYGuAab9jqfn91uJ/O6LjA9fSxMKZqxZ9QZ3FUF1Sbln +cEw== 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=+t5f9rj+zFO163yFTzAFQCz1fqjzf9FIqP0MEvWgYU0=; b=RV6gQb4ZcLEo0eqAvnENFcrnLIwB+4JtAjHy4j/4VGb6c6QDCrzZVUFd3qJQQRZPzo JvGKnwrL8o3ONV4II587FqCvFaTl/MJhXE+wiEP8L6/qVTUAgWCnE5Bw0cmlk5gyJ6aP W3aWvjJGoSJEimaLjekdZ1PBOZgz6yWyxDWrqRcYxjz6GaczCiGLVdPLzvJ77RrbmKGv oBBCT3oP8Qhl2EjYgcg27VGe1ja+qJTNkbLmzQ+38S0+mtraIvPzr6afPP7BfgbTbtav Pp7FXsNxVi3KcEkf+SL8maJIPxRJaISTfK8PxjYFBcAa0NrMBEFDY9pHdNK66tFCFWlF Cyow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XTen9sP8; 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 d20si27613191eds.14.2021.01.04.09.26.11; Mon, 04 Jan 2021 09:26:34 -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=XTen9sP8; 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 S1727529AbhADRZA (ORCPT + 99 others); Mon, 4 Jan 2021 12:25:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725840AbhADRZA (ORCPT ); Mon, 4 Jan 2021 12:25:00 -0500 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA139C061793 for ; Mon, 4 Jan 2021 09:24:19 -0800 (PST) Received: by mail-oi1-x236.google.com with SMTP id 9so32920895oiq.3 for ; Mon, 04 Jan 2021 09:24:19 -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:content-transfer-encoding; bh=+t5f9rj+zFO163yFTzAFQCz1fqjzf9FIqP0MEvWgYU0=; b=XTen9sP8H7Egth4yZB1CyiTAz15KI1TshTmBmrB7azD0EP7T/3IDYAXD3eZ/EB4BUa EPeFkVmMz53KBerMnpUbuXV3qz7XkcDptBzJ3hKycBHI6bbwdPdlA4Vp6EnqtgLwrGzw Ywkg0iSkhnJ0B9DgvmYJCnU4Kld8ao1E+P0UpwVYhtB0JJsoXVUuKTWkzcwLuXXzuUvs z14kaoqRE7vv55Jf0GB323yUDO9w5ZPegyFdjUOhZ1iiRzxosMXWvbO0xt29H3EtylIm dRQaubyhBw8BS3LIXCeyKLlV/RHwqVJyOkkI5TdixgvPEFKn8EswRn/A1Gh6qt3HedSK 1TZw== 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=+t5f9rj+zFO163yFTzAFQCz1fqjzf9FIqP0MEvWgYU0=; b=bWSKu/OFF51ClOhBGKVvIjVtrqcneAR8hd7gYl7/SozJ5wLvjrf0OOhUS80Te1wmfp kNdTVntK5kduAu52fqaQD1JaafZlcZQ5Id1KuDqfAp1tbqFlB5vCZw+lHIVvmfOx7Tp8 Akl/yAqB/qGBLY5DW/x9CiQ1O84uXrRWorRxwu7YnB7tbFKgs8Iip2AWTpQ2ef4jtXp9 a+8vV8axmx/KxMzpvrFJBTGQ0okBpLYD2GKpFMiYHS3jFmDVzX95gRyvwz99Qcjw7oBv omb6nA+frJCpQFPZacycnHvcNzsnmREGtBTcdodR6Zb5POu2h+bhtPH/KQjX9+FHNerq ebhA== X-Gm-Message-State: AOAM532OH1cVFrR5/2hPauauhYzsx7fyZkt40yhH3ql51Oxn7c5MuFa5 bbuOH0wL0phezHPV1vJdbBUV9OeqjCQjSfAad2s= X-Received: by 2002:a54:4083:: with SMTP id i3mr18358315oii.120.1609781059268; Mon, 04 Jan 2021 09:24:19 -0800 (PST) MIME-Version: 1.0 References: <20210103140248.3889757-1-arnd@kernel.org> In-Reply-To: From: Alex Deucher Date: Mon, 4 Jan 2021 12:24:08 -0500 Message-ID: Subject: Re: [PATCH] drm/amd/display: Fix unused variable warning To: "Lin, Wayne" Cc: Arnd Bergmann , "Wentland, Harry" , "Li, Sun peng (Leo)" , "Deucher, Alexander" , "Koenig, Christian" , David Airlie , Daniel Vetter , "R, Bindu" , "Wang, Chao-kai (Stylon)" , "Brol, Eryk" , Arnd Bergmann , "Siqueira, Rodrigo" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Pillai, Aurabindo" , "Lakha, Bhawanpreet" , "Kazlauskas, Nicholas" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Mon, Jan 4, 2021 at 7:58 AM Lin, Wayne wrote: > > [AMD Official Use Only - Internal Distribution Only] > > Thanks Arnd. > > Reviewed-by: Wayne Lin > > -----Original Message----- > From: Arnd Bergmann > Sent: Sunday, January 3, 2021 10:03 PM > To: Wentland, Harry ; Li, Sun peng (Leo) ; Deucher, Alexander ; Koenig, Chris= tian ; David Airlie ; Daniel Ve= tter ; R, Bindu ; Lin, Wayne > Cc: Arnd Bergmann ; Kazlauskas, Nicholas ; Siqueira, Rodrigo ; Pillai, Aurabin= do ; Wang, Chao-kai (Stylon) ; Simon Ser ; Brol, Eryk ; Bas Nie= uwenhuizen ; Lakha, Bhawanpreet ; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org > Subject: [PATCH] drm/amd/display: Fix unused variable warning > > From: Arnd Bergmann > > Some of the newly added code is hidden inside of #ifdef blocks, but one v= ariable is unused when debugfs is disabled: > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8370:8: error= : unused variable 'configure_crc' [-Werror,-Wunused-variable] > > Change the #ifdef to an if(IS_ENABLED()) check to fix the warning and avo= id adding more #ifdefs. > > Fixes: c920888c604d ("drm/amd/display: Expose new CRC window property") > Signed-off-by: Arnd Bergmann > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +--- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 2 +- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/= gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index 42b0fdb72e7b..5071b55ad0f6 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -8379,8 +8379,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm= _atomic_state *state) > acrtc->dm_irq_params.stream =3D dm_new_crtc_state->stream; > manage_dm_interrupts(adev, acrtc, true); > } > -#ifdef CONFIG_DEBUG_FS > -if (new_crtc_state->active && > +if (IS_ENABLED(CONFIG_DEBUG_FS) && new_crtc_state->active && > amdgpu_dm_is_valid_crc_source(dm_new_crtc_state->crc_src)) { > /** > * Frontend may have changed so reapply the CRC capture @@ -8401,7 +8400= ,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *sta= te) > amdgpu_dm_crtc_configure_crc_source( > crtc, dm_new_crtc_state, dm_new_crtc_state->crc_src); > } > -#endif > } > > for_each_new_crtc_in_state(state, crtc, new_crtc_state, j) diff --git a/= drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h b/drivers/gpu/drm/amd= /display/amdgpu_dm/amdgpu_dm_crc.h > index 0235bfb246e5..eba2f1d35d07 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h > @@ -46,13 +46,13 @@ static inline bool amdgpu_dm_is_valid_crc_source(enum= amdgpu_dm_pipe_crc_source } > > /* amdgpu_dm_crc.c */ > -#ifdef CONFIG_DEBUG_FS > bool amdgpu_dm_crc_window_is_default(struct dm_crtc_state *dm_crtc_state= ); bool amdgpu_dm_crc_window_changed(struct dm_crtc_state *dm_new_crtc_sta= te, > struct dm_crtc_state *dm_old_crtc_state); int amdgpu_dm_crtc_configure_= crc_source(struct drm_crtc *crtc, > struct dm_crtc_state *dm_crtc_state, > enum amdgpu_dm_pipe_crc_source source); > +#ifdef CONFIG_DEBUG_FS > int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src= _name); int amdgpu_dm_crtc_verify_crc_source(struct drm_crtc *crtc, > const char *src_name, > -- > 2.29.2 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel