8000 Avoid redundant/conflicting casts · v4l2loopback/v4l2loopback@eaaf71b · GitHub
[go: up one dir, main page]

Skip to content

Commit eaaf71b

Browse files
BenBEumlaeute
authored andcommitted
Avoid redundant/conflicting casts
Signed-off-by: Benny Baumann <BenBE@geshi.org>
1 parent f0d97f7 commit eaaf71b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

v4l2loopback.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,7 @@ static struct vm_operations_struct vm_ops = {
18671867

18681868
static int v4l2_loopback_mmap(struct file *file, struct vm_area_struct *vma)
18691869
{
1870-
unsigned long addr;
1870+
u8 *addr;
18711871
unsigned long start;
18721872
unsigned long size;
18731873
struct v4l2_loopback_device *dev;
@@ -1905,7 +1905,7 @@ static int v4l2_loopback_mmap(struct file *file, struct vm_area_struct *vma)
19051905

19061906
if (opener->timeout_image_io) {
19071907
buffer = &dev->timeout_image_buffer;
1908-
addr = (unsigned long)dev->timeout_image;
1908+
addr = dev->timeout_image;
19091909
} else {
19101910
int i;
19111911
for (i = 0; i < dev->buffers_number; ++i) {
@@ -1918,14 +1918,13 @@ static int v4l2_loopback_mmap(struct file *file, struct vm_area_struct *vma)
19181918
if (NULL == buffer)
19191919
return -EINVAL;
19201920

1921-
addr = (unsigned long)dev->image +
1922-
(vma->vm_pgoff << PAGE_SHIFT);
1921+
addr = dev->image + (vma->vm_pgoff << PAGE_SHIFT);
19231922
}
19241923

19251924
while (size > 0) {
19261925
struct page *page;
19271926

1928-
page = (void *)vmalloc_to_page((void *)addr);
1927+
page = vmalloc_to_page(addr);
19291928

19301929
if (vm_insert_page(vma, start, page) < 0)
19311930
return -EAGAIN;

0 commit comments

Comments
 (0)
0