Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1391207iof; Tue, 7 Jun 2022 04:51:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzej0bQdbuglNiEiaJLMWqZqJlaWm1LE2qhex7NHVf1wSvIhANbrivQZDHQBNY7FahBl6+4 X-Received: by 2002:a17:90b:368b:b0:1e6:67a0:1c17 with SMTP id mj11-20020a17090b368b00b001e667a01c17mr33901160pjb.203.1654602716693; Tue, 07 Jun 2022 04:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654602716; cv=none; d=google.com; s=arc-20160816; b=tejSWwTzZ0Iu7UxB/I44eJU4KXOn5ctaill909BFWkL5W+2mtzOGnjdRvG7ErYGGlC fAtrodlhY5GIeBtVB8GOZ/8TwBS10r96wGgapn7ltHT2cBK8+X+ippvCcVKQVgRqjqK2 iiJ4lwGEI6RlkLQpDEax9SqvW4KI3ukv9a1fTBamSBiAQxWDgABxAuFW1dvy8pvRFMlV 9/mNlU6QeykOH2d99dOZ49iInKWHi5qlc3R+pOXdOYbiGNh5Q6TxJjR3kNEWB4LD5Wj+ pWEne9oSSOKFDgORssnNMRFT/1h5MoiXpQa7WyZOewRdLmUgmXrBFicqQMz5+OXY2emv 1gLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=gRwBLSkbGPDTHb4dZAe1xhTu0l5HO4ucIid3KaMCenM=; b=JXL8wurMzQeW0NXdwed40q4crTvHHG9d5Gpc1FoN1xsAurm37P5lnP+QoiMcXYA7hf eLKlvOF7IDVeUAogiW3nRV8w0TL/SY0dX4ctf7KUXRAntjNo1ACVrTASc1TLfbAVSP6s sxnpJhi25jXS1ZBEwpZfglsds48eVVljdVD2rSlb4zGtD2fs3xJ5a3WVA5AAhEFKmRzL q0wFiRJyvIBkbGQ8Or5HRSjKq3IIKXgplX95uhu5txW5H1v6rdz8kZDewrX7XGH7xozD 0tCp1AOO5Hft89IvjowFyAvQ6Tv2bHrD4id7n+4HkftdFDwfMAuTyAdrq/Xpzzs5MUqy 2/Mw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 8-20020a630f48000000b003fdc5b659f7si7144569pgp.470.2022.06.07.04.51.44; Tue, 07 Jun 2022 04:51:56 -0700 (PDT) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236189AbiFGDKB (ORCPT + 99 others); Mon, 6 Jun 2022 23:10:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236208AbiFGDJ4 (ORCPT ); Mon, 6 Jun 2022 23:09:56 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6741EB0D3A for ; Mon, 6 Jun 2022 20:09:49 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LHFgR1HRlzhYyt; Tue, 7 Jun 2022 11:08:51 +0800 (CST) Received: from dggpemm500016.china.huawei.com (7.185.36.25) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 7 Jun 2022 11:09:47 +0800 Received: from huawei.com (10.67.174.33) by dggpemm500016.china.huawei.com (7.185.36.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 7 Jun 2022 11:09:47 +0800 From: "GONG, Ruiqi" To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter CC: , , "Wang Weiyang" , Gong Ruiqi Subject: [PATCH] drm/atomic: fix warning of unused variable Date: Tue, 7 Jun 2022 19:08:48 +0800 Message-ID: <20220607110848.941486-1-gongruiqi1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.33] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500016.china.huawei.com (7.185.36.25) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, 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 Fix the `unused-but-set-variable` warning as how other iteration wrappers do. Link: https://lore.kernel.org/all/202206071049.pofHsRih-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: GONG, Ruiqi --- include/drm/drm_atomic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 0777725085df..10b1990bc1f6 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -1022,6 +1022,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); for ((__i) = 0; \ (__i) < (__state)->num_private_objs && \ ((obj) = (__state)->private_objs[__i].ptr, \ + (void)(obj) /* Only to avoid unused-but-set-variable warning */, \ (new_obj_state) = (__state)->private_objs[__i].new_state, 1); \ (__i)++) -- 2.25.1