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


Groups > linux.kernel > #1702345 > unrolled thread

[PATCH 2/2] qlcnic: add const to bin_attribute structure

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-08-02 20:00 +0200
Last post2017-08-03 18:30 +0200
Articles 3 — 3 participants

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 2/2] qlcnic: add const to bin_attribute structure Bhumika Goyal <bhumirks@gmail.com> - 2017-08-02 20:00 +0200
    Re: [PATCH 2/2] qlcnic: add const to bin_attribute structure "Patil, Harish" <Harish.Patil@cavium.com> - 2017-08-03 05:30 +0200
    Re: [PATCH 2/2] qlcnic: add const to bin_attribute structure David Miller <davem@davemloft.net> - 2017-08-03 18:30 +0200

#1702345 — [PATCH 2/2] qlcnic: add const to bin_attribute structure

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-02 20:00 +0200
Subject[PATCH 2/2] qlcnic: add const to bin_attribute structure
Message-ID<ua666-4EJ-17@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1702657

From"Patil, Harish" <Harish.Patil@cavium.com>
Date2017-08-03 05:30 +0200
Message-ID<uaeZJ-2uR-5@gated-at.bofh.it>
In reply to#1702345
-----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>

[toc] | [prev] | [next] | [standalone]


#1703255

FromDavid Miller <davem@davemloft.net>
Date2017-08-03 18:30 +0200
Message-ID<uaraz-2uN-31@gated-at.bofh.it>
In reply to#1702345
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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web