From patchwork Mon Jan 29 13:55:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "StDenis, Tom" X-Patchwork-Id: 10189753 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 B6FB76020C for ; Mon, 29 Jan 2018 13:56:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A375D28778 for ; Mon, 29 Jan 2018 13:56:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 976922879D; Mon, 29 Jan 2018 13:56:09 +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 4F52528778 for ; Mon, 29 Jan 2018 13:56:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 037436E4CD; Mon, 29 Jan 2018 13:55:36 +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-bl2nam02on0079.outbound.protection.outlook.com [104.47.38.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id AB6206E4BA; Mon, 29 Jan 2018 13:55:31 +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=Z4gOCFNa3wj0NA7eUkYnOqscW/0/qezfdBUNY8iBXtA=; b=5jDlDXY4YJYbEK+rW2iijs40Ab+BkXW5t+ECJ8XBDjGE2UNm+Vmcc6Z4B3HAvXJc1PM4pyMrytw7tyHzXYlgN5V/+4dvfoNuXpkjsyby0A2HUVXXeio8U4oFX4IRRbGcbjIvGKh5IsYAeDNXYAa2X4UNqdfRWtKi0RWGiRB7bqU= 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:29 +0000 From: Tom St Denis To: amd-gfx@lists.freedesktop.org Subject: [PATCH 05/12] drm/ttm: Fix coding style in ttm_pool_store() Date: Mon, 29 Jan 2018 08:55:06 -0500 Message-Id: <20180129135513.22538-6-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: 8bd9cea8-0f9b-42f3-b5ca-08d5671ff580 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-Diagnost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3Uk8erfQD3aoHGWlY8sXn5foZ35Wx9gCUuBDWCXSgxq87uU5lbV8bVU1gcVuRYJCcjUA5ZL1MfhQrKjqoYXKgyXGaSUovLIeukhovq6z6hbhUb0R40Qk2YNbQSyQF5TALaj4W53y8D5jYx9AD44z3iFIQARqEAYQz2kLRDwQAswjILhgv6ZFxn4/aoUZe7ElmdWtuRmgXnbLn4EQ5b+D6AZZxP9YWYL5tl1vzb5wRQ5pqZ5VBPxkcdWPiC5KO/1HJmdhMxKlokHYS3jUbGa/DpIg9DcUuThn7Ki5ER3IzmmCzUlcEYYWszTojur7VFMK7Zss9dz6F1sHp+yJzxqOAbaEY6Ii1/+aVYZN31atJ4gJ2C1uJFW3KXX8LT; 4:yx1ehKvaCXXIhOyp8jVXD9BnL4KXUBUULCMul7xt7cPfogh0EYv8fxS01eJhGzclinkk97ulk5nyzaskBay0sME5TcSmnzqTlw1xUzwhLteURowoYIp1yD0IkbIMjBRQCTSLo4Um/YIfUyyD/AS8ZlY3Cdf56sTSlLZ4+0Ibp79/+faF8PD1fdQJTdFOQT4NNyXwGUgiQ+PD44r2snUvhRwzGGK+RuQEjst8kRFIboXq2FRHopknvxDewApNjH1kX68isIo95j4q4rXEJ7aWDY9sbF9ypqAeY+WIBDVsbkKWidT4jflZacxEQw+eUp4b 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)(575784001)(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?MTtETTVQUjEyMDFNQjAwNzU7MjM6ZFBVYmg0QVBlUzIrTDNpZ01IdlQ4NEJN?= =?utf-8?B?aDhZTWVUNWRQeVRzKzk4bHZXOGpQQjhEYmdvdGJZQkkxZlhqcXMzYXZmN2Ft?= =?utf-8?B?bWpNM0VCVDUzM1ZrbUl2Z0xHRFh3YXJTZHBsaUZTRzlNMCthSHZWM0UzRk9l?= =?utf-8?B?RXJiZ0E3cmR2RE5OTFBHTFFPT054Qk4zVm9TSFpiekI2N2d1RTVRSSs3MW9j?= =?utf-8?B?V1hPTDFMMHBwdjY3YURQRVY3VXhEU28rM0lVOFVDa1JYZythWnBuVmx1R3Bz?= =?utf-8?B?dTRIS2F6UHdodmhnbWRYNEhrbTBPVVV5eER3K25LRHBpNnR1MmU5bnpnVmJ4?= =?utf-8?B?d1RETlMrZlVQU3ZhQnQ3OWdTSDI3S3l0Q2g1K05EbitCc1RhV29EOGRUdkI1?= =?utf-8?B?Z2haVXJpbDUrOUZ5a21HZFBDL3IwT3l0SUliNzFjWXFMaFpOQ1ZWMDl3S0lV?= =?utf-8?B?by9MMWVjcVRZRzNwSmxhNnljM0w1Mk5IYVUybW1vRWxubGRPRHdTR05rVm9F?= =?utf-8?B?czh1ZDB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4fH+i9DWSGjjMND06Gnsga1VbbO9Wgnc6FItmD0KwaebyV3lt/Avu/sQgAUQi05fy2OVfItWtBTFcQorZfaYYessxQd74YFHzmmLaZCs+hUvgIfzDZR+va5fY7FC8dzv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0075; 20:Cf+FlXvXI6K7CTAx1QrPVQXhm10pDsLveYgbl6KKytXc2d23s/0dpeiNaFSDFzJu652jxhbfpEfeI4ewPKl0XrEnCfinvCenkKzNVTkB6lhLVu3LnEGE8U+JurKNuwfM+svYP3jtHWgEEhCHgWnnUH9L+srV0dFPuHWmBuaISXSb7vkHECwWQP8Fe6UDR7666ZNxbaL/oBCt9u6yPmEKI6LBLPCZOpMpDnuTPbbU6MjzyQSUwGLHKTFZfE26x9EC X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 13:55:29.6574 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8bd9cea8-0f9b-42f3-b5ca-08d5671ff580 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 Correct missing {} style. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 7 ++++--- 1 file changed, 4 insertions(+), 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 9e90d0ebc773..647eb5f40ab9 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c @@ -210,6 +210,7 @@ static ssize_t ttm_pool_store(struct kobject *kobj, struct attribute *attr, container_of(kobj, struct ttm_pool_manager, kobj); int chars; unsigned val; + chars = sscanf(buffer, "%u", &val); if (chars == 0) return size; @@ -217,11 +218,11 @@ static ssize_t ttm_pool_store(struct kobject *kobj, struct attribute *attr, /* Convert kb to number of pages */ val = val / (PAGE_SIZE >> 10); - if (attr == &ttm_page_pool_max) + if (attr == &ttm_page_pool_max) { m->options.max_size = val; - else if (attr == &ttm_page_pool_small) + } else if (attr == &ttm_page_pool_small) { m->options.small = val; - else if (attr == &ttm_page_pool_alloc_size) { + } else if (attr == &ttm_page_pool_alloc_size) { if (val > NUM_PAGES_TO_ALLOC*8) { pr_err("Setting allocation size to %lu is not allowed. Recommended size is %lu\n", NUM_PAGES_TO_ALLOC*(PAGE_SIZE >> 7),