[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180514121817.GA27869@wunner.de>
Date: Mon, 14 May 2018 14:18:17 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
linux-efi@...r.kernel.org,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH v2] device property: Get rid of union aliasing
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 <http://www.gnu.org/licenses/>.
> + *
> + * 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?
Thanks,
Lukas
> */
>
> #define pr_fmt(fmt) "apple-properties: " fmt
> @@ -96,12 +99,13 @@ static void __init unmarshal_key_value_pairs(struct dev_header *dev_header,
> entry[i].name = key;
> entry[i].length = val_len - sizeof(val_len);
> entry[i].is_array = !!entry[i].length;
> - entry[i].pointer.raw_data = ptr + key_len + sizeof(val_len);
> + entry[i].type = DEV_PROP_U8;
> + entry[i].pointer.u8_data = ptr + key_len + sizeof(val_len);
>
> if (dump_properties) {
> dev_info(dev, "property: %s\n", entry[i].name);
> print_hex_dump(KERN_INFO, pr_fmt(), DUMP_PREFIX_OFFSET,
> - 16, 1, entry[i].pointer.raw_data,
> + 16, 1, entry[i].pointer.u8_data,
> entry[i].length, true);
> }
>
Powered by blists - more mailing lists