Received: by 10.223.185.111 with SMTP id b44csp46228wrg; Fri, 9 Mar 2018 00:32:32 -0800 (PST) X-Google-Smtp-Source: AG47ELvdp41pSVDGC0a1FBs7Mjoq1wjurQT4iEhbvT2ECzfWyKiBBWvpDhugRaM4ENT8zX9fJJHO X-Received: by 2002:a17:902:167:: with SMTP id 94-v6mr27154446plb.294.1520584352185; Fri, 09 Mar 2018 00:32:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520584352; cv=none; d=google.com; s=arc-20160816; b=Kn5W26DNQWUn2iFQViRq9vbQIyVhp4qn+flct8IgGOkNGAj1+QIbvSfAqnGmLW3hkx mh+qb3WTSztggb8plvFG+Kt8lp/u46TqFNd8U6drRTe6i4oXLQIoe+FyHMAGa2hrky/T dccNTjFeLdXQ2eG4HtkjBmjwOY41ps8AA5iZDHEDb/ih+jBYrH5L0pnNctmncmV8eHbX pJqNuuv5w/8q6VCfXOtf0cRBUi4taIZmxVfsyrk8seJbyeIM7ZkcZuL9FERGcDA5rOrs av83GsVET4GlqDoc5jd1MwAV1pkK3U5/SbGVbofH8AM/v09SYh8Eb2/ho37rnvhayNNg aBmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=wHd+UKdecfjTjFINPuCQo+zQi5scQQ3srBU25pB26Ks=; b=gC3G3rXgYlPdsxi+EemSpHDMgIRjrmCcdZbNAO87lCFl9Wiqxks8K5eVidg0JvSv4h sLTNleDkxT6cWaIp8eC+RGVTBCfG3r3+pOTtOh2KThWjN8viaHu+0UQ1e4Z+TSwr5r1T 8GzS97RO28Wncmg0jV6KcPIK6qNvZlPkxLSHzNoNLC1bQcb2rtPdShV7FjXSGrLgsp80 s9uYFHUwuX1A0lMGwC9itiUMcTT/dQFOPwQzGX/snoYFWvMv9VKiRUt+rHUXjcXz3G1R XGZW5rwyk3wpGpVVxZq09ioRQfLUT0IbSxDNepHqQoZQbXBNQaha6fa8+ww8m+gt7lSu WaDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Lacm/Gst; 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 v32-v6si479490plb.631.2018.03.09.00.32.17; Fri, 09 Mar 2018 00:32:32 -0800 (PST) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Lacm/Gst; 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 S1751496AbeCIIbU (ORCPT + 99 others); Fri, 9 Mar 2018 03:31:20 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36387 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751247AbeCIIbT (ORCPT ); Fri, 9 Mar 2018 03:31:19 -0500 Received: by mail-wr0-f193.google.com with SMTP id v111so8187241wrb.3; Fri, 09 Mar 2018 00:31:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wHd+UKdecfjTjFINPuCQo+zQi5scQQ3srBU25pB26Ks=; b=Lacm/Gst0nMPIL3YG/PDUTcyYhk3LdJ4RpvDK3DRmw6XP72faCLXcpBvJ6/RiOoapU WFlTGporeko3AhHS64DDLONILxQG9E6EJ2CPA+6Dez9JfUHEkvieYByb7RkI3us2d5ic j7mDLSD1XwU3tVqd/NXb3Km/z8wPYoHzc2tOgPbimSRKT7X2kLtfDDEAMbX/MLG5ze9l 7D9iqFzqWPHb2zFU81L+kkNSJobzryysVOugOACooQ9JmUIATfpvHgFJfeCz4M87vaE6 79adehyemHR9TxwoLuMalWCzr464LCPaC2SWZlJmm18E8aF44CJ8qLrrr4WE3wETEuS9 ub/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=wHd+UKdecfjTjFINPuCQo+zQi5scQQ3srBU25pB26Ks=; b=aPWh6qDpm/UD6vzA0szPZgyvKJcESVzRaiRqVPwrqSuvOZqI0SQTWk7qukHJgBaaTg rOzya02/KmKVAHOnoYklQC4+KA1yhZPdtASucLjCOmQNiO7MpAPotX4SWVZKmlwuEwc1 e3WpmIAR2a0tWBHOqcNz2mcHqibLv1aJ3d4Xo6iLp+eomwQoRZ1/aLKsuSZAzt+vBa8W ShOPNTWxBPbuNX9GRIBzbVjUX3ZjmqH+Hf5mF3YjV+FDjo+68wV54lYLzadwjiFt5uhT R2B71MTnqAR6imVlz0yonE/HWElcukFJasAyKLD8apVFN3OEGWvSUwN7IAHT5A/cDzKv Am4Q== X-Gm-Message-State: APf1xPApCsOSLIFenNreGDgCD2N+eY7F5nBUR1ct8a7CSUlc4q4uOUKe rnAGfDf1BrDqcLsfE+5R/J8= X-Received: by 10.223.130.21 with SMTP id 21mr23459899wrb.16.1520584277783; Fri, 09 Mar 2018 00:31:17 -0800 (PST) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id d8sm595806wmd.20.2018.03.09.00.31.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 00:31:17 -0800 (PST) Date: Fri, 9 Mar 2018 09:31:15 +0100 From: Ingo Molnar To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, Thomas Gleixner , Colin Ian King , Linux Kernel Mailing List Subject: Re: [PATCH 12/12] efi: make const array 'apple' static Message-ID: <20180309083115.mvnrtvukc7sqe2i2@gmail.com> References: <20180308080020.22828-1-ard.biesheuvel@linaro.org> <20180308080020.22828-13-ard.biesheuvel@linaro.org> <20180309074719.y33xe4bjkjsjsaa3@gmail.com> <20180309080428.atur6wcbb6vtonhz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ard Biesheuvel wrote: > On 9 March 2018 at 08:04, Ingo Molnar wrote: > > > > * Ard Biesheuvel wrote: > > > >> > Also, would it make sense to rename it to something more descriptive like > >> > "apple_unicode_str[]" or so? > >> > > >> > Plus an unicode string literal initializer would be pretty descriptive as well, > >> > instead of the weird looking character array, i.e. something like: > >> > > >> > static efi_char16_t const apple_unicode_str[] = u"Apple"; > >> > > >> > ... or so? > >> > > >> > >> is u"xxx" the same as L"xxx"? > > > > So "L" literals map to wchar_t, which wide character type is implementation > > specific IIRC, could be 16-bit or 32-bit wide. > > > > u"" literals OTOH are specified by the C11 spec to be char16_t, i.e. 16-bit wide > > characters - which I assume is the EFI type as well? > > > >> In any case, this is for historical reasons: at some point (and I > >> don't remember the exact details) we had a conflict at link time with > >> objects using 4 byte wchar_t, so we started using this notation to be > >> independent of the size of wchar_t. That issue no longer exists so we > >> should be able to get rid of this. > > > > Yes, my guess is that those problems were due to L"xyz" mapping to wchar_t and > > having a different type in the kernel build and the host build side - but u"xyz" > > should solve that. > > > > Excellent! Please double check the generated code though, all of this is from memory. > Do you mind taking this patch as is? I will follow up with a patch > that updates all occurrences of this pattern (we have a few of them), > i.e., use u"" notation and move them to file scope. Sure, done! Thanks, Ingo