Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4306614imm; Mon, 14 May 2018 05:49:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq3RNswVvHSTYCMyou7k1OC8w8qP7CEUmUemHople6hGqnI4VpgXK/O3OgNXbYVBdZMg7s6 X-Received: by 2002:a62:78c:: with SMTP id 12-v6mr10369548pfh.178.1526302149941; Mon, 14 May 2018 05:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526302149; cv=none; d=google.com; s=arc-20160816; b=DCpzIxcwsQI7/6NQlrOXPt5eGmEWe0UfO091+3PULqmiViy90VdhkwhyNPmSm7aIf4 vHmRP6X1CxR6sqzrYaLI2dd1fwG2sxuW5FhSZ9gHNPZ3CauDyOcLX4NaYycRrgj94bSS 5XLrQV6QPJq3K7AYypffVDII3wN0L1AH0Mz1eO2G1m/wyJHhvDgfqp6itHW+OlAZ0J8r /mo56rJ4FzpA0ZgsthjHiaEJZ33Z7Up6SnmGtwakwdX3oTepS6qA2XpP1BQVIsjFqgSZ 8ZCkv2SrYrm4q52QcL49v5BvgD9OYuK8SDsMKOucMiv+1buNHsMxHcKU/6Ah0NoLiVCD MT+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=O7KjCUOJdX55x3ohWccSCtkuaCMHKTNcJkwQwlq7pVE=; b=IqCrjFxvyBK4B7/2nWBD4zt2jbYUeZ2I6pbruP6g8y120X/6WWbrfFWuNINbmMWzSK PWR0ALeCrJbUdo9c7Qlc+9qsGTdcjZLxqXkd5EixuwCc/26NE0M7s80uzmLp2icI+Km+ s7Pkg2HtS1pEtGoPXqwINkG8+g3CkuyXHdWpCOYdtV7a0rGdWxDagaQv2V08YlkaxrgE ahxh646gdm0QnIFs73rLrTGR0kJDcyf4+88vEysJTHQhOJMnbvKnFaQWEc5Pkl26j25X ZWvkFiGzCi0csCQVoNizMSQa3ogItv28z9qeg/rCEMqlGDPWnOM17zyxmtqEwM9pD/AO lTWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w25-v6si7689771pge.530.2018.05.14.05.48.53; Mon, 14 May 2018 05:49:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753512AbeENMsS (ORCPT + 99 others); Mon, 14 May 2018 08:48:18 -0400 Received: from mga04.intel.com ([192.55.52.120]:54444 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752732AbeENMsO (ORCPT ); Mon, 14 May 2018 08:48:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 05:48:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,400,1520924400"; d="scan'208";a="41635000" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga006.jf.intel.com with ESMTP; 14 May 2018 05:48:10 -0700 Message-ID: Subject: Re: [PATCH v2] device property: Get rid of union aliasing From: Andy Shevchenko 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 Date: Mon, 14 May 2018 15:48:09 +0300 In-Reply-To: <20180514121817.GA27869@wunner.de> References: <20180508131547.44366-1-andriy.shevchenko@linux.intel.com> <20180514121817.GA27869@wunner.de> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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