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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 C6E78C433E0 for ; Tue, 16 Feb 2021 10:51:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 815B664DFF for ; Tue, 16 Feb 2021 10:51:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230111AbhBPKvW (ORCPT ); Tue, 16 Feb 2021 05:51:22 -0500 Received: from marcansoft.com ([212.63.210.85]:34526 "EHLO mail.marcansoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbhBPKvL (ORCPT ); Tue, 16 Feb 2021 05:51:11 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 82C8D419B4; Tue, 16 Feb 2021 10:50:14 +0000 (UTC) Subject: Re: [PATCH v2 23/25] tty: serial: samsung_tty: Add earlycon support for Apple UARTs To: Arnd Bergmann , Krzysztof Kozlowski Cc: Linux ARM , Marc Zyngier , Rob Herring , Olof Johansson , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Will Deacon , Linus Walleij , Mark Rutland , DTML , "linux-kernel@vger.kernel.org" , Arnd Bergmann References: <20210215121713.57687-1-marcan@marcan.st> <20210215121713.57687-24-marcan@marcan.st> <20210215191748.uhus2e6gclkwgjo5@kozik-lap> From: Hector Martin Message-ID: Date: Tue, 16 Feb 2021 19:50:12 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: es-ES Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/02/2021 19.29, Arnd Bergmann wrote: > On Tue, Feb 16, 2021 at 11:20 AM Krzysztof Kozlowski wrote: >> >> On Tue, 16 Feb 2021 at 11:19, Arnd Bergmann wrote: >>>>> + return samsung_early_console_setup(device, opt); >>>> >>>> Don't you need to handle the error code - set PROT_DEFAULT() or whatever >>>> was there before? >>> >>> __set_fixmap() has no return value, it just writes a page table entry and >>> does not fail. >> >> I meant, handle samsung_early_console_setup() error code (NULL). > > Ah, I see. > > I don't think it makes a difference -- if ->setup() fails, the page table entry > is just left in place unused, and the type of the unused mapping doesn't > matter. If earlycon tried to unmap the page, the type also would not > change anything. > > With earlycon, I'd generally lean towards keeping things as simple as possible, > in order to increase the chance of seeing anything at all. It clearly wouldn't > hurt to try to add minimal error handling here. There's no logic to clean this up in earlycon itself anyway, so there's no point in trying to do it for the override. If another earlycon driver ends up getting instantiated for some reason, it will override the mapping with a normal one again. -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub