From patchwork Mon Apr 17 07:38:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Rui X-Patchwork-Id: 9683697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70434600F6 for ; Mon, 17 Apr 2017 10:21:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59D0D209D8 for ; Mon, 17 Apr 2017 10:21:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BF6E23B23; Mon, 17 Apr 2017 10:21:40 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 B6200209D8 for ; Mon, 17 Apr 2017 10:21:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BDBCA6E198; Mon, 17 Apr 2017 10:20:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 4698 seconds by postgrey-1.35 at gabe; Mon, 17 Apr 2017 09:13:09 UTC Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0040.outbound.protection.outlook.com [104.47.37.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id 733FD89F31 for ; Mon, 17 Apr 2017 09:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+LWyum93/70jXnMgwVOW6korj7w1f8z+jMcZPjrLi0o=; b=de4v4axLYLms2/xH8J/7ysAAXCBsxIxnkTLlW8QRV/NFgQWBQLNynS2l619hu0icDYhxOW2YG6Qv3LgkhZ2rKQzl4A9wY8JHkwHdFxlWD/G+ScpTUvfEtKMNqPM7g/Uy1+EiDJv1IIUcDF9BApchFFmPYGrSDcJg0WoGyTnoxno= Received: from DM3PR12CA0062.namprd12.prod.outlook.com (10.161.151.30) by DM5PR12MB1516.namprd12.prod.outlook.com (10.172.39.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Mon, 17 Apr 2017 07:39:11 +0000 Received: from BY2NAM03FT029.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::200) by DM3PR12CA0062.outlook.office365.com (2603:10b6:0:56::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10 via Frontend Transport; Mon, 17 Apr 2017 07:39:11 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; vodafone.de; dkim=none (message not signed) header.d=none; vodafone.de; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by BY2NAM03FT029.mail.protection.outlook.com (10.152.84.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1047.9 via Frontend Transport; Mon, 17 Apr 2017 07:39:10 +0000 Received: from SATLEXDAG01.amd.com (10.181.40.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server (TLS) id 14.3.339.0; Mon, 17 Apr 2017 02:39:09 -0500 Received: from SCYBEXDAG01.amd.com (10.34.11.11) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server (TLS) id 14.3.339.0; Mon, 17 Apr 2017 03:39:09 -0400 Received: from hr-intel.amd.com (10.237.75.194) by SCYBEXDAG01.amd.com (10.34.11.11) with Microsoft SMTP Server id 14.3.339.0; Mon, 17 Apr 2017 15:39:05 +0800 From: Huang Rui To: Subject: [PATCH] drm/ttm: cleanup unuse ret value Date: Mon, 17 Apr 2017 15:38:51 +0800 Message-ID: <1492414731-2141-1-git-send-email-ray.huang@amd.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39840400002)(39860400002)(39410400002)(39850400002)(39400400002)(39450400003)(2980300002)(428002)(189002)(199003)(9170700003)(33646002)(86362001)(38730400002)(101416001)(110136004)(305945005)(189998001)(47776003)(50986999)(4326008)(5660300001)(356003)(50466002)(48376002)(36756003)(53936002)(54906002)(2906002)(8936002)(6666003)(8676002)(2351001)(6916009)(105586002)(50226002)(106466001)(81166006)(53416004)(77096006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1516; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2NAM03FT029; 1:T0WYY3DQ+yrOjz7r1uLMfPSqKXB5Mbv0LMKohXIxOhrMF+saI0pRxnamFkkJryj9PYtkuEzTi2UAzagPsUz1xJMTox3R1WmstH7NI7n9hHaIYnK1EG7SOGpEQMUdIl4ZNv/deLKpfl8Zd1cXDewHHC1AL35tpynfFphmnF2YhGTZl4JaMKxMHYe52xCJzQs8BHfKvpmb8fKLSWzWOkjd/4+wqGEtHn1ferYC5idhlX1z6TovSRUx91XP4l55vo6Wc8860rrRUc95/0OUX81CJW0sLJCjeW8L6aMzvaJ5quscz85mdlx56ydXJnMWzC8PEfJ7DV59cENx9zxJ/JxlRwLoYVttmUhtixBbWcDXkH31hV8c9s9dEHIMSUj/YEg3/BUUQnPGDV00jPLLl00SIvGPlKOqzEeHrvMoDHlri1gHg57fOVXKAwVha0mbbriMETQ1RUcMyOEKv+njU8ipydm1okRcdEEZOoi2whYfqXGmjbco/W3sFYQ3iA9ZkmG6zjVhi1UerJs0JEam16b3gRXpe1c56+3eLVwbTr6aD7E= X-MS-Office365-Filtering-Correlation-Id: c78a928b-f001-46b4-ae9f-08d48564d63e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR12MB1516; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1516; 3:c8/vodcFsFZBW73sRZStpVcdkyKQ1sI2Ai0WgIfiRsJN4EAnWmP0zLiDeV44J7UGaZs6xhi9XuObs6ZthisSiJ+f342I/L6wzmOCKtNvHmypYNVAsRJH7NdUciTxGjwo1pllC8XTG3Q5r1wumLAlpZHGe+HSdRZzTWxUiaOT5ESjd8fdk0IA1JPV6NQhWkbDJTXE/Q6ftnQWtTny1rW8Uiwy6J8xfUE9LxHpDUevA5E0XzQbFUxRqaGCB0z/0gNWK8QddhunzzX6V1huwRUNOWVhQNtdbHk6Gfy7zMmBhuH8Ov2e7hITqmAm+VPjN9KSMFVoFdhr8ULvItNB2X1xKZvmOeinyaMdirmhtPIXcsvBuD7yHKvid826Lj5n51CnjNeNWe6JkTYmLyUNBln+tNp9epOiUEzxHVYM96o7lLCtgFZOXbTuQ2Ey5+fM+BbzD0xaz63PLCvTiGYzidWlKsuuctIMIcpyVoSj29IO4qLcvqiR4swoA2abVJOqBL9h X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1516; 25: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f4gwZBEZKeWHkyeOVv9b2hy77SCYI/Y3BjpGKNPd3eKD7fJFrWlgrrwmHVty0kgXYfaF693fUzeqEyFzY73VJYmVVMuMusHEjn5AIS4EjjR2zja6qQ/t5oWo6YhQWBgDgTycPcOC8SXu7EyEu3rpJnEOqO89n3t+QP+ckFHr+5Ft6swHJInSQeIr/NUs0RQRQjDBl7HZ7HAZeFUHqg5UffnT9sbQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(3002001)(93006095)(93003095)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123560025)(6072148); SRVR:DM5PR12MB1516; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1516; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1516; 4:DV85hm2mInz4zvXKf/EK9CTw5fqErh6Zf4sB/+YSh7is2ex4ydO3c5H58TtvrNSgxYYZkK66/SPG64Plzu4Gm9fh7a4ftM+fg3qeDiJhXQJZz/uzplzpmPSmJ/5v/NOFzlth/Zn7aJP5AXW8SSFTGg7fwZLhkkzz8Rp0QRFT1NCsZnw6JO6eiCVe3eTKiGKmgR0K1abLMNA3f783LiNuWOUy1UwRIe4GGDkESB5/9nU07hVT8EXFvFXN0Oy8r82zN/FJ5UUBJRnz6TPud58HL94YF9Jr6Yg94OQTiT12LEbJPwH17b9mezgGa7Dbl0QdsEIAm1L0noym+sFy/LvSUBdA/u0MBeZ9cQf/D92FKXG+1df6iHrGnhwRdZRML4JC/bSbjK5/u+TSKT5ZLK9Swkni75/4Jikvcs4fZZI8jmVhNrmtUWtSci99hq4UjQF4Dk6kNvIRYsZ4X8c0EhvoLM5C1ZDzE4WD/57v9QILRIO19Foja82yu4i2XJMxEqAp6p9qLxrMy5/iJ/vsn25tqbYNHp9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DH8e0AxF05+nagtszhltA=; 5:6sFcH/IDTSCsTDeNbrC47m18rQXUDB0bgF3b2qIIJeniMfdHOIomV9RyV8V7ArspSyR6vVCnKxmfrpQFy80xpoGiRugV71FdWKFLIBlKaea6gxZIK5hTkY1P2PxzmEGipGaTtg6Nfi9pYNJcLyPxHzqBVoHCgY+xuXxYwGl1Mrk=; 24:oJKD0xkoeAhhslQwe5jjwFymPQOrVJaTdVdZq/Fdh6P5qBT8My/XTGE6ximA4JThtwddYJ8hmzQzWHRooOE4UPKhj/Y2jn4L3Q809H++32s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1516; 7:1iPM8ctfKfOPq1dUXRC6Sk7CdGHXiabEcr0hF22l5bYkf2EPg0/Dm4HiaYTCTXp4XOe4ce5pbJ5mrEbFmzfSaD/8R8CSrzCz1kKXAFg9eFjo6s8/HCBmPE0oUyjKPcDo3bR4VLIZEOvEtlGEwchGLZYon87C8yAbavIp142xGsdM4M5Cg2Zjhan0zG/IcDaLIxOWQlSP9UfJOBqzWFf9hoD8OF9rTTkXkdFKwyt6nN75TX7j5+/qxJR5IKdZvEwl/UPBv32hNk4VEgLQXU8Z8RsV3GHooE8DHlRpT3mJo+cy+CaYYO52kCf1thFrzTPVruFDWSZohhTX7nE1kbjqCQ==; 20:UBQr5z6bKPHwe9DbHEe7n9DUQlTYjuAnDc5W+ZvuUr44l1BUzUE7xvZLv/TIjB4Rv1z0gvbssjTVxKpb4F/rYAnQv6zoho+lyKnJYVgSc5AXf1lEAIdUwUFkEorRDEw+vqzZsNm8BRtrOFpH6Aui9yWAoTiSLmhZNcIV8bguKE5UL4G56IUCm1Hlb1ouX/1BU2O8AjgWJjyV6/kS9b6R43lZLH72ED9wzOseH2YTdRaVMBjq8H6i5/LPdVd0bfZZ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2017 07:39:10.2019 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1516 Cc: Alex Deucher , Huang Rui 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-Virus-Scanned: ClamAV using ClamSMTP The ret must be 0 here, otherwise, the function will return after init_mem_type. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_bo.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 9ee4ff4..5dcb4e1 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1440,7 +1440,6 @@ int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type, return ret; man->bdev = bdev; - ret = 0; if (type != TTM_PL_SYSTEM) { ret = (*man->func->init)(man, p_size); if (ret)