From patchwork Mon Jan 29 13:55:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "StDenis, Tom" X-Patchwork-Id: 10189761 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 E54406020C for ; Mon, 29 Jan 2018 13:56:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D312328741 for ; Mon, 29 Jan 2018 13:56:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7C9928797; Mon, 29 Jan 2018 13:56:32 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, 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 736E028741 for ; Mon, 29 Jan 2018 13:56:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B62C16E4F2; Mon, 29 Jan 2018 13:55:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0058.outbound.protection.outlook.com [104.47.38.58]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D43E6E4DD; Mon, 29 Jan 2018 13:55:38 +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=ai14xpIH2t/HAuPT2Xi5XacNq+DPRkKvxeglpFtEPKc=; b=dwpAeODHa2nmM7GFTgGV286Zi73lrCF+GPkgCkiZDRkF0rgxWrfS0O/orpZaKecO4H/673zFofI0FWL28mk+TIbScA+SiBqZDVoVcMxjL9d+EHgZDSlC6i80FV9Ap4ApdIXAop6B2kcjsCs8dTMxIBMZdUIFmzXFmWjtXhdDWsw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Tom.StDenis@amd.com; Received: from fx8.amd.com (165.204.55.251) by DM5PR1201MB0075.namprd12.prod.outlook.com (10.174.106.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 13:55:36 +0000 From: Tom St Denis To: amd-gfx@lists.freedesktop.org Subject: [PATCH 12/12] drm/ttm: Simplify ttm_dma_page_put() Date: Mon, 29 Jan 2018 08:55:13 -0500 Message-Id: <20180129135513.22538-13-tom.stdenis@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180129135513.22538-1-tom.stdenis@amd.com> References: <20180129135513.22538-1-tom.stdenis@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: CY4PR14CA0027.namprd14.prod.outlook.com (10.172.162.141) To DM5PR1201MB0075.namprd12.prod.outlook.com (10.174.106.17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: edd00353-1858-4d9a-5bb8-08d5671ff9d5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM5PR1201MB0075; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0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Shlfr7/g4m2y0XST79P1XvuDogOmoPgrP7m8uVBpEQhvtj243U3iv/fVVyf3iNsW4vBFmQ0NRH4LJk6RW2zhLsNDBbyUn4kcgxwbew1RfEeDC3mJkT2nwZzbg3dGtJE4/3ZIXVVQXzoYZLbCzYz08b9Wa4/L2/1Y2a2obNlzz1gixAN8oAbzGOXDMcu6j3ZW/C7+erq3yIUmKcuDWODkGIqj0fEJ6fMOySZRt3k88z7AqcVhg90pHsdwbnUTM1W/2cDcYg/3l1kEvabHV9ChDfju7jOCV+ySI4X6qsQy2V6uB5nMdKJ22WObkLJmma0908bsXIkUOVzKB6q43E7Jp71tuczuwEbEgFLy6TiaQYn; 4:chVH8KPue6vNiQuZERIc/IVc983kbF3lW712a+8b/Gv1/l8g89F/3zaOhr2cnd/16kLZiUgzyjZLU7v79npmyLdrCMWINvQG2MPnlu2JKks9yckq22cDXhGBxCbWHTNQQIgXLAsfZCpMQvD+mH3+LXwddGt/bwKVbEnLysbEq7f2qZhYvDaKBJjHvlCFgJnhL6EDy5F6Dv8PtIsYYVptzmdHx9tXv6xAdaGB2k/0IkECVP45iCDC7yKqtlL/fxn8/BHbhOoie7CpqMNFa0DY54SIAePG0WrzGSX2MKqEzfbVld8F+8HO3E/EKESw/ZNm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231101)(944501161)(93006095)(93001095)(6055026)(6041288)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR1201MB0075; BCL:0; PCL:0; RULEID:; SRVR:DM5PR1201MB0075; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39380400002)(396003)(39860400002)(346002)(366004)(189003)(199004)(76176011)(478600001)(7696005)(450100002)(7736002)(52116002)(6486002)(23676004)(86362001)(305945005)(2870700001)(53936002)(66066001)(5660300001)(72206003)(47776003)(4326008)(386003)(81166006)(97736004)(2361001)(25786009)(2351001)(106356001)(316002)(6666003)(8936002)(2950100002)(16526019)(2906002)(81156014)(68736007)(6916009)(186003)(36756003)(105586002)(8676002)(53416004)(50226002)(1076002)(3846002)(6116002)(50466002)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0075; H:fx8.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyMDFNQjAwNzU7MjM6R3RJN3phQnh5QlNWSjE1dzFSY3hLZnZX?= =?utf-8?B?WXF6elU4blRYUjh5NVV5OEhLOXJBb0hkUnlTTXJQYTU1RU1jcmdLK3duMld4?= =?utf-8?B?Z0IyMitrVXhqMFN3K3R4Z1JjZCtHNnB4bXhDSWdyWStocVJHNnEweXBPSE1K?= =?utf-8?B?T0pXOWZEWHJ1T1ZacGVBVk1RZjg2MzYwb05tS0dGSmMvdEhFQnBGRzlrdys5?= =?utf-8?B?eWJ2VDhZWjl0cll5bUZ6amliK3Mya1NtYjRneHZtOU9GNi9RdkpSZ1dmMjA4?= =?utf-8?B?ZU1MZmNjeG5pazhhWFI3aVI2dzlrRU5NWWlPSGdxUDBwRXc4b2tOeHN1VXNT?= =?utf-8?B?UVBwRkttaFBMZXBkeEZWOUZoaGdvSW9UakVnb1FpaGs4MHBwKzR5Rm9sMThV?= =?utf-8?B?S0QxV3pqQ2ZSV0VWY2pISXV1cnVHRlFDcmM1Sy9pQk05VSsvaGkxYmszRmtk?= =?utf-8?B?cEFPZHV5OHdUM2ZlNjJIbUJhZjA2SEFSb2t0RU9IbjR5KzBZK1J3SlMyd1hX?= =?utf-8?B?RWhlalBYQzB6NmRzYStBYzNyTTRFejV0YlhZVkU4U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YOYvSQsOaW9av5P1jKt3L+U+G7pIee3nwe6mkljrCGDsh5PAz3XbC0g8/CQcgSXPEYfEjFMwcp15Y+7IIurw85 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0075; 20:NFAjJQz6kgaVSy/FXLUIgzJkkLwoH10K8Fux+vs0zVSwvF0jgcaoXjC6NYt9oSuZ42ApxG3qlwHKEPDwkrBSmNU/hgXDmBygmnFiJu7W/q8ulmtnsMH5AQ0bDFqHOXtR49HPphYrrS++oi3K1DDD5+ET2Lh17xUEOgtEe4BtiMQZeFJtHRicDVJd1V0IcXtaPNNtd22NLP7UFkoObeLF6OKsU7m+EkAMDj7D4MGWqmOLLh8wlL1WG9CrDbyFGUu7 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 13:55:36.9230 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: edd00353-1858-4d9a-5bb8-08d5671ff9d5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0075 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: Tom St Denis , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove redundant store of return code. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index fcd16804c738..b122f6eee94c 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c @@ -390,14 +390,12 @@ static void ttm_dma_page_put(struct dma_pool *pool, struct dma_page *d_page) { struct page *page = d_page->p; unsigned i, num_pages; - int ret; /* Don't set WB on WB page pool. */ if (!(pool->type & IS_CACHED)) { num_pages = pool->size / PAGE_SIZE; for (i = 0; i < num_pages; ++i, ++page) { - ret = set_pages_array_wb(&page, 1); - if (ret) { + if (set_pages_array_wb(&page, 1)) { pr_err("%s: Failed to set %d pages to wb!\n", pool->dev_name, 1); }