* [PATCH 0/2] drivers/net: add const to bin_attribute structures @ 2017-08-02 17:57 Bhumika Goyal 2017-08-02 17:57 ` [PATCH 1/2] wlcore: add const to bin_attribute structure Bhumika Goyal 2017-08-02 17:57 ` [PATCH 2/2] qlcnic: " Bhumika Goyal 0 siblings, 2 replies; 6+ messages in thread From: Bhumika Goyal @ 2017-08-02 17:57 UTC (permalink / raw) To: julia.lawall, kvalo, linux-wireless, netdev, linux-kernel, harish.patil, manish.chopra, Dept-GELinuxNICDev Cc: Bhumika Goyal Declare bin_attribute structures as const. Bhumika Goyal (2): wlcore: add const to bin_attribute structure qlcnic: add const to bin_attribute structure drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 2 +- drivers/net/wireless/ti/wlcore/sysfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] wlcore: add const to bin_attribute structure 2017-08-02 17:57 [PATCH 0/2] drivers/net: add const to bin_attribute structures Bhumika Goyal @ 2017-08-02 17:57 ` Bhumika Goyal 2017-08-08 11:52 ` [1/2] " Kalle Valo 2017-08-02 17:57 ` [PATCH 2/2] qlcnic: " Bhumika Goyal 1 sibling, 1 reply; 6+ messages in thread From: Bhumika Goyal @ 2017-08-02 17:57 UTC (permalink / raw) To: julia.lawall, kvalo, linux-wireless, netdev, linux-kernel, harish.patil, manish.chopra, Dept-GELinuxNICDev Cc: Bhumika Goyal Add const to bin_attribute structure as it is only passed to the functions sysfs_{remove/create}_bin_file. The corresponding arguments are of type const, so declare the structure to be const. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> --- drivers/net/wireless/ti/wlcore/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ti/wlcore/sysfs.c b/drivers/net/wireless/ti/wlcore/sysfs.c index a9218e5..b72e210 100644 --- a/drivers/net/wireless/ti/wlcore/sysfs.c +++ b/drivers/net/wireless/ti/wlcore/sysfs.c @@ -138,7 +138,7 @@ static ssize_t wl1271_sysfs_read_fwlog(struct file *filp, struct kobject *kobj, return len; } -static struct bin_attribute fwlog_attr = { +static const struct bin_attribute fwlog_attr = { .attr = {.name = "fwlog", .mode = S_IRUSR}, .read = wl1271_sysfs_read_fwlog, }; -- 1.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [1/2] wlcore: add const to bin_attribute structure 2017-08-02 17:57 ` [PATCH 1/2] wlcore: add const to bin_attribute structure Bhumika Goyal @ 2017-08-08 11:52 ` Kalle Valo 0 siblings, 0 replies; 6+ messages in thread From: Kalle Valo @ 2017-08-08 11:52 UTC (permalink / raw) To: Bhumika Goyal Cc: julia.lawall, linux-wireless, netdev, linux-kernel, harish.patil, manish.chopra, Dept-GELinuxNICDev, Bhumika Goyal Bhumika Goyal <bhumirks@gmail.com> wrote: > Add const to bin_attribute structure as it is only passed to the > functions sysfs_{remove/create}_bin_file. The corresponding arguments > are of type const, so declare the structure to be const. > > Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Patch applied to wireless-drivers-next.git, thanks. 4f2949febc22 wlcore: add const to bin_attribute structure -- https://patchwork.kernel.org/patch/9877341/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] qlcnic: add const to bin_attribute structure 2017-08-02 17:57 [PATCH 0/2] drivers/net: add const to bin_attribute structures Bhumika Goyal 2017-08-02 17:57 ` [PATCH 1/2] wlcore: add const to bin_attribute structure Bhumika Goyal @ 2017-08-02 17:57 ` Bhumika Goyal 2017-08-03 3:24 ` Patil, Harish 2017-08-03 16:29 ` David Miller 1 sibling, 2 replies; 6+ messages in thread From: Bhumika Goyal @ 2017-08-02 17:57 UTC (permalink / raw) To: julia.lawall, kvalo, linux-wireless, netdev, linux-kernel, harish.patil, manish.chopra, Dept-GELinuxNICDev Cc: Bhumika Goyal Add const to bin_attribute structure as it is only passed to the functions sysfs_{remove/create}_bin_file. The corresponding arguments are of type const, so declare the structure to be const. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c index 73027a6..82fcb83 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c @@ -1248,7 +1248,7 @@ static ssize_t qlcnic_83xx_sysfs_flash_write_handler(struct file *filp, .write = qlcnic_sysfs_write_pm_config, }; -static struct bin_attribute bin_attr_flash = { +static const struct bin_attribute bin_attr_flash = { .attr = {.name = "flash", .mode = (S_IRUGO | S_IWUSR)}, .size = 0, .read = qlcnic_83xx_sysfs_flash_read_handler, -- 1.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] qlcnic: add const to bin_attribute structure 2017-08-02 17:57 ` [PATCH 2/2] qlcnic: " Bhumika Goyal @ 2017-08-03 3:24 ` Patil, Harish 2017-08-03 16:29 ` David Miller 1 sibling, 0 replies; 6+ messages in thread From: Patil, Harish @ 2017-08-03 3:24 UTC (permalink / raw) To: Bhumika Goyal, julia.lawall@lip6.fr, kvalo@codeaurora.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chopra, Manish, Dept-GE Linux NIC Dev -----Original Message----- From: Bhumika Goyal <bhumirks@gmail.com> Date: Wednesday, August 2, 2017 at 11:27 PM To: "julia.lawall@lip6.fr" <julia.lawall@lip6.fr>, "kvalo@codeaurora.org" <kvalo@codeaurora.org>, "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Harish Patil <Harish.Patil@cavium.com>, "Chopra, Manish" <Manish.Chopra@cavium.com>, Dept-GE Linux NIC Dev <Dept-GELinuxNICDev@cavium.com> Cc: Bhumika Goyal <bhumirks@gmail.com> Subject: [PATCH 2/2] qlcnic: add const to bin_attribute structure >Add const to bin_attribute structure as it is only passed to the >functions sysfs_{remove/create}_bin_file. The corresponding >arguments are of type const, so declare the structure to be const. > >Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> >--- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c >b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c >index 73027a6..82fcb83 100644 >--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c >+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c >@@ -1248,7 +1248,7 @@ static ssize_t >qlcnic_83xx_sysfs_flash_write_handler(struct file *filp, > .write = qlcnic_sysfs_write_pm_config, > }; > >-static struct bin_attribute bin_attr_flash = { >+static const struct bin_attribute bin_attr_flash = { > .attr = {.name = "flash", .mode = (S_IRUGO | S_IWUSR)}, > .size = 0, > .read = qlcnic_83xx_sysfs_flash_read_handler, >-- >1.9.1 > >Acked-by: Harish Patil <harish.patil@cavium.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] qlcnic: add const to bin_attribute structure 2017-08-02 17:57 ` [PATCH 2/2] qlcnic: " Bhumika Goyal 2017-08-03 3:24 ` Patil, Harish @ 2017-08-03 16:29 ` David Miller 1 sibling, 0 replies; 6+ messages in thread From: David Miller @ 2017-08-03 16:29 UTC (permalink / raw) To: bhumirks Cc: julia.lawall, kvalo, linux-wireless, netdev, linux-kernel, harish.patil, manish.chopra, Dept-GELinuxNICDev From: Bhumika Goyal <bhumirks@gmail.com> Date: Wed, 2 Aug 2017 23:27:14 +0530 > Add const to bin_attribute structure as it is only passed to the > functions sysfs_{remove/create}_bin_file. The corresponding > arguments are of type const, so declare the structure to be const. > > Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Applied. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-08 11:52 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-08-02 17:57 [PATCH 0/2] drivers/net: add const to bin_attribute structures Bhumika Goyal 2017-08-02 17:57 ` [PATCH 1/2] wlcore: add const to bin_attribute structure Bhumika Goyal 2017-08-08 11:52 ` [1/2] " Kalle Valo 2017-08-02 17:57 ` [PATCH 2/2] qlcnic: " Bhumika Goyal 2017-08-03 3:24 ` Patil, Harish 2017-08-03 16:29 ` David Miller
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).