From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C44E5C433EF for ; Fri, 11 Feb 2022 02:24:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347254AbiBKCYH (ORCPT ); Thu, 10 Feb 2022 21:24:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238163AbiBKCYG (ORCPT ); Thu, 10 Feb 2022 21:24:06 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCFF6BAB; Thu, 10 Feb 2022 18:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1644546247; x=1676082247; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Ti7xnZHJBwDkPkQXnFB7Ziw5nj6KKPTnp7hXfek+6Xg=; b=gRdB+I1ZfLHr/1OgGVKGKVVHupte5FLH1pKNvcgGi3cZxi32cfqUPVct mar63Ue2lhAbvkhgLbCgp5xDSXm6p7zl2u+ejD2Q6ohE9h92xA7j+6wPN k5N/oSJY0DjFh8+vgIp/496FE87JG3LtxPONT9vQZKFvuQa2Hzr3B+sM1 U=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 10 Feb 2022 18:24:06 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 18:24:06 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 10 Feb 2022 18:24:05 -0800 Received: from [10.111.162.111] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 10 Feb 2022 18:24:02 -0800 Message-ID: <5382ca8d-4e66-480a-4d22-69c17da8254c@quicinc.com> Date: Thu, 10 Feb 2022 18:24:00 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [Freedreno] [PATCH 1/3] drm/msm/dpu: Remove set but unused variables Content-Language: en-US To: Vinod Koul , Rob Clark CC: Kalyan Thota , , , "David Airlie" , , Kuogee Hsieh , , Bjorn Andersson , Daniel Vetter , "Dmitry Baryshkov" , Stephen Boyd , Sean Paul , Guenter Roeck , Mark Yacoub References: <20220210114106.290669-1-vkoul@kernel.org> From: Abhinav Kumar In-Reply-To: <20220210114106.290669-1-vkoul@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 2/10/2022 3:41 AM, Vinod Koul wrote: > We get warning: > > In function ‘dpu_encoder_virt_enable’: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1145:33: > warning: variable ‘priv’ set but not used [-Wunused-but-set-variable] > 1145 | struct msm_drm_private *priv; > > In function ‘dpu_encoder_virt_disable’: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1182:33: > warning: variable ‘priv’ set but not used [-Wunused-but-set-variable] > 1182 | struct msm_drm_private *priv; > > Remove these unused but set variables > > Signed-off-by: Vinod Koul Reviewed-by: Abhinav Kumar > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > index 1e648db439f9..132844801e92 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > @@ -1142,14 +1142,12 @@ static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) > { > struct dpu_encoder_virt *dpu_enc = NULL; > int ret = 0; > - struct msm_drm_private *priv; > struct drm_display_mode *cur_mode = NULL; > > dpu_enc = to_dpu_encoder_virt(drm_enc); > > mutex_lock(&dpu_enc->enc_lock); > cur_mode = &dpu_enc->base.crtc->state->adjusted_mode; > - priv = drm_enc->dev->dev_private; > > trace_dpu_enc_enable(DRMID(drm_enc), cur_mode->hdisplay, > cur_mode->vdisplay); > @@ -1179,7 +1177,6 @@ static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) > static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc) > { > struct dpu_encoder_virt *dpu_enc = NULL; > - struct msm_drm_private *priv; > int i = 0; > > dpu_enc = to_dpu_encoder_virt(drm_enc); > @@ -1188,8 +1185,6 @@ static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc) > mutex_lock(&dpu_enc->enc_lock); > dpu_enc->enabled = false; > > - priv = drm_enc->dev->dev_private; > - > trace_dpu_enc_disable(DRMID(drm_enc)); > > /* wait for idle */ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3FB0AC4332F for ; Fri, 11 Feb 2022 02:24:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A30B410E9BA; Fri, 11 Feb 2022 02:24:08 +0000 (UTC) Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D7E310E9BA; Fri, 11 Feb 2022 02:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1644546247; x=1676082247; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Ti7xnZHJBwDkPkQXnFB7Ziw5nj6KKPTnp7hXfek+6Xg=; b=gRdB+I1ZfLHr/1OgGVKGKVVHupte5FLH1pKNvcgGi3cZxi32cfqUPVct mar63Ue2lhAbvkhgLbCgp5xDSXm6p7zl2u+ejD2Q6ohE9h92xA7j+6wPN k5N/oSJY0DjFh8+vgIp/496FE87JG3LtxPONT9vQZKFvuQa2Hzr3B+sM1 U=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 10 Feb 2022 18:24:07 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 18:24:06 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 10 Feb 2022 18:24:05 -0800 Received: from [10.111.162.111] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 10 Feb 2022 18:24:02 -0800 Message-ID: <5382ca8d-4e66-480a-4d22-69c17da8254c@quicinc.com> Date: Thu, 10 Feb 2022 18:24:00 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [Freedreno] [PATCH 1/3] drm/msm/dpu: Remove set but unused variables Content-Language: en-US To: Vinod Koul , Rob Clark References: <20220210114106.290669-1-vkoul@kernel.org> From: Abhinav Kumar In-Reply-To: <20220210114106.290669-1-vkoul@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kalyan Thota , David Airlie , linux-arm-msm@vger.kernel.org, Stephen Boyd , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Kuogee Hsieh , Sean Paul , Dmitry Baryshkov , Bjorn Andersson , freedreno@lists.freedesktop.org, Guenter Roeck , Mark Yacoub Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 2/10/2022 3:41 AM, Vinod Koul wrote: > We get warning: > > In function ‘dpu_encoder_virt_enable’: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1145:33: > warning: variable ‘priv’ set but not used [-Wunused-but-set-variable] > 1145 | struct msm_drm_private *priv; > > In function ‘dpu_encoder_virt_disable’: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1182:33: > warning: variable ‘priv’ set but not used [-Wunused-but-set-variable] > 1182 | struct msm_drm_private *priv; > > Remove these unused but set variables > > Signed-off-by: Vinod Koul Reviewed-by: Abhinav Kumar > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > index 1e648db439f9..132844801e92 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > @@ -1142,14 +1142,12 @@ static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) > { > struct dpu_encoder_virt *dpu_enc = NULL; > int ret = 0; > - struct msm_drm_private *priv; > struct drm_display_mode *cur_mode = NULL; > > dpu_enc = to_dpu_encoder_virt(drm_enc); > > mutex_lock(&dpu_enc->enc_lock); > cur_mode = &dpu_enc->base.crtc->state->adjusted_mode; > - priv = drm_enc->dev->dev_private; > > trace_dpu_enc_enable(DRMID(drm_enc), cur_mode->hdisplay, > cur_mode->vdisplay); > @@ -1179,7 +1177,6 @@ static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) > static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc) > { > struct dpu_encoder_virt *dpu_enc = NULL; > - struct msm_drm_private *priv; > int i = 0; > > dpu_enc = to_dpu_encoder_virt(drm_enc); > @@ -1188,8 +1185,6 @@ static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc) > mutex_lock(&dpu_enc->enc_lock); > dpu_enc->enabled = false; > > - priv = drm_enc->dev->dev_private; > - > trace_dpu_enc_disable(DRMID(drm_enc)); > > /* wait for idle */