Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5603048pxb; Tue, 16 Feb 2021 02:53:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAZPPbxchCCOhTVirH8707kvFO6tV+Na+8V5Wd+tOyl0nur1Z34YmDjVj/VygIND5R4j1u X-Received: by 2002:a05:6402:4242:: with SMTP id g2mr20463514edb.103.1613472789446; Tue, 16 Feb 2021 02:53:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613472789; cv=none; d=google.com; s=arc-20160816; b=nz546XE1jJ2dOjKCosLA0QstY7SB67TK7sxMYOUz5f3TDuAkttNuqxlWeT4UHC1/WT 9IbFn89OKMeLOnoaH282Nc/2JsZ/H40AnloaOoATJqUJnXo91OhpUmBP67cnvTfh4CZn 2fezGDFImlgRLKfySqOwaS84V1N7wySiErG2iegFwZpKat2NMesMJWxW7r6BDpZ/emv1 DcgAYuvRwd6TArNDFPzVtH+0BzGkkOyECoWYSPKEazYHd0oSnUgp2XNfky/MbjGHt1S9 Om2Z93vqPIrY1z/OLr8ZleIAJWqL8o9c3KsvRotZpSac7wrDwCUzUlAKlLOyjl7IJgyv SLPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=po8K+zktAxuKSg6yTHf6nVeZXNPbOlr5gzgCHlGE/Bg=; b=SdyW9aKKjgiq6xBrIonioI/wW0qmtHPvmCZO37bctI1Ov4kQ4uns6xAZ96+FDV93wf OhkA35wZtEM9NxnTpTHFvpIjzYDVXja4/WGFPjFPNOv8/eGMmlLnitigooNdWArHi4JZ 5K9nLwOgjuzOQTBfwS1k1Xv6Coi9qpr4NR6loAUEoQ3ao2+Or9/hQh8OSekGKwszIQYW 8jpHYwQYruWrAsLq29z9TenfbJoCOd7tLFvDFetwCjWFb0WGn4O6R2gs5VX8iIglP3gP 2sxM4Fy6eFh89K34EYnkY68RWKDlTUSF4IRk3L44XfOr63gqjHsyQhR/e4VvaHjW7KTV /fBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=marcan.st Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hk6si14144298ejb.204.2021.02.16.02.52.46; Tue, 16 Feb 2021 02:53:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229934AbhBPKvT (ORCPT + 99 others); Tue, 16 Feb 2021 05:51:19 -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