Make these const as they are 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 <redacted>
---
drivers/acpi/battery.c | 2 +-
drivers/acpi/sbs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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 <redacted>
---
drivers/block/nbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
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
Make this const as it 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 <redacted>
---
drivers/hid/hid-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Make these const as they are 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 <redacted>
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 ++--
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
Make these const as they are 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 <redacted>
---
drivers/platform/x86/classmate-laptop.c | 6 +++---
drivers/platform/x86/intel-rst.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
Make these const as they are 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 <redacted>
---
drivers/power/supply/olpc_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: "Rafael J. Wysocki" <rafael@kernel.org> Date: 2017-08-21 12:28:35
On Mon, Aug 21, 2017 at 1:43 PM, Bhumika Goyal [off-list ref] wrote:
Make these const. Done using Coccinelle.
@match disable optional_qualifier@
identifier s;
@@
static struct device_attribute s = {...};
@ref@
position p;
identifier match.s;
@@
s@p
@good1@
identifier match.s;
expression e1;
position ref.p;
@@
device_remove_file(e1,&s@p,...)
@good2@
identifier match.s;
expression e1;
position ref.p;
@@
device_create_file(e1,&s@p,...)
@bad depends on !good1 && !good2@
position ref.p;
identifier match.s;
@@
s@p
@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct device_attribute s;
Bhumika Goyal (6):
ACPI: make device_attribute const
nbd: make device_attribute const
hid: make device_attribute const
qlogic: make device_attribute const
platform/x86: make device_attribute const
power: supply: make device_attribute const
It would be better to send these patches separately, because they
touch code maintained by different people and I guess no one will take
the whole series.
I'll take care of the ACPI one, but the rest needs to go in via their
proper trees.
Thanks,
Rafael
On Mon, Aug 21, 2017 at 5:58 PM, Rafael J. Wysocki [off-list ref] wrote:
On Mon, Aug 21, 2017 at 1:43 PM, Bhumika Goyal [off-list ref] wrote:
quoted
Make these const. Done using Coccinelle.
@match disable optional_qualifier@
identifier s;
@@
static struct device_attribute s = {...};
@ref@
position p;
identifier match.s;
@@
s@p
@good1@
identifier match.s;
expression e1;
position ref.p;
@@
device_remove_file(e1,&s@p,...)
@good2@
identifier match.s;
expression e1;
position ref.p;
@@
device_create_file(e1,&s@p,...)
@bad depends on !good1 && !good2@
position ref.p;
identifier match.s;
@@
s@p
@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct device_attribute s;
Bhumika Goyal (6):
ACPI: make device_attribute const
nbd: make device_attribute const
hid: make device_attribute const
qlogic: make device_attribute const
platform/x86: make device_attribute const
power: supply: make device_attribute const
It would be better to send these patches separately, because they
touch code maintained by different people and I guess no one will take
the whole series.
I'll take care of the ACPI one, but the rest needs to go in via their
proper trees.
Thanks for the note. From now onwards, I will send it separately
depending on the maintainers. But is possible please consider it this
time.
Thanks,
Bhumika
Make these const as they are 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 <redacted>
Applied.
But I would seriously suggest that when you have to cross subsystems
like this, just send the patches individually to the respective
maintainers rather than trying to make a "series" out of it.
Thanks.
Make these const as they are 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 <redacted>
Applied.
But I would seriously suggest that when you have to cross subsystems
like this, just send the patches individually to the respective
maintainers rather than trying to make a "series" out of it.
Yes, noted. Thanks for the pointer.
Thanks,
Bhumika
From: Rafael J. Wysocki <hidden> Date: 2017-08-28 21:04:50
On Monday, August 21, 2017 1:43:07 PM CEST Bhumika Goyal wrote:
quoted hunk
Make these const as they are 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 <redacted>
---
drivers/acpi/battery.c | 2 +-
drivers/acpi/sbs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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
From: Sebastian Reichel <hidden> Date: 2017-08-29 08:44:29
Hi,
On Mon, Aug 21, 2017 at 05:13:12PM +0530, Bhumika Goyal wrote:
Make these const as they are 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 <redacted>
---
From: Andy Shevchenko <hidden> Date: 2017-08-30 19:18:34
On Mon, Aug 21, 2017 at 2:43 PM, Bhumika Goyal [off-list ref] wrote:
Make these const as they are 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
Make this const as it 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 <redacted>
---
drivers/hid/hid-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)