12 Jan, 2017
3 commits
-
We set info.count to 1 in mtty_get_irq_info() so static checkers
complain that, "Why do we have impossible conditions?" The answer is
that it seems to be left over dead code that can be safely removed.Signed-off-by: Dan Carpenter
Reviewed-by: Kirti Wankhede
Signed-off-by: Alex Williamson -
This is a sample driver for documentation so the impact is probably
pretty low. But we should check that bar_index is valid so we
don't write beyond the end of the mdev_state->region_info[] array.Fixes: 9d1a546c53b4 ("docs: Sample driver to demonstrate how to use Mediated device framework.")
Signed-off-by: Dan Carpenter
Reviewed-by: Kirti Wankhede
Signed-off-by: Alex Williamson -
The copy_to_user() function returns the number of bytes which it wasn't
able to copy but we want to return a negative error code.Fixes: 9d1a546c53b4 ("docs: Sample driver to demonstrate how to use Mediated device framework.")
Signed-off-by: Dan Carpenter
Reviewed-by: Kirti Wankhede
Signed-off-by: Alex Williamson
04 Jan, 2017
1 commit
-
This is just sample code. We forget to set the error codes in a couple
places.Signed-off-by: Dan Carpenter
Reported-by: Alexey Khoroshilov
Signed-off-by: Alex Williamson
30 Dec, 2016
4 commits
-
Abstract access to mdev_device so that we can define which interfaces
are public rather than relying on comments in the structure.Cc: Zhenyu Wang
Cc: Zhi Wang
Signed-off-by: Alex Williamson
Reviewed-by: Jike Song
Reviewed by: Kirti Wankhede -
Rather than hoping for good behavior by marking some elements
internal, enforce it by making the entire structure private and
creating an accessor function for the one useful external field.Cc: Zhenyu Wang
Cc: Zhi Wang
Cc: Jike Song
Signed-off-by: Alex Williamson
Reviewed by: Kirti Wankhede -
Add an mdev_ prefix so we're not poluting the namespace so much.
Cc: Zhenyu Wang
Cc: Zhi Wang
Cc: Jike Song
Signed-off-by: Alex Williamson
Reviewed by: Kirti Wankhede -
This sample driver was originally under Documentation/ and was moved
to samples, but build support was never adjusted for the new location.Signed-off-by: Alex Williamson
Reviewed-by: Eric Auger
Tested-by: Eric Auger
Reviewed-by: Kirti Wankhede
18 Nov, 2016
1 commit
-
The Sample driver creates mdev device that simulates serial port over PCI
card.Signed-off-by: Kirti Wankhede
Signed-off-by: Neo Jia
Signed-off-by: Alex Williamson