Skip to content

Commit c89db7b

Browse files
author
Stefan Richter
committed
firewire: nosy: annotate __user pointers and __iomem pointers
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
1 parent 424d66c commit c89db7b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/firewire/nosy.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ struct packet_buffer {
9595

9696
struct pcilynx {
9797
struct pci_dev *pci_device;
98-
unsigned char *registers;
98+
__iomem char *registers;
9999

100100
struct pcl *rcv_start_pcl, *rcv_pcl;
101101
u32 *rcv_buffer;
@@ -163,7 +163,7 @@ packet_buffer_destroy(struct packet_buffer *buffer)
163163
}
164164

165165
static int
166-
packet_buffer_get(struct client *client, void *data, size_t user_length)
166+
packet_buffer_get(struct client *client, char __user *data, size_t user_length)
167167
{
168168
struct packet_buffer *buffer = &client->buffer;
169169
size_t length;
@@ -362,7 +362,7 @@ nosy_poll(struct file *file, poll_table *pt)
362362
}
363363

364364
static ssize_t
365-
nosy_read(struct file *file, char *buffer, size_t count, loff_t *offset)
365+
nosy_read(struct file *file, char __user *buffer, size_t count, loff_t *offset)
366366
{
367367
struct client *client = file->private_data;
368368

@@ -383,7 +383,7 @@ nosy_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
383383
stats.lost_packet_count = client->buffer.lost_packet_count;
384384
spin_unlock_irq(client_list_lock);
385385

386-
if (copy_to_user((void *) arg, &stats, sizeof stats))
386+
if (copy_to_user((void __user *) arg, &stats, sizeof stats))
387387
return -EFAULT;
388388
else
389389
return 0;

0 commit comments

Comments
 (0)