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


Groups > linux.kernel > #1702234 > unrolled thread

[PATCH 1/2] s390/sclp: add const to bin_attribute structure

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-08-02 18:10 +0200
Last post2017-08-02 18:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#1702234 — [PATCH 1/2] s390/sclp: add const to bin_attribute structure

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-02 18:10 +0200
Subject[PATCH 1/2] s390/sclp: add const to bin_attribute structure
Message-ID<ua4nH-3Eo-69@gated-at.bofh.it>
Declare bin_attribute structure as const as it is only passed as an
argument to the function sysfs_create_bin_file. This argument is of
type const, so declare the structure as const.

Cross compiled for s390 architecture.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/s390/char/sclp_config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/char/sclp_config.c b/drivers/s390/char/sclp_config.c
index 1406fb6..7003d52 100644
--- a/drivers/s390/char/sclp_config.c
+++ b/drivers/s390/char/sclp_config.c
@@ -135,7 +135,7 @@ static ssize_t sysfs_ofb_data_write(struct file *filp, struct kobject *kobj,
 	return rc ?: count;
 }
 
-static struct bin_attribute ofb_bin_attr = {
+static const struct bin_attribute ofb_bin_attr = {
 	.attr = {
 		.name = "event_data",
 		.mode = S_IWUSR,
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web