From patchwork Mon Aug 12 11:23:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Qian Wang X-Patchwork-Id: 11089651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 200531398 for ; Mon, 12 Aug 2019 11:24:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AA4727FB3 for ; Mon, 12 Aug 2019 11:24:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFE8D28173; Mon, 12 Aug 2019 11:24:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4B7F127FB3 for ; Mon, 12 Aug 2019 11:24:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E2E466E113; Mon, 12 Aug 2019 11:24:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130052.outbound.protection.outlook.com [40.107.13.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4CF966E113 for ; Mon, 12 Aug 2019 11:23:59 +0000 (UTC) Received: from DB7PR08CA0023.eurprd08.prod.outlook.com (2603:10a6:5:16::36) by HE1PR0801MB1851.eurprd08.prod.outlook.com (2603:10a6:3:7b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.18; Mon, 12 Aug 2019 11:23:55 +0000 Received: from AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::205) by DB7PR08CA0023.outlook.office365.com (2603:10a6:5:16::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.18 via Frontend Transport; Mon, 12 Aug 2019 11:23:55 +0000 Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT018.mail.protection.outlook.com (10.152.16.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18 via Frontend Transport; Mon, 12 Aug 2019 11:23:53 +0000 Received: ("Tessian outbound 220137ab7b0b:v26"); Mon, 12 Aug 2019 11:23:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 323d3c2d88360b0d X-CR-MTA-TID: 64aa7808 Received: from ce5c56fa0c00.2 (cr-mta-lb-1.cr-mta-net [104.47.12.59]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id EF7AE42F-3064-498F-B5E0-C089E330F6C0.1; Mon, 12 Aug 2019 11:23:44 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2059.outbound.protection.outlook.com [104.47.12.59]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ce5c56fa0c00.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 12 Aug 2019 11:23:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LbnTSnQ8wJu4aM4U2tcWO2ExAwnlnEqW/aFrfAc0vCheANQpEhaASpmLuyUGV9Anvz4Mo9J/cLC84DI4sgEOeAUDu3bHiYTW9zIJxauiq6rlI30A5K2J0o1zYdDMVC6pGr9ysL3AvoeSgF9THDKdLfhnjZdSZsAzqDbz+trDKe954kgVHrNdLDBtodp0EZ7/1F+AyYKbcneXhY/gikCeLaog6a20WNIyK40LcZauLaKsugrJZngQRcoTQhT3yzCU5sXFmTW5TUEx19SHRE+kTDdIKfKTjEAI0jZiNvACDH9o/z7pd9jWcJJ4h5TEI3KFIDTN4LHlGPJpzF2tmG7EJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/LwvrO/kOs3+z6gFb60TK+YsV/xoyeIh4O1M6zkLUyk=; b=ZTWlBuXz3PgWANrAMkGYk1xPPzxN05Sg+f4gPLtuPKL/g8okGdvas4j4SMoFY5IQTB6PIkVznBNFsmPaK7Ky1ddxLIv0+z8F/qnqFgFvdPiKYpRuo3ZRM2uCbJy1dn0tpGECx+gK1oLVpDHPXg0c9aeiIcL0pLqRn5Oc9hFAX9/Go0SFdKPkOsg74UwzqyiIKApdnED3yhfgYdNIPSo28CQ623EPUi9UZ6pckV8A85aPWWqta573u0iVUxndavJqRQ2tgMmKN4b91bKR+VEugdP3nuptdfDXHxQgz3Qdp3xW1CkfqgdAjf5FN5QNCKRs/KOLJ0OwbGdyOQh+lnNJdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Received: from VE1PR08MB5006.eurprd08.prod.outlook.com (10.255.159.31) by VE1PR08MB4848.eurprd08.prod.outlook.com (10.255.113.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.18; Mon, 12 Aug 2019 11:23:42 +0000 Received: from VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::2151:f0b1:3ea7:c134]) by VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::2151:f0b1:3ea7:c134%6]) with mapi id 15.20.2157.022; Mon, 12 Aug 2019 11:23:42 +0000 From: "james qian wang (Arm Technology China)" To: Liviu Dudau , "airlied@linux.ie" , Brian Starkey , "maarten.lankhorst@linux.intel.com" , "sean@poorly.run" Subject: [PATCH] drm/komeda: Fix warning -Wunused-but-set-variable Thread-Topic: [PATCH] drm/komeda: Fix warning -Wunused-but-set-variable Thread-Index: AQHVUQBlSm03MEg+uUyspl7GAMnBGw== Date: Mon, 12 Aug 2019 11:23:41 +0000 Message-ID: <20190812112322.15990-1-james.qian.wang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [113.29.88.7] x-clientproxiedby: HK0PR01CA0070.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::34) To VE1PR08MB5006.eurprd08.prod.outlook.com (2603:10a6:803:113::31) Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: fc922e27-8be0-42d2-f5bf-08d71f178f08 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam-Untrusted: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB4848; X-MS-TrafficTypeDiagnostic: VE1PR08MB4848:|HE1PR0801MB1851: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:2958;OLM:2958; x-forefront-prvs: 012792EC17 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(396003)(346002)(376002)(39860400002)(366004)(136003)(189003)(199004)(54906003)(316002)(25786009)(110136005)(52116002)(55236004)(102836004)(386003)(26005)(6506007)(66066001)(99286004)(305945005)(486006)(2616005)(2201001)(476003)(86362001)(186003)(6436002)(66446008)(6486002)(64756008)(7736002)(2501003)(5660300002)(6512007)(53936002)(66556008)(66476007)(3846002)(6116002)(66946007)(71190400001)(71200400001)(2906002)(478600001)(103116003)(256004)(1076003)(36756003)(14444005)(14454004)(50226002)(4326008)(8936002)(81166006)(81156014)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4848; H:VE1PR08MB5006.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: WX9Q2zIozC2d8RljIUTqKcFWuDIQnCY1KZLHmTze2lYCC6OFVLP4qNQ/SxXhRaTqkFgeb1/jHHz1UmAkGflPTRzDGAA90qpHw3NTP/0JfIkm0zjKSWWNaldJetNIGoPRxJGyamopWb+OUoAWYWUnue0+JziwoQNCFmV7AIq4L/gz1IKaCe2L+1Ss3YH1e5HOvQYJ4cPz5WQD246H394+hsDMG3PAUT2ZxsJajzsc9FhQNBQSzOF/Fk/E/cB+8RfjcBcLo/YgEO4zcsRi9nOO9VZFjYZ8LdWbxUPBFXFPbNTkbflr6LQx0qlBV3gjVKu8H2vlIemQV+7SBXYpUCecXygOzy3QD69CskXdITNtQrhix4xAGjea5q/+AF12qDNZ268q4IbBMCmLmKiyBHC9kn2wNAUp5HNV6pOd9VZVg58= Content-ID: <88F3B854AC12F54886BF971DAE7373A6@eurprd08.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4848 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(136003)(376002)(39860400002)(2980300002)(199004)(189003)(50226002)(6486002)(25786009)(8936002)(2201001)(5660300002)(81156014)(8676002)(14444005)(70206006)(356004)(3846002)(70586007)(6116002)(2906002)(86362001)(4326008)(54906003)(110136005)(1076003)(6512007)(76130400001)(81166006)(386003)(102836004)(2486003)(22756006)(23676004)(6506007)(316002)(63370400001)(7736002)(14454004)(103116003)(2501003)(186003)(36906005)(305945005)(476003)(126002)(486006)(50466002)(47776003)(66066001)(99286004)(26005)(478600001)(26826003)(436003)(63350400001)(336012)(36756003)(2616005); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0801MB1851; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:TempError; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: a1671436-ce1f-45ab-3650-08d71f1787b3 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(710020)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:HE1PR0801MB1851; NoDisclaimer: True X-Forefront-PRVS: 012792EC17 X-Microsoft-Antispam-Message-Info: i/rhktmQ5IwnctwfzXFcgsXYSR2NZ2turQbB7U7tftRBUkibX15LN2EznZVnQpb3BjThtRJRhR0SJo36T0iYx1fYSnyZCwya4P2U36ZFTaQAJBfWbDC9vea+jHQE5Z/XsXJHhg7i02ZjTyj8irosTxOCTehMpgnrAya557bMz764zHfdkYraeCJuROKwpNUiVbew2EosCIJ3bE8d6Ydu7mlvx7AOyKEMEz4R/GtWzBPwgxcQ7BAh9vNbgCl2H0XhS7x6wk899m2G1mrIg3XzHJ3BzB3nx50zAzJD0m6y/vvpPMuc+g6KrLIrPnwA1Z8F2gyzjX/jIJxWEZcISeWJqIyXbxX1zk+65ySyBbFf402CiBnwzhxhdW9ADxKF3hzS6I/fisLEoxRsYPBAFYNXaH7YHVfR1Zy+Es+tJWkkpWs= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2019 11:23:53.9901 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc922e27-8be0-42d2-f5bf-08d71f178f08 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1851 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/LwvrO/kOs3+z6gFb60TK+YsV/xoyeIh4O1M6zkLUyk=; b=6Xa/aEgeTa2DKKy32MWLK1AlOMhW22MITqETLSpbS4mnrCsMWBEY1AptpLByozG0ZsHlYEqE12IQdo+hb5ZK58UF6KiDjEWRQsU5rARUZ+KLluDHJeqXFvdyDTkIz4Uw3Jsd1IW5gqofsHcXcYGwRO0kTh4Eu0IaDC3nNK+2rEk= X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/LwvrO/kOs3+z6gFb60TK+YsV/xoyeIh4O1M6zkLUyk=; b=6Xa/aEgeTa2DKKy32MWLK1AlOMhW22MITqETLSpbS4mnrCsMWBEY1AptpLByozG0ZsHlYEqE12IQdo+hb5ZK58UF6KiDjEWRQsU5rARUZ+KLluDHJeqXFvdyDTkIz4Uw3Jsd1IW5gqofsHcXcYGwRO0kTh4Eu0IaDC3nNK+2rEk= X-Mailman-Original-Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.freedesktop.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.freedesktop.org; dmarc=temperror action=none header.from=arm.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd , Ayan Halder , "Oscar Zhang \(Arm Technology China\)" , "Tiannan Zhu \(Arm Technology China\)" , "Jonathan Chai \(Arm Technology China\)" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin \(Arm Technology China\)" , "Channing Chen \(Arm Technology China\)" , "james qian wang \(Arm Technology China\)" , "Yiqi Kang \(Arm Technology China\)" , "Thomas Sun \(Arm Technology China\)" , "Lowry Li \(Arm Technology China\)" , Ben Davis Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fixed two -Wunused-but-set-variable warnings: /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c: In function ‘komeda_crtc_normalize_zpos’: /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c:150:26: warning: variable ‘fb’ set but not used [-Wunused-but-set-variable] struct drm_framebuffer *fb; ^~ /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c: In function ‘komeda_kms_check’: /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c:209:25: warning: variable ‘old_crtc_st’ set but not used [-Wunused-but-set-variable] struct drm_crtc_state *old_crtc_st, *new_crtc_st; ^~~~~~~~~~~ Signed-off-by: james qian wang (Arm Technology China) Reviewed-by: Ayan Kumar Halder --- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c index d50e75f0b2bd..1f0e3f4e8d74 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c @@ -147,7 +147,6 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc, struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(crtc_st); struct komeda_plane_state *kplane_st; struct drm_plane_state *plane_st; - struct drm_framebuffer *fb; struct drm_plane *plane; struct list_head zorder_list; int order = 0, err; @@ -173,7 +172,6 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc, list_for_each_entry(kplane_st, &zorder_list, zlist_node) { plane_st = &kplane_st->base; - fb = plane_st->fb; plane = plane_st->plane; plane_st->normalized_zpos = order++; @@ -206,7 +204,7 @@ static int komeda_kms_check(struct drm_device *dev, struct drm_atomic_state *state) { struct drm_crtc *crtc; - struct drm_crtc_state *old_crtc_st, *new_crtc_st; + struct drm_crtc_state *new_crtc_st; int i, err; err = drm_atomic_helper_check_modeset(dev, state); @@ -217,7 +215,7 @@ static int komeda_kms_check(struct drm_device *dev, * so need to add all affected_planes (even unchanged) to * drm_atomic_state. */ - for_each_oldnew_crtc_in_state(state, crtc, old_crtc_st, new_crtc_st, i) { + for_each_new_crtc_in_state(state, crtc, new_crtc_st, i) { err = drm_atomic_add_affected_planes(state, crtc); if (err) return err;