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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 64019C433E6 for ; Tue, 16 Feb 2021 10:30:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F24C64DAF for ; Tue, 16 Feb 2021 10:30:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230097AbhBPKaW (ORCPT ); Tue, 16 Feb 2021 05:30:22 -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-Google-Smtp-Source: ABdhPJzLU0yXwpa8zo0VJ9pnLMzT5igdBQF/kLq0nZ5rs/I3kZXxM3I1bGcFbavHO/jgFFGo6VIGqtHL1dM1HGNJFLc= 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 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 5C853C433DB for ; Tue, 16 Feb 2021 10:31:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F3D3364DA8 for ; Tue, 16 Feb 2021 10:31:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3D3364DA8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=c+HzQsUK//MmDWSKy1QpENZW91lGhE6eUTOg11j80xs=; b=sJryPwWon5JczNtUMuhtXX/9Z U6DUq6O1KqD4ivixox7UFKP6OrP22BwFqW01FYmz7irwPjLH7N8+7jBDK8EeXMDUp9lViYucKlatQ KpnRNGxnAtrD+gUqnTng41l5pPkuPEyor8jmc7lrzrNRDNsAeBDSGR61vDHJ/cQXgiJnT9sD4X3GI Gm0Fq0ben/+zaXqXZxc3hJHvnF6CWH4RwBNkEKnuAYsIBUg3OJj0L4zpfCIey19bvds//NALc5OBQ mw8TMGDep0L9aZRgF+LizZMGeptwWDnh679IHMVeKxxwuIa9Jskd0W3T79Gv+6Ay5g0uyYrX6D32T UK/z94fqg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBxbs-0000K7-1e; Tue, 16 Feb 2021 10:29:36 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBxbp-0000Jd-5l for linux-arm-kernel@lists.infradead.org; Tue, 16 Feb 2021 10:29:33 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4488064DDA for ; 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-f180.google.com with SMTP id q186so6754307oig.12 for ; Tue, 16 Feb 2021 02:29:32 -0800 (PST) X-Gm-Message-State: AOAM531WDqDWScVeZFMN6hN0USDZataYQX1drmouT/Gl3+dmj+Y5fJxi odEEWD4u01pftBVJeBF5l7oe6n9PefmeFKzEHIQ= X-Google-Smtp-Source: ABdhPJzLU0yXwpa8zo0VJ9pnLMzT5igdBQF/kLq0nZ5rs/I3kZXxM3I1bGcFbavHO/jgFFGo6VIGqtHL1dM1HGNJFLc= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210216_052933_322912_488A5C64 X-CRM114-Status: GOOD ( 17.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Rob Herring , Arnd Bergmann , DTML , Tony Lindgren , Marc Zyngier , Linus Walleij , Hector Martin , "linux-kernel@vger.kernel.org" , Alexander Graf , Olof Johansson , Mohamed Mediouni , Stan Skowronek , Will Deacon , Linux ARM , Mark Kettenis Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel