2020-02-08 18:44:41

by Tomas Winkler

[permalink] [raw]
Subject: [PATCH 1/2 V2] mfd: constify properties in mfd_cell

Constify 'struct property_entry *properties' in
mfd_cell It is always passed
around as a pointer const struct.

Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
---

V2: drop platform_device part

include/linux/mfd/core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index d01d1299e49d..7e5ac3c00891 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -70,7 +70,7 @@ struct mfd_cell {
size_t pdata_size;

/* device properties passed to the sub devices drivers */
- struct property_entry *properties;
+ const struct property_entry *properties;

/*
* Device Tree compatible string
--
2.21.1


2020-02-08 18:45:07

by Tomas Winkler

[permalink] [raw]
Subject: [PATCH 2/2] platform: constify properties in platform_device

Constify 'struct property_entry *properties' in
platform_device. It is always passed around as a pointer const struct.

Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
---
include/linux/platform_device.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 276a03c24691..8e83c6ff140d 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -89,7 +89,7 @@ struct platform_device_info {
size_t size_data;
u64 dma_mask;

- struct property_entry *properties;
+ const struct property_entry *properties;
};
extern struct platform_device *platform_device_register_full(
const struct platform_device_info *pdevinfo);
--
2.21.1

2020-02-09 11:52:39

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 1/2 V2] mfd: constify properties in mfd_cell

On Sat, Feb 8, 2020 at 8:44 PM Tomas Winkler <[email protected]> wrote:
>
> Constify 'struct property_entry *properties' in
> mfd_cell It is always passed
> around as a pointer const struct.

I guess this should be second patch in the split and it's actually
dependent to the first one (won't we get a compiler warning when we
drop const qualifier during assignment?).

> Reviewed-by: Andy Shevchenko <[email protected]>
> Signed-off-by: Tomas Winkler <[email protected]>
> ---
>
> V2: drop platform_device part

Btw, when you prepare series, you may use -vX command line parameter,
where X is a version number. The scripts will put v2 in each Subject
line uniformly.

--
With Best Regards,
Andy Shevchenko

2020-02-09 11:58:22

by Tomas Winkler

[permalink] [raw]
Subject: RE: [PATCH 1/2 V2] mfd: constify properties in mfd_cell


>
> On Sat, Feb 8, 2020 at 8:44 PM Tomas Winkler <[email protected]>
> wrote:
> >
> > Constify 'struct property_entry *properties' in mfd_cell It is always
> > passed around as a pointer const struct.
>
> I guess this should be second patch in the split and it's actually dependent to the
> first one (won't we get a compiler warning when we drop const qualifier during
> assignment?).
>
> > Reviewed-by: Andy Shevchenko <[email protected]>
> > Signed-off-by: Tomas Winkler <[email protected]>
> > ---
> >
> > V2: drop platform_device part
>
> Btw, when you prepare series, you may use -vX command line parameter,
> where X is a version number. The scripts will put v2 in each Subject line
> uniformly.
Right, just the second patch was a new one, so not sure I should mark it v2.
Thanks
Tomas

2020-02-09 12:10:45

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 1/2 V2] mfd: constify properties in mfd_cell

On Sun, Feb 9, 2020 at 1:58 PM Winkler, Tomas <[email protected]> wrote:
> > On Sat, Feb 8, 2020 at 8:44 PM Tomas Winkler <[email protected]>
> > wrote:

> > > V2: drop platform_device part
> >
> > Btw, when you prepare series, you may use -vX command line parameter,
> > where X is a version number. The scripts will put v2 in each Subject line
> > uniformly.
> Right, just the second patch was a new one, so not sure I should mark it v2.

Yes, it evolved from the v1 of one patch. So, just mark both of them like
v2: per subsystem split from v1
or alike.

--
With Best Regards,
Andy Shevchenko

2020-02-09 12:13:33

by Tomas Winkler

[permalink] [raw]
Subject: RE: [PATCH 1/2 V2] mfd: constify properties in mfd_cell


>
> On Sun, Feb 9, 2020 at 1:58 PM Winkler, Tomas <[email protected]>
> wrote:
> > > On Sat, Feb 8, 2020 at 8:44 PM Tomas Winkler
> > > <[email protected]>
> > > wrote:
>
> > > > V2: drop platform_device part
> > >
> > > Btw, when you prepare series, you may use -vX command line
> > > parameter, where X is a version number. The scripts will put v2 in
> > > each Subject line uniformly.
> > Right, just the second patch was a new one, so not sure I should mark it v2.
>
> Yes, it evolved from the v1 of one patch. So, just mark both of them like
> v2: per subsystem split from v1
> or alike.
Okay, we can look at that also this way.
Tomas