Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7759120ybi; Mon, 22 Jul 2019 20:09:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEJmlphdpjRtrSyR8KlPcXdn6wbOPOQqYLGbtoTnu8hNaCO8lL8ouG/2vHHPeIJdg+QDG/ X-Received: by 2002:a17:902:4e25:: with SMTP id f34mr77955757ple.305.1563851386889; Mon, 22 Jul 2019 20:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563851386; cv=none; d=google.com; s=arc-20160816; b=Ic9Vtl2VxtIMa99pfSWFgCI2E+yDB3atQdW+RGN1H+nhhg0TfcH7Z3BzpCjo9kRfDP Ot0n5ov2yyuANW5jyLxjor9gG7WRfxSPuZaAT51wAgf6TBriFmE8FFE3Qg6nPVwRiIf7 0Ev1//h4nzT1dFruZONhSsN6JOY/n9mCf+8wzTsvazMsXFEHjvt7rqecndWWzmMe1z9G 6vmjJMbJ8oLzvs13yQ+qHskEWnqiEG0U3/BPlF8Xob4IuK6lAccnoN1hf7bTtAClR7bP 7gLPIFX/70zrLQpG4GtH+JXskB3iKj7PTp4TgAyYEluiGj4EH8RKvP+MTRnH6aN9V8B6 DoXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HwvJiB020PdHZrr6dRx+YAOsgzbnAkiZvqKqCv91HY0=; b=GbIJro9OlC7E+dDQMRcqtzO49UZNJaJ6H57UnOOnrgkXO8Os+7X0Bvt1BmMHB3BUM/ S4QwI4UYZ27rwHDJAmkA3Sq9Ny57j7ueYzHBRduilJ6VdTlLFEqmDfkwpfq6sHM6m36f X3ZxpKWdZ8mo6GNzkrACvVLAtzFnXuYdsM+d23w1yxj1Af66Uc78M7VD2Ox5qtQaGIqC CxgoerDCfVWZToDDyfNIa+Aukgc/FRGYx37yjGv44P0MnFU+rywDW2l+yuhrONugGXPT wvZVyT0uNE7urkK8a4IS9fVpUOcGk8BJoEiMCIFfsa+SqKe1HLnUMeCwDCSqUWKJMkko +7Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=JtIYbjWt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si10921586pgy.255.2019.07.22.20.09.31; Mon, 22 Jul 2019 20:09:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=JtIYbjWt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732475AbfGVUG3 (ORCPT + 99 others); Mon, 22 Jul 2019 16:06:29 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:34995 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728180AbfGVUG1 (ORCPT ); Mon, 22 Jul 2019 16:06:27 -0400 Received: by mail-yw1-f65.google.com with SMTP id g19so15610018ywe.2 for ; Mon, 22 Jul 2019 13:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HwvJiB020PdHZrr6dRx+YAOsgzbnAkiZvqKqCv91HY0=; b=JtIYbjWtQYouQdTV52R6hWVjmr3h57dT7O21FB17MAyvKSdf74C8ZQ/+UWuVXvOJPp aKOjxaacmyjkLvWwvM4/prsMKdiimEZ9YgK3Fcv2V7GMLb/sIaU6zTApATxI39pVHQWV lyNwl6s5dbvE73l0D+VnMm2cQWYc8y1prkn79WgdqihoOcXQaiZ9L44hPGAqOvspPIYf sVsWG16yFJULB+qnmzLAjFYcKLfidEqT5RbRJW4cYbtVj0sIOkBygQRSny/9K7KoROeD SKOl/vT9+KCDofXbNh/M8kkSINAXNf3Fsw0LqEzLhh1zlzGwFA8KzmNo/2ySLN3D/puE fTnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HwvJiB020PdHZrr6dRx+YAOsgzbnAkiZvqKqCv91HY0=; b=ItotVd9TLoc9NVZpjPJ0Mm30SZkP8CpiXWgn797XzwMPdGA7bea2JBP60lXYYRrFI6 EkWe+nJ7y9Ldh1RUD1nU/uZLaUGn2JZwr6gCRlp/Y5/+WT8g1xsjxz8PJv0+AwPcEzqv Cjx5zcbc4HLcUS5z8ybjAl1An+gRo+iL8S61CqbGTnSKjtpw9UBcm8csk0Nm+df7hiNs 70DGcGjsLt1QU67DMzlg77ip/wQiW0xrh/6txazBbUY8knRMEM6zTQLQ4P1/0/mZaLk9 A79C/3bLLi0m2OjuDgBrpLu3mC/ah2EWxtG0ORvdRqSZ+5OA1mofShzuhXbgqsuy/p90 hkjg== X-Gm-Message-State: APjAAAXmEngW421Bqd8UqdYMX3X/vHK2RGQvD0uI5H/lhZrhcEbHMIAS aPU+0ZDF6TiDlWEw3Ic1o4AojQ== X-Received: by 2002:a81:aa50:: with SMTP id z16mr41029409ywk.278.1563825986781; Mon, 22 Jul 2019 13:06:26 -0700 (PDT) Received: from localhost ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id 131sm9412431ywq.21.2019.07.22.13.06.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 13:06:26 -0700 (PDT) Date: Mon, 22 Jul 2019 16:06:25 -0400 From: Sean Paul To: Qian Cai Cc: daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, maxime.ripard@bootlin.com, sean@poorly.run, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm: silence variable 'conn' set but not used Message-ID: <20190722200625.GJ104440@art_vandelay> References: <1563822886-13570-1-git-send-email-cai@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1563822886-13570-1-git-send-email-cai@lca.pw> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 03:14:46PM -0400, Qian Cai wrote: > The "struct drm_connector" iteration cursor from > "for_each_new_connector_in_state" is never used in atomic_remove_fb() > which generates a compilation warning, > > drivers/gpu/drm/drm_framebuffer.c: In function 'atomic_remove_fb': > drivers/gpu/drm/drm_framebuffer.c:838:24: warning: variable 'conn' set > but not used [-Wunused-but-set-variable] > > Silence it by marking "conn" __maybe_unused. > > Signed-off-by: Qian Cai Thanks for your patch! I've applied it to drm-misc-fixes Sean > --- > drivers/gpu/drm/drm_framebuffer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c > index 0b72468e8131..57564318ceea 100644 > --- a/drivers/gpu/drm/drm_framebuffer.c > +++ b/drivers/gpu/drm/drm_framebuffer.c > @@ -835,7 +835,7 @@ static int atomic_remove_fb(struct drm_framebuffer *fb) > struct drm_device *dev = fb->dev; > struct drm_atomic_state *state; > struct drm_plane *plane; > - struct drm_connector *conn; > + struct drm_connector *conn __maybe_unused; > struct drm_connector_state *conn_state; > int i, ret; > unsigned plane_mask; > -- > 1.8.3.1 > -- Sean Paul, Software Engineer, Google / Chromium OS