Message ID | 1452751210-19216-1-git-send-email-gnuiyl@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 94931BEEE5 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 14 Jan 2016 06:26:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2B7820490 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 14 Jan 2016 06:26:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1271820457 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 14 Jan 2016 06:26:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4DC2B6E7F6; Wed, 13 Jan 2016 22:26:22 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1928 seconds by postgrey-1.34 at gabe; Wed, 13 Jan 2016 22:26:21 PST Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0081.outbound.protection.outlook.com [207.46.100.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 367446E7F6 for <dri-devel@lists.freedesktop.org>; Wed, 13 Jan 2016 22:26:21 -0800 (PST) Received: from BLUPR03CA002.namprd03.prod.outlook.com (10.255.124.19) by BLUPR03MB232.namprd03.prod.outlook.com (10.255.213.25) with Microsoft SMTP Server (TLS) id 15.1.365.19; Thu, 14 Jan 2016 05:54:11 +0000 Received: from BN1AFFO11FD016.protection.gbl (10.255.124.4) by BLUPR03CA002.outlook.office365.com (10.255.124.19) with Microsoft SMTP Server (TLS) id 15.1.365.19 via Frontend Transport; Thu, 14 Jan 2016 05:54:11 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.158.2) 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.158.2 as permitted sender) Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD016.mail.protection.outlook.com (10.58.52.76) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Thu, 14 Jan 2016 05:54:10 +0000 Received: from victor.ap.freescale.net (victor.ap.freescale.net [10.192.241.62]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u0E5s7vJ005815; Wed, 13 Jan 2016 22:54:08 -0700 From: Liu Ying <gnuiyl@gmail.com> To: David Airlie <airlied@linux.ie> Subject: [PATCH 1/2] drm/crtc_helper/set_config: Remove redundant handling when set->fb is NULL Date: Thu, 14 Jan 2016 14:00:09 +0800 Message-ID: <1452751210-19216-1-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.5.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130972244510398492; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD016; 1:776yPDFBT2/HO4EgDvi/kjUSf/mrzngmkZXR70u0MzJXsazcaxosjCdlRcZoCaMMnYYlPYHT/0BPJimBAWFvYV3j7DqitOynpuyAkoJdMDEzgIVL1xADuCpjM1S2kK+XDNcM0+CO1yjgAzo8b/vDHIoljZZioB/n5s9c1bMZkcSIdsTEi24XnapynE0QbWLzw8se3J2n5xXUS4gqAIeybSkEycWExoOoalztmZdVo5qmPHKr6pjGbBZqc8q4qlfy8iftYGO5CuSRdc++Q8VV5kE7qRribZUHCfNvCp1gRP6Pi16IAUMv9Qn7s3m6dvNf9i1r0efXLNR+ubwhXbrfNsMkZBs1rWWnf6ESKRuu+uPioRmuolbdtJ/9JJkcueDimb/+IZAD8kRQMRDWhNGrieZRq5YAS3TKscBgseysLzodn9zL3dLHvpljYkvny/FM X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(199003)(189002)(81156007)(36756003)(69596002)(5003940100001)(87572001)(73972006)(73392002)(50986999)(81442002)(19580395003)(92566002)(82202001)(83322999)(19580405001)(6806005)(4326007)(86362001)(5008740100001)(1096002)(105596002)(586003)(5001960100002)(55446002)(11100500001)(106466001)(76482005)(50226001)(110136002)(77096005)(229853001)(87936001)(104016004)(61266001)(97736004)(6260500002)(33646002)(189998001)(50466002)(2906002)(1220700001)(47776003)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB232; H:az84smr01.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 30036a4b-d28b-4e7a-581c-08d31ca71ff1 X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB232; 2:nxG3rRuh2Wtf3hOk/tTmVOjCvcC0bEArn/e0M/dowDlclP7PdI1vhSd2EoFkSa1EQ0yHn0wWXrrYOpuR5QVZuU7OAObrlVHPAU1oOCLuY4tcIdwF1p2BLhrtC8hQrnA2i0cLjNu1j/RQJLSwWRrniQ7VslRzosDTzu19PAmSM6k1TRRtNIk4iJc+a478uk9F; 3:XO1/1xeg94qQXWKRPiNlR8oOgjwJu6V7nH2I8Ondhoa67ZjeOTWUMsxTzk2MDAVvlOrXy32BYoH2cqudtVZiioHHe0OGD9HGLAHWr+Jj4m5PqxNWVRXRl9tAINan6QVqOXpHMUbZwLJo4umQx14ljTjLu3G9/n4hH1sYm7lYvz9cJxVB1an5KLSo2PGqszYK4ovm2rm7NoLwcgiAHz4S1V1r/ETMf8y+Fq5sZOo3FE0=; 25:Psg6qdqVYhd9n6xNHkgirSMqlPH7HpV8d9LZUdGmUVXgOwbvzCagNwORTfFk1UIY319b/d3iGH2QpIH+aaDy1snD8j2dB64TuvTUko97ab2YEwT3/K65D9EBh/r2KuUPZozlFHA2VbIZ6zI4UInetfXpoUKGl3KR5nIEfaLFTNcWpo4wCIA2Zp9UwHFxB5e2JTTuVvncEFNL96hiTNl9wqtjYPzPeyxB7l1NI5ehNEZ7i+4ksJWKZ+x/9eBJRqSV X-Exchange-Antispam-Report-Test: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB232; UriScan:; X-Microsoft-Antispam-PRVS: <BLUPR03MB232B4134510D765BD372327DBCC0@BLUPR03MB232.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(13018025)(13017025)(13015025)(10201501046)(3002001); SRVR:BLUPR03MB232; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR03MB232; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB232; 4:MfhwKT3JazoH68H/OwA/E6GOQjcj+ly8UAqpAMpZDjVmd2iFhb9zEjGpOGjf8BlElHbKPpeMob/ycXOdWXwByYb6lwxhj+ZXkis+ER9yUCXKwarrYbFaJodCCkpZ4HCnniGAyhz3wQWW7XpzAL9Nu/HciC1DHQahyAp1D0UsEsJL+D6LOGsmiQOQSiIzzTReH1wjvuNvwf2Wl/NbwaO1fRrxO7A64SWfo2IEShGR1BNUWF8XD5I3XLavMc1wLQzH30hcmi1kcaeyphjEWW0vzjFrfV5+LpGLa2ItxbZUwt30bRHVkjcQjtFhVYMd1tH9Mtz0mL+4mMnjqHGT40+i1o94WISauj2C01CnLpN59rpn3EFnE1sMSZ3uvro+EXEZ3h2e6BJ9q57GFWB63VFWLfNS4kOsc0fTWaMcc7k3/uQ8pUhrzwPpmNHdwhkoRGMm X-Forefront-PRVS: 08213D42D3 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB232; 23:0dsU7wVi9AYG+nWLO8KTyQ9lJoyLZeRxvpK/GmzTRr?= =?us-ascii?Q?Rje0eTR3brInMtjElhkC/kES6OBpVN9SVwpszp+zKzgpSFVctY44XCFqmI0F?= =?us-ascii?Q?tHDFXcP7dZpBDZzrWwySYhj1CAjiXMjhSaHlFanYieMW7Cw71xMtnStR1Si1?= =?us-ascii?Q?S3PGC0PIYB0op4y4XgiOdM5PmTj4llonf6if98MSvFN/grN5MbsoU7cDbx9C?= =?us-ascii?Q?3LK9oEQVFe3hJ0NwY05yBeb0WiisEJQRilczt5/NUakxJ+3JVP+t1OSNFbIO?= =?us-ascii?Q?LvliHApaJcT+fQGpK+h7wCxPExfWGSnKhgmXLvQRJlngGVSjU7XBURspz52x?= =?us-ascii?Q?514wkME1cQ9Qo0NlgHK4WF0o5UxhvqzmQl20JyifZ1+EumYU16RbDLir87M/?= =?us-ascii?Q?GzVMA+vw7GIBfea2yLThsvSwt8WlJbydrknW4wBRT+WL4g4JWt8f5Y5CIG2w?= =?us-ascii?Q?JJMFxjnILGWmnb6xJGV6RjI+ti6R1ukk9q1YNmqkq2NWu95hxLHC710Y1BKC?= =?us-ascii?Q?BBnG2weOycC/oNLhp4Yt2PDCOT8HYpr79048Wnu2RheCkLKI19nQNHqJpy/z?= =?us-ascii?Q?LV99Hmbfl5KvpiUYDzZMlpfPnyKu/RU6+tkN2pk2d4jMrlAX+c6QYAc4vD+8?= =?us-ascii?Q?2LatgnvYt+wGQpwDEpCM07PT1CWBRDprQXL1fwPxTRW8/o6i26+6C0NL+3AH?= =?us-ascii?Q?HKLx0YmFKdDmyYz23ArsoOqT14WatA6BMGPKANUZ2W1dwrbBfMIQ9bWFTwYm?= =?us-ascii?Q?x+BJdXIr9l0QE7Yu9MhTvweNlv51jdyeiaAUef8nnYy1UMa70JFKL87q1f50?= =?us-ascii?Q?bb3uM6fq1W8sBLWqd/SYiQsrWQZNA2RJZrt1CcOIEyKKCQFhOEOukycQxPek?= =?us-ascii?Q?nsT4/pEnd921lElYtMRoxfQ0JN/jH/ECdpFvXDdXshcnPgZzI/pXSedQ8GBv?= =?us-ascii?Q?4pGS3FWb5tP4Sn7WoOEpWzih8Gq30X4MDXcRE/0SLDfVyGeUGhxIka3YpmPB?= =?us-ascii?Q?uup5r/5k7Ohl71swe9xIRJE93Dnf9VGma0RM/DsjwMFbOfyLHHDt3FmRbSI3?= =?us-ascii?Q?tRELhBCPEcrVS3ifME6veEX21G15P1JK0uCT/f3SvZErtz6mYQgt926ewdsf?= =?us-ascii?Q?IRhTCvwtqXYhSJwJJSFH9pkyIW7knGjOGC7IXlwQ9xne9EwQfcJogLjQuMlE?= =?us-ascii?Q?IWBkjiMk9EbQM=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB232; 5:IxcUtSJA2IWogCTvUux0YKeOOK3l1iHe27qEfJqM0WGgELweeNfD68rn1l4NUCdgzBwr9AVjpoBzWJGcZSxca2YwbJH+7EOKSUjuYqfg2j3YMTh94Bwm5OenSHOWEF4iDq+Hlqz6soZfNYTYRmdn9VjqZAxiImJfvrNLBNC2W9I=; 24:2zewmE7d+xIo5LNV2SjOr1kX6TeJB1kter2OTEr2c3TLm99a+8wHud17V+nktHtpgz8t5IjRPO+UjhRh6X/RKcRXdJ8fTJ8FFZSjUQUQ7lA= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2016 05:54:10.8058 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB232 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 <dri-devel.lists.freedesktop.org> List-Unsubscribe: <http://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <http://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <http://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> 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 |
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index ef53475..cd3fbc1 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -541,8 +541,6 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) if (set->crtc->primary->fb == NULL) { DRM_DEBUG_KMS("crtc has no fb, full mode set\n"); mode_changed = true; - } else if (set->fb == NULL) { - mode_changed = true; } else if (set->fb->pixel_format != set->crtc->primary->fb->pixel_format) { mode_changed = true;
We've done sanity NULL pointer check on set->fb at the beginning of drm_crtc_helper_set_config() and bailed out if necessary, thus any later on check or case handling is redundant. Signed-off-by: Liu Ying <gnuiyl@gmail.com> --- drivers/gpu/drm/drm_crtc_helper.c | 2 -- 1 file changed, 2 deletions(-)