Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5592742pxb; Tue, 16 Feb 2021 02:31:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiEIZLmrPN7Nvu3v7Cm0acSF0wgtd7DaPqFcPqBQs6eW6jPBw2Z3wDqeah43VzX2dGh/Es X-Received: by 2002:a17:906:a295:: with SMTP id i21mr19983710ejz.334.1613471480376; Tue, 16 Feb 2021 02:31:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613471480; cv=none; d=google.com; s=arc-20160816; b=VTFrq3YUNoLz6jyxpKBMKzLYedSAp5mbH3dEVQlq+UWro5r1Hy3smTHp4VWjGwACdO 2YOSicdYsOA7xM63aD7d3MebZoZxjtLzGz+0wyAfiTi4qKh+GxLm+VhU/LRR5dM64ER3 78ZAqKQjL3JMTI/DB67Y1uEHd/oWMWDPLRefbJ8NpR910jd+M9/ROm5mK204m+8/X0FT uc34+wqVBc+roSt9xu8LI3RS+aoEyJ5hcy1JXLG4fdoX6JhUX1V9OWDp+jw+NY16qZCV eXEjnFvl1ZWQrV1Pfn2bMwjVRWHPviheOoinCW5+I7N68lVD4uX+gF96MDbebN3uzy7A nVYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ReGHnTNvg0UxkpAAD28dbRuIgVHg5lHr2wMMDHN28fA=; b=Fufg6RT8Di2w3/KDqYPtxLd6Cfnzvi58RV28gB/4uigooqtFUEu9igVL14UUopwyEV hfEnmtQFgCKTiv6EKjXpZQ5Na6+XuIXauuVwG3Ptp0+mL+Auq5LtqAnlVJUKnD37mF4t uGTJwyDXu6JDjiWs43R85tUa3s/5WKQj+R7I3vjomGRb/AR95deTsb6StxLDk9DXXUR8 03J/Ag5tY4QyTcaSci1LvnoyvtWkg2cE7auTAN9oBtIdAjshnLn8p9s6cUWCqUrZGnP4 S/6B0q/DOdXzke5Uq+jwXU9qqtQTBCoP/TTYkDvror3n0/3VU7VYoerjAUtyh2qQg6Vd MYzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h9KXzI+V; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si17872136edi.63.2021.02.16.02.30.57; Tue, 16 Feb 2021 02:31:20 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h9KXzI+V; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbhBPKaU (ORCPT + 99 others); Tue, 16 Feb 2021 05:30:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:59142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbhBPKaO (ORCPT ); Tue, 16 Feb 2021 05:30:14 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5634064E08; Tue, 16 Feb 2021 10:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613471372; bh=hWGJmDQWT8XgcDBQ7FWNZP9vnjZM2snhaJfPI32QkRc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=h9KXzI+VQK8eKmwWqRrnq3PhV8yv3jLCPH9kG4q5pjmm1Lz1ejBNgrfEKqh7m+9cJ QDvDnNyYYoFl0N4Gnz8gHV2/n2+AedJBtShvMhSN1PFNRaKky1Uv+sqPGHFYHiRJ2X jSpDta2pTJn61wx29CEpNdP9fvnQ59LE9Ehulvk/jDDWsQiBTNIwgK2BGFwlEFzhA7 sTL5llVU+0UKv4K0+359uJKDamyucH+YWWE4Pj+TM6A8581pmqALdJ0rb5Mjn6yhQF 5YX13knYFdSFX00M/6WSQh7VkVKjN6i3z9RAqLAGz01/ZvM8pjD4AIN4LW4DB7rjyW 5KUKJUrRnXo/w== Received: by mail-oi1-f179.google.com with SMTP id y199so10723708oia.4; Tue, 16 Feb 2021 02:29:32 -0800 (PST) X-Gm-Message-State: AOAM533IjMiM8d6IQ+SdixLgOsEE0GhLII4KOPo0WoJcRKzMe7wfNNbu m9qQfuLs3xm8TzErcqHTuSQAT7ZuQRwrKnQcnP4= X-Received: by 2002:aca:2117:: with SMTP id 23mr2141331oiz.4.1613471371347; Tue, 16 Feb 2021 02:29:31 -0800 (PST) MIME-Version: 1.0 References: <20210215121713.57687-1-marcan@marcan.st> <20210215121713.57687-24-marcan@marcan.st> <20210215191748.uhus2e6gclkwgjo5@kozik-lap> In-Reply-To: From: Arnd Bergmann Date: Tue, 16 Feb 2021 11:29:15 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 23/25] tty: serial: samsung_tty: Add earlycon support for Apple UARTs To: Krzysztof Kozlowski Cc: Hector Martin , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Arnd