Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661946 > unrolled thread
| Started by | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| First post | 2017-06-09 08:00 +0200 |
| Last post | 2017-06-09 12:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] dell-rbtn: constify rfkill_ops structures Bhumika Goyal <bhumirks@gmail.com> - 2017-06-09 08:00 +0200
Re: [PATCH v2] dell-rbtn: constify rfkill_ops structures Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-09 12:30 +0200
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Date | 2017-06-09 08:00 +0200 |
| Subject | [PATCH v2] dell-rbtn: constify rfkill_ops structures |
| Message-ID | <tQl7I-60Z-17@gated-at.bofh.it> |
Add const to rfkill_ops structures that are only passed as an argument
to the functions rfkill_alloc or samsung_new_rfkill. These arguments are
of type const, so such structures can be annotated with const.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
Changes since v1:
* Split the changes to one patch per vendor.
drivers/platform/x86/dell-rbtn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/dell-rbtn.c b/drivers/platform/x86/dell-rbtn.c
index dcd9f40..6b5bbaf 100644
--- a/drivers/platform/x86/dell-rbtn.c
+++ b/drivers/platform/x86/dell-rbtn.c
@@ -110,7 +110,7 @@ static int rbtn_rfkill_set_block(void *data, bool blocked)
return -EINVAL;
}
-static struct rfkill_ops rbtn_ops = {
+static const struct rfkill_ops rbtn_ops = {
.query = rbtn_rfkill_query,
.set_block = rbtn_rfkill_set_block,
};
--
2.7.4
[toc] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-06-09 12:30 +0200 |
| Message-ID | <tQpl0-k7-7@gated-at.bofh.it> |
| In reply to | #1661946 |
On Fri, Jun 9, 2017 at 8:57 AM, Bhumika Goyal <bhumirks@gmail.com> wrote:
> Add const to rfkill_ops structures that are only passed as an argument
> to the functions rfkill_alloc or samsung_new_rfkill. These arguments are
> of type const, so such structures can be annotated with const.
>
All three pushed to testing, thanks
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
> Changes since v1:
> * Split the changes to one patch per vendor.
>
> drivers/platform/x86/dell-rbtn.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/dell-rbtn.c b/drivers/platform/x86/dell-rbtn.c
> index dcd9f40..6b5bbaf 100644
> --- a/drivers/platform/x86/dell-rbtn.c
> +++ b/drivers/platform/x86/dell-rbtn.c
> @@ -110,7 +110,7 @@ static int rbtn_rfkill_set_block(void *data, bool blocked)
> return -EINVAL;
> }
>
> -static struct rfkill_ops rbtn_ops = {
> +static const struct rfkill_ops rbtn_ops = {
> .query = rbtn_rfkill_query,
> .set_block = rbtn_rfkill_set_block,
> };
> --
> 2.7.4
>
--
With Best Regards,
Andy Shevchenko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web