Re: [PATCH v2] device property: Get rid of union aliasing

From: Andy Shevchenko
Date: Mon May 14 2018 - 16:55:40 EST

On Mon, May 14, 2018 at 11:44 PM, Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> On Mon, May 14, 2018 at 6:13 PM, Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>> On Mon, 2018-05-14 at 17:40 +0200, Lukas Wunner wrote:
>>> On Mon, May 14, 2018 at 03:48:09PM +0300, Andy Shevchenko wrote:

>>> Well if that is your concern then you need to prevent functions which
>>> retrieve properties to use the wrong type.
>>> E.g. to prevent retrieval of the u8 array as string, you'd have to
>>> amend drivers/base/property.c:pset_prop_read_string_array() to
>>> check the type of the property found and return -EINVAL if it's not
>>> string.
>> I think it's doable. I will hack a new version later this week.
> So I'm assuming that I should disregard this patch and wait for an
> update, right?


With Best Regards,
Andy Shevchenko