From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4846EC11D2F for ; Mon, 24 Feb 2020 17:08:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15A6A2080D for ; Mon, 24 Feb 2020 17:08:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="jYduAdnG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727259AbgBXRIT (ORCPT ); Mon, 24 Feb 2020 12:08:19 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:60482 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727090AbgBXRIT (ORCPT ); Mon, 24 Feb 2020 12:08:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=RI4pNizaN/Qi/rAlgJxrBQWDqEZh68K0XdARYBgsCFs=; b=jYduAdnGRYYPQlZW9TslYS2O7V nzFnwPrCjyUubFLzDx+WDdhxRE7xCW1dXLBb8wKF85nsDjvc0+lDIndVb8YX/uDB22Ow/S08eMz2E k4GGN/gINDJy8qhaLzJo0ZMHlmDGIwgckFeKRTmZzqEkS98+IBTIT8wJz6K4kWkUUlYPl7jEgrIyK HzerGlkQDfR9lJPudGYmPvrZFjKUMBrJ5+IO1UtPif66/pUhr0h1dd0Eq10Zt95ga47eU8ZPK0yZ9 3fy36JsB59IHAW37pNaXjdChsf8aEyN+46wEs2y9ppVSXo9Zq5KfmRoV3p4Ya3tYIQuyarmZUU9fR xuFkORVA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6HDJ-0000Zi-KX; Mon, 24 Feb 2020 17:08:13 +0000 Date: Mon, 24 Feb 2020 09:08:13 -0800 From: hch To: Nikolai Merinov Cc: hch , Davidlohr Bueso , Jens Axboe , Ard Biesheuvel , linux-efi , linux-block , linux-kernel Subject: Re: [PATCH v3] partitions/efi: Fix partition name parsing in GUID partition entry Message-ID: <20200224170813.GA27403@infradead.org> References: <20181124162123.21300-1-n.merinov@inango-systems.com> <20191224092119.4581-1-n.merinov@inango-systems.com> <20200108133926.GC4455@infradead.org> <26f7bd89f212f68b03a4b207e96d8702c9049015.1578910723.git.n.merinov@inango-systems.com> <20200218185336.GA14242@infradead.org> <797777312.1324734.1582544319435.JavaMail.zimbra@inango-systems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <797777312.1324734.1582544319435.JavaMail.zimbra@inango-systems.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Mon, Feb 24, 2020 at 01:38:39PM +0200, Nikolai Merinov wrote: > Hi Christoph, > > > I'd rather use plain __le16 and le16_to_cpu here. Also the be > > variants seems to be entirely unused. > > Looks like I misunderstood your comment from https://patchwork.kernel.org/patch/11309223/: > > > Please add a an efi_char_from_cpu or similarly named helper > > to encapsulate this logic. > > The "le16_to_cpu(ptes[i].partition_name[label_count])" call is the > full implementation of the "efi_char_from_cpu" logic. Do you want > to encapsulate "utf16_le_to_7bit_string" logic entirely like in > the attached version? I think I though of just the inner loop, but your new version looks even better, so: Reviewed-by: Christoph Hellwig