aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2018-01-25 13:35:56 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-02-19 14:18:58 -0500
commitc68edaa0c1ed0cfc33229a0a72c9aa76f8f80da2 (patch)
treee808f2d7a2cf2f45f30e597da1beb1910973e5ff /drivers/gpu/drm/ttm
parentdrm/ttm: Change ttm_tt page allocations to return errors (diff)
downloadlinux-dev-c68edaa0c1ed0cfc33229a0a72c9aa76f8f80da2.tar.xz
linux-dev-c68edaa0c1ed0cfc33229a0a72c9aa76f8f80da2.zip
drm/ttm: Fix coding style in ttm_pool_store()
Correct missing {} style. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_page_alloc_dma.c7
1 files 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),