From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH v2] device property: Get rid of union aliasing Date: Mon, 14 May 2018 15:48:09 +0300 Message-ID: References: <20180508131547.44366-1-andriy.shevchenko@linux.intel.com> <20180514121817.GA27869@wunner.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180514121817.GA27869@wunner.de> Sender: linux-kernel-owner@vger.kernel.org To: Lukas Wunner Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Ard Biesheuvel , linux-efi@vger.kernel.org, Sakari Ailus , Mika Westerberg , "Rafael J . Wysocki" , ACPI Devel Maling List List-Id: linux-acpi@vger.kernel.org On Mon, 2018-05-14 at 14:18 +0200, Lukas Wunner wrote: > On Tue, May 08, 2018 at 04:15:47PM +0300, Andy Shevchenko wrote: > > --- a/drivers/firmware/efi/apple-properties.c > > +++ b/drivers/firmware/efi/apple-properties.c > > @@ -13,6 +13,9 @@ > > * > > * You should have received a copy of the GNU General Public > > License > > * along with this program; if not, see > s/>. > > + * > > + * FIXME: The approach is still based on union aliasing and should > > be > > + * replaced by a proper resource provider. > > Why? All Apple EFI properties are either boolean or u8 arrays. > You've correctly changed this file to always supply u8 arrays, > so I don't see where union aliasing is happening here? Okay, for now I can see only Thunderbolt user of these properties (is it correct?) in upstream which uses u8 arrays indeed. Though the implementation is quite fragile in this sense, because it doesn't discourage people to use device_property_read_string() in case when it's indeed a string (I saw these kind of properties in the very dump you posted on your GH page). So, I can agree that is "not happening _right_now_", but I can't agree on the implementation robustness. I can change a wording of the commit message and the FIXME, but _leave_ FIXME in place b/c of above. -- Andy Shevchenko Intel Finland Oy