Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3500606pxb; Fri, 11 Feb 2022 00:53:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxy69MN5UDJNh4o+BdN+78I29F4iAZn2pPt9fceqbZzXLDth8SxsdINbFwmCRvzjHE72osb X-Received: by 2002:a50:d5cd:: with SMTP id g13mr774736edj.268.1644569621973; Fri, 11 Feb 2022 00:53:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644569621; cv=none; d=google.com; s=arc-20160816; b=e2L9A0ry1tMwFvSdKzGtLmflq30Qxk2ROz8uGLb0StgWKbhCVCRop9IqZ3hyGXY3nr FCjJmmAuGWHuIZFuCatDbEcxkmq21b+MotAucu7508NvfvhZY5U24Jd6Sl3451Ayj7xQ b/A/00TvFswU7wRdahz4551N3cNrJFd2GSEM3mIkypyY8Yqqv28VOC4FQg+75SdsZ/OZ ED0FmZLEh4nKgfi8CPPYnTL0Jnals7GqeKUheFm6wkrMrniX/U8kEF6/uczzCaeqW/Bp 5yf+/aI0/nJ943WDjzCsPfNhhSoMfyL19leAQCnlZQF5XKgltwdrLB68wvDcz2v56jHx WoKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Ti7xnZHJBwDkPkQXnFB7Ziw5nj6KKPTnp7hXfek+6Xg=; b=JiARLwr1WR0+AGw68VksB1tfOmTvDo6BUew7UMpMbEqlF9TVRD+3QHsVo/CZlfl4Rg Wy1oJ6hb448iD59YaFrZm0DXYYi7CaqjdEs9rxcescU+qvaSjE2YBmaFsF3NIO+yA0++ PRcZvquKO6tr2dqLCwzFmbzvkOVkKEvE4yV3OhfBudGzNrRlw1x/hINA77kGYL44zXVu pmcaPvP4yknNbQphD3YWxknv2143OdIlRYNOXRnFSDcUlOypenyjpyO6JNM3+kATNa00 vnSe1QmtO21GT/mf3v8jEA7xQEA1ubxdXr+mX0TpDgB0ou1YkVcuhvU3j9KfOFw0nrnY d8WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=gRdB+I1Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n22si8328994edo.373.2022.02.11.00.53.17; Fri, 11 Feb 2022 00:53:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=gRdB+I1Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347265AbiBKCYH (ORCPT + 99 others); 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) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 */