Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1702220

[PATCH 2/2] s390/cio: add const to bin_attribute structures

From Bhumika Goyal <bhumirks@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] s390/cio: add const to bin_attribute structures
Date 2017-08-02 18:10 +0200
Message-ID <ua4nF-3Eo-33@gated-at.bofh.it> (permalink)
References <ua4nF-3Eo-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Add const to bin_attribute structures as they are only passed to the
functions device_{remove/create}_bin_file. The corresponding arguments
are of type const, so declare the structures to be const.

Cross compiled for s390 architecture.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/s390/cio/chp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index 432fc40..f4166f8 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -143,7 +143,7 @@ static ssize_t chp_measurement_chars_read(struct file *filp,
 				       sizeof(chp->cmg_chars));
 }
 
-static struct bin_attribute chp_measurement_chars_attr = {
+static const struct bin_attribute chp_measurement_chars_attr = {
 	.attr = {
 		.name = "measurement_chars",
 		.mode = S_IRUSR,
@@ -197,7 +197,7 @@ static ssize_t chp_measurement_read(struct file *filp, struct kobject *kobj,
 	return count;
 }
 
-static struct bin_attribute chp_measurement_attr = {
+static const struct bin_attribute chp_measurement_attr = {
 	.attr = {
 		.name = "measurement",
 		.mode = S_IRUSR,
-- 
1.9.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 2/2] s390/cio: add const to bin_attribute structures Bhumika Goyal <bhumirks@gmail.com> - 2017-08-02 18:10 +0200

csiph-web