From: Bhumika Goyal <bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: julia.lawall-L2FTfq7BK8M@public.gmane.org,
rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org,
lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
jbacik-b10kYP2dOMg@public.gmane.org,
jikos-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
benjamin.tissoires-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
manish.chopra-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
rahul.verma-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
Dept-GELinuxNICDev-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
harish.patil-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
cascardo-DmMZpsCg3uxeGPcbtGPokg@public.gmane.org,
don-rBL4DdiBytkIdKJ7tpkyPg@public.gmane.org,
dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
andy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
nbd-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Bhumika Goyal <bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 2/6] nbd: make device_attribute const
Date: Mon, 21 Aug 2017 17:13:08 +0530 [thread overview]
Message-ID: <1503315792-14837-3-git-send-email-bhumirks@gmail.com> (raw)
In-Reply-To: <1503315792-14837-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Make this const as is is only passed as an argument to the
function device_create_file and device_remove_file and the corresponding
arguments are of type const.
Done using Coccinelle
Signed-off-by: Bhumika Goyal <bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/block/nbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 5bdf923..49d7763 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -165,7 +165,7 @@ static ssize_t pid_show(struct device *dev,
return sprintf(buf, "%d\n", task_pid_nr(nbd->task_recv));
}
-static struct device_attribute pid_attr = {
+static const struct device_attribute pid_attr = {
.attr = { .name = "pid", .mode = S_IRUGO},
.show = pid_show,
};
--
1.9.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
next prev parent reply other threads:[~2017-08-21 11:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 11:43 [PATCH 0/6] drivers: make device_attribute const Bhumika Goyal
2017-08-21 11:43 ` [PATCH 1/6] ACPI: " Bhumika Goyal
2017-08-28 20:56 ` Rafael J. Wysocki
[not found] ` <1503315792-14837-1-git-send-email-bhumirks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-21 11:43 ` Bhumika Goyal [this message]
2017-08-28 21:21 ` [PATCH 2/6] nbd: " Jens Axboe
2017-08-21 11:43 ` [PATCH 3/6] hid: " Bhumika Goyal
2017-09-06 8:57 ` Jiri Kosina
2017-08-21 11:43 ` [PATCH 4/6] qlogic: " Bhumika Goyal
2017-08-21 17:25 ` David Miller
2017-08-21 17:26 ` Bhumika Goyal
2017-08-21 11:43 ` [PATCH 5/6] platform/x86: " Bhumika Goyal
2017-08-21 13:22 ` Thadeu Lima de Souza Cascardo
2017-08-30 19:18 ` Andy Shevchenko
2017-08-21 11:43 ` [PATCH 6/6] power: supply: " Bhumika Goyal
2017-08-29 8:44 ` Sebastian Reichel
2017-08-21 12:28 ` [PATCH 0/6] drivers: " Rafael J. Wysocki
2017-08-21 12:57 ` Bhumika Goyal
2017-08-21 12:55 ` Bhumika Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503315792-14837-3-git-send-email-bhumirks@gmail.com \
--to=bhumirks-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Dept-GELinuxNICDev-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=andy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=benjamin.tissoires-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=cascardo-DmMZpsCg3uxeGPcbtGPokg@public.gmane.org \
--cc=don-rBL4DdiBytkIdKJ7tpkyPg@public.gmane.org \
--cc=dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=harish.patil-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=jbacik-b10kYP2dOMg@public.gmane.org \
--cc=jikos-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=julia.lawall-L2FTfq7BK8M@public.gmane.org \
--cc=lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=manish.chopra-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=nbd-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rahul.verma-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
--cc=sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).