Skip to content

Commit 9516b03

Browse files
committed
agp: more boolean conversions.
Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent c725801 commit 9516b03

6 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎drivers/char/agp/compat_ioctl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ long compat_agp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
214214
ret_val = -EINVAL;
215215
goto ioctl_out;
216216
}
217-
if ((agp_fe.backend_acquired != TRUE) &&
217+
if ((agp_fe.backend_acquired != true) &&
218218
(cmd != AGPIOC_ACQUIRE32)) {
219219
ret_val = -EBUSY;
220220
goto ioctl_out;

‎drivers/char/agp/frontend.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ static int agp_remove_controller(struct agp_controller *controller)
395395

396396
if (agp_fe.current_controller == controller) {
397397
agp_fe.current_controller = NULL;
398-
agp_fe.backend_acquired = FALSE;
398+
agp_fe.backend_acquired = false;
399399
agp_backend_release(agp_bridge);
400400
}
401401
kfree(controller);
@@ -443,7 +443,7 @@ static void agp_controller_release_current(struct agp_controller *controller,
443443
}
444444

445445
agp_fe.current_controller = NULL;
446-
agp_fe.used_by_controller = FALSE;
446+
agp_fe.used_by_controller = false;
447447
agp_backend_release(agp_bridge);
448448
}
449449

@@ -573,7 +573,7 @@ static int agp_mmap(struct file *file, struct vm_area_struct *vma)
573573

574574
mutex_lock(&(agp_fe.agp_mutex));
575575

576-
if (agp_fe.backend_acquired != TRUE)
576+
if (agp_fe.backend_acquired != true)
577577
goto out_eperm;
578578

579579
if (!(test_bit(AGP_FF_IS_VALID, &priv->access_flags)))
@@ -768,7 +768,7 @@ int agpioc_acquire_wrap(struct agp_file_private *priv)
768768

769769
atomic_inc(&agp_bridge->agp_in_use);
770770

771-
agp_fe.backend_acquired = TRUE;
771+
agp_fe.backend_acquired = true;
772772

773773
controller = agp_find_controller_by_pid(priv->my_pid);
774774

@@ -778,7 +778,7 @@ int agpioc_acquire_wrap(struct agp_file_private *priv)
778778
controller = agp_create_controller(priv->my_pid);
779779

780780
if (controller == NULL) {
781-
agp_fe.backend_acquired = FALSE;
781+
agp_fe.backend_acquired = false;
782782
agp_backend_release(agp_bridge);
783783
return -ENOMEM;
784784
}
@@ -981,7 +981,7 @@ static long agp_ioctl(struct file *file,
981981
ret_val = -EINVAL;
982982
goto ioctl_out;
983983
}
984-
if ((agp_fe.backend_acquired != TRUE) &&
984+
if ((agp_fe.backend_acquired != true) &&
985985
(cmd != AGPIOC_ACQUIRE)) {
986986
ret_val = -EBUSY;
987987
goto ioctl_out;

‎drivers/char/agp/generic.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ EXPORT_SYMBOL(agp_flush_chipset);
9696
void agp_alloc_page_array(size_t size, struct agp_memory *mem)
9797
{
9898
mem->memory = NULL;
99-
mem->vmalloc_flag = 0;
99+
mem->vmalloc_flag = false;
100100

101101
if (size <= 2*PAGE_SIZE)
102102
mem->memory = kmalloc(size, GFP_KERNEL | __GFP_NORETRY);
103103
if (mem->memory == NULL) {
104104
mem->memory = vmalloc(size);
105-
mem->vmalloc_flag = 1;
105+
mem->vmalloc_flag = true;
106106
}
107107
}
108108
EXPORT_SYMBOL(agp_alloc_page_array);

‎drivers/char/agp/intel-agp.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ static int intel_i810_insert_entries(struct agp_memory *mem, off_t pg_start,
325325
out:
326326
ret = 0;
327327
out_err:
328-
mem->is_flushed = 1;
328+
mem->is_flushed = true;
329329
return ret;
330330
}
331331

@@ -795,7 +795,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem, off_t pg_start,
795795
out:
796796
ret = 0;
797797
out_err:
798-
mem->is_flushed = 1;
798+
mem->is_flushed = true;
799799
return ret;
800800
}
801801

@@ -1022,7 +1022,7 @@ static int intel_i915_insert_entries(struct agp_memory *mem, off_t pg_start,
10221022
out:
10231023
ret = 0;
10241024
out_err:
1025-
mem->is_flushed = 1;
1025+
mem->is_flushed = true;
10261026
return ret;
10271027
}
10281028

‎include/linux/agp_backend.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct agp_memory {
7777
u32 physical;
7878
bool is_bound;
7979
bool is_flushed;
80-
u8 vmalloc_flag;
80+
bool vmalloc_flag;
8181
};
8282

8383
#define AGP_NORMAL_MEMORY 0

‎include/linux/agpgart.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ struct agp_front_data {
206206
struct agp_controller *current_controller;
207207
struct agp_controller *controllers;
208208
struct agp_file_private *file_priv_list;
209-
u8 used_by_controller;
210-
u8 backend_acquired;
209+
bool used_by_controller;
210+
bool backend_acquired;
211211
};
212212

213213
#endif /* __KERNEL__ */

0 commit comments

Comments
 (0)