From patchwork Mon Jan 18 03:36:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 8052111 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3E1EC9FCD9 for ; Mon, 18 Jan 2016 03:45:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6399520222 for ; Mon, 18 Jan 2016 03:45:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 54CD5201FA for ; Mon, 18 Jan 2016 03:45:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2C8C6E38B; Sun, 17 Jan 2016 19:45:48 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0093.outbound.protection.outlook.com [157.56.111.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6359F6E38B for ; Sun, 17 Jan 2016 19:45:47 -0800 (PST) Received: from DM2PR03CA0053.namprd03.prod.outlook.com (10.141.96.52) by DM2PR0301MB1261.namprd03.prod.outlook.com (10.160.219.26) with Microsoft SMTP Server (TLS) id 15.1.361.13; Mon, 18 Jan 2016 03:30:27 +0000 Received: from BY2FFO11FD015.protection.gbl (2a01:111:f400:7c0c::139) by DM2PR03CA0053.outlook.office365.com (2a01:111:e400:2428::52) with Microsoft SMTP Server (TLS) id 15.1.365.19 via Frontend Transport; Mon, 18 Jan 2016 03:30:26 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=gmail.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=fail action=none header.from=gmail.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 192.88.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD015.mail.protection.outlook.com (10.1.14.131) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Mon, 18 Jan 2016 03:30:26 +0000 Received: from victor.ap.freescale.net (victor.ap.freescale.net [10.192.241.62]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u0I3UNxK022424; Sun, 17 Jan 2016 20:30:24 -0700 From: Liu Ying To: David Airlie Subject: [PATCH] drm/atomic-helper: Remove redundant local var old_crtc_state in disable_outputs Date: Mon, 18 Jan 2016 11:36:35 +0800 Message-ID: <1453088195-2564-1-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.5.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130975614263604582; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD015; 1:QK8m1BY4/EKfg0SNGUffxjs8CofLnfL+3NYDM1GTBfVIdRBb+TEa9kp3ESBMgxQ2b09g8co3ftsKViAPMHxxJw6TZI/71zmPAF9GUKDyUNlzmCwu/l+A0eA7iu95JFqrbHsVE4TlBMhbTGNnSYUn/WDuM7WOzJhFnOT8hTzc5yc5aM6lbtkE+4pfYuxkbdSf+RYREW1g2q8m45PqhZINXlMy1H5YffQ+RFusMKDrSY9wLwg5LYKOSt4BCKrQ9wbpxFXFNzV6XYfEAjoZ64tN8kJZdp8cQ7OBcXi5lQP9lUfkJlOi1WcOu6CcrajNQF9muLJiMcYEb+y8azD1yQ4EiFtqK1i/TrqPimOH1GLoVowDuJ0vLGc5RxqfeNsSktcyvkOm70QjuIgxBmJXjdLA6f2HaY/A9+PVaG8eSeO7cG98LrC4IrZzNZsb8zNEKi1h X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(199003)(189002)(81442002)(55446002)(1096002)(5001960100002)(105596002)(1220700001)(33646002)(73392002)(50226001)(61266001)(110136002)(50986999)(106466001)(5003940100001)(87572001)(229853001)(97736004)(47776003)(73972006)(11100500001)(83322999)(586003)(19580395003)(36756003)(82202001)(87936001)(81156007)(189998001)(48376002)(50466002)(104016004)(76482005)(6260500002)(4326007)(2906002)(77096005)(86362001)(19580405001)(5008740100001)(6806005)(92566002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB1261; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1261; 2:YIH9Je3wRYc1J+FpIImwKbHhkxCG0Jv95W9I8yhlc268fLy+ynzilN5BE5hcVhIjKhktiTmhoP3zmJPxAa+4TwgeFT0Btqfjrm/05kE9t/TRUraecbEtyXXoQxMzm80Rpul65dJbDOL1uomJRdp4kw==; 3:A/fgVUyAMXY5WoW3pLdb9jQrW/jz83JRRMNCN2WrcFIFtx5dAmlFLEvcbSyq2AaP9WLgFm0Aheqx4U8jfYHHGnVx1bPXWAhvu+84hggVEMi8FbG8XrwBbzifC+gUyLKF2w2iRNpYhM4z+O/DOZaD2z0Ytfk0EdycbHpmjKnFeIVwGgkTlqNR39U1GHxcJ5rVau+TIrOj76Kn5IodgsN9iK2DfibSESqkLqq8ZKH7rKA=; 25:VspIuYUwOhtd+uJqLfiNkDw0emmRvZsE92bhk7q7I9gVP2Sbgu+C0rTODXUs9jPhiWB5Y4P0AQKhnwczp391iKk1djOD5P8At8NtWG6TbAe8RM5FOEew9gEkLb1u4IfbaB9QUWxKQh4jp5nQH00Wzzkt8P9mquevLtPsBA8xBKbAIJrsgvKWOFnF1gpgoE+7N5qXlWroW4PUwCc66foyoWgxWqBfKIIxtl5xyV6AVOPQK0fjGWRV8FbiZBFFfivd X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1261; X-MS-Office365-Filtering-Correlation-Id: 12dac8eb-c127-40d0-b566-08d31fb7b4e2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(13017025)(13015025)(8121501046)(520078)(13018025)(10201501046)(3002001); SRVR:DM2PR0301MB1261; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB1261; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1261; 4:ZwNIyo7P28HQHYrMxHbaI55oqmsGQHqahyomDW9KSiRHIClV/lGwj1yvqS+d2ZXGmVtD78Otk0xJCP5Eddc6k0/VPnDsHXx0vXByvjOhQQ2grsZAVkn8hKWqxR3KvoA5G7YoyNNiy+awV6r7EH5uXS4fCwLLA4UcGZXF27SMcwxJbvkBbLkmMgnu+8E7N9Sl6lR2dWCixB1UlJWvZIrLe3U/zQVQSir+/C35Q3H1mTIWFL3VlPeNUQaavCgub/TWfsvA2Uko/bWdXBha09WmMr14cEVYv8C3BnQY3RmJOd6oQi0ue86buIZLKQ7y9vg4Uw3DkZAWDRRTv7O4rebTbiRwpP8LEyZ6acZEejJ0Z84mcbV9kWOlchM+BEjYxBrfK9+c9exrpDphy135GVU4r6Km60OTz1vXgxVWHH5WLl/CtZTX6mUgmo2MSgvnmdY2 X-Forefront-PRVS: 08252193F3 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB1261; 23:MzTG34IwOQv8xfp76C22Xo2jE1Op6ZoHmVBExFR?= =?us-ascii?Q?lOtDh2UlpXdapIRs/hkPXNIFG1s8MHBAYuxyEju5yQddc6GVwTrZowz7VbP0?= =?us-ascii?Q?3to/6ZbiowV1DXvlY4ayybx18Rguq8BiYPsifX3VgQHc/4O7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wp8dNvRvTIa0+KCSIipXBsg8x2cEsLyAsYwJJnQSVDoBgqsY?= =?us-ascii?Q?UsGQyHayLmR0RrWUyDhppEZCC45mPGx8GbkSXWc7b76faYLFTJgBIAjPZvuB?= =?us-ascii?Q?4xGNVtLYOqJ8nWbGK759+wJRFMLv342lzcOZmozeAYHcGgifFG0uw7A=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1261; 5:26mvLTRvu+gLP2pSXoFUeT48kF1fE7mrAok4fkXQe12aeJ859bG8Cw/pcyT+BpME6cjwHtzbOHP5vmg342D05zm00RYPWYEF21ktKw/R7iDY3BgMHrY/i2LFnu2CU4sS8Gt+PyKFaGCTTRoGrIJf1gcEdKYSSn7RX4UP7sTDZ6I=; 24:zmYYJP774zvJLN9xO3NDpokh//+GHLRl7/cEHnxHCtyZKKu6Yv+uSUwQcCkFFX7+kTTWrLiJ3xc58JlssX6K0guou79haNUjuvXon800u+4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2016 03:30:26.1576 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1261 Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP One of the two local variables old_crtc_state is redundantly defined in the function disable_outputs(). It has only a scope partway through the block for_each_connector_in_state. So, let's remove it and use the one which has the scope within the function disable_outputs(). Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_atomic_helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 57cccd6..b9d8b53 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -617,7 +617,6 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state) for_each_connector_in_state(old_state, connector, old_conn_state, i) { const struct drm_encoder_helper_funcs *funcs; struct drm_encoder *encoder; - struct drm_crtc_state *old_crtc_state; /* Shut down everything that's in the changeset and currently * still on. So need to check the old, saved state. */