Skip to content

Commit

Permalink
Staging: android: ion: Make a read-only structure
Browse files Browse the repository at this point in the history
This patch add const qualifier at the declaration of the structure.
The structure become a read-only data, this increase the security.

Found with Coccinelle:
@r disable optional_qualifier@
identifier s,i;
@@
* static struct s i ={...};

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Mihaela Muraru authored and Greg Kroah-Hartman committed Oct 24, 2016
1 parent 9fdd532 commit a0f204a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/android/ion/ion_dummy_driver.c
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ static struct ion_platform_heap dummy_heaps[] = {
},
};

static struct ion_platform_data dummy_ion_pdata = {
static const struct ion_platform_data dummy_ion_pdata = {
.nr = ARRAY_SIZE(dummy_heaps),
.heaps = dummy_heaps,
};

0 comments on commit a0f204a

Please sign in to comment.