[PATCH v3] Add mmap

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jul 17 07:14:42 UTC 2019


On 17/07/2019 09:02, Vijay Kumar Banerjee wrote:
> +static int
> +testmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr,
> +         int nprot, vm_memattr_t *memattr)
> +{
> +	test_state *state = dev->si_drv1;
> +

Please add assertions for all parameters.

> +	assert(*state == TEST_KQFILTER);
> +	*state = TEST_MMAP;
> +
> +	return 0;
> +}

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list