I have read that, the read function of a character device driver looks like

```
static ssize_t device_read(struct file *filp,   /* see include/linux/fs.h   */
               char *buffer,    /* buffer to fill with data */
               size_t length,   /* length of the buffer     */
               loff_t * offset)

```

My questions are

1. These parameters are mandatory?
2. Couldn't see \*filp and \*offset used in the [sample driver](http://linux.die.net/lkmpg/x569.html). what is the use of that ?
3. Where do the data for \*buffer and \*length actually come from? In the code it is said that buffer is in the user data segment. What does it mean actually?