Skip to content

Commit

Permalink
drm/i915: add const to bin_attribute
Browse files Browse the repository at this point in the history
Add const to bin_attribute structures as they are only passed to the
functions sysfs_{remove/create}_bin_file or
device_{remove/create}_bin_file. The corresponding arguments are of
type const, so declare the structures to be const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1501694447-14356-1-git-send-email-bhumirks@gmail.com
  • Loading branch information
Bhumika Goyal authored and Daniel Vetter committed Aug 3, 2017
1 parent 09a92bc commit 59f3da1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/i915_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ i915_l3_write(struct file *filp, struct kobject *kobj,
return ret;
}

static struct bin_attribute dpf_attrs = {
static const struct bin_attribute dpf_attrs = {
.attr = {.name = "l3_parity", .mode = (S_IRUSR | S_IWUSR)},
.size = GEN7_L3LOG_SIZE,
.read = i915_l3_read,
Expand All @@ -229,7 +229,7 @@ static struct bin_attribute dpf_attrs = {
.private = (void *)0
};

static struct bin_attribute dpf_attrs_1 = {
static const struct bin_attribute dpf_attrs_1 = {
.attr = {.name = "l3_parity_slice_1", .mode = (S_IRUSR | S_IWUSR)},
.size = GEN7_L3LOG_SIZE,
.read = i915_l3_read,
Expand Down Expand Up @@ -532,7 +532,7 @@ static ssize_t error_state_write(struct file *file, struct kobject *kobj,
return count;
}

static struct bin_attribute error_state_attr = {
static const struct bin_attribute error_state_attr = {
.attr.name = "error",
.attr.mode = S_IRUSR | S_IWUSR,
.size = 0,
Expand Down

0 comments on commit 59f3da1

Please sign in to comment.