Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp180661imn; Fri, 29 Jul 2022 03:55:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tcOw+koT3S7vMEBR0oH2POUOes6bcds7iENxBDS7tdWW+sF+c20hFF5Jl2fTDyGRbPoZfQ X-Received: by 2002:a17:907:a061:b0:72f:1dde:fac0 with SMTP id ia1-20020a170907a06100b0072f1ddefac0mr2416137ejc.310.1659092125679; Fri, 29 Jul 2022 03:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659092125; cv=none; d=google.com; s=arc-20160816; b=FcngSYZvd771vReDV+x5Kj0Kla/BGplPSyrulbMsvlsED7GJWR9uECOttRDrjaMmzj XSZxneajbcS1DFTwrwbHNFzVEYbVMj5nnWGxGRZcajGKHJptIZuk/7ZkRnAxionWefnO QaK9HMMygjtOP1Yyzf9yeBWXuJrwX6CGf94V73Fzbi+YIUAykBld+ztgKpli6fcItIUv PAYluhvGKSATSrTPnPg7a4DrOUMZEvNBvIa6HdkMOR3CSQBb/N4AzVRkx13Gcue2e25f wIenQW01RfdetOfKl+W+KIogEIaCaCD7Q0bWkSc+K8UhEfVK0/sHjyojX+lVDMo+cMkJ yiMg== 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=3n/U/FQWga428NP8njwRwJq8YQtOFS7dE4r1PAnkS1w=; b=qbYkZlK4ak6Rnb31BIEKADMCtrey7kQNpqc5JqIFvLb6UI/QMiKqf+O4OryrCTE6yk 9iw56+BZ7MjTqoJLMZ0WxjjFjo72errP26AHOfc76lDf9xnV1ZWdm5y3+j7wfCi/4ewu W4UxSInxGIbfoFwzvDKzrdzOv7yk+gOVVfCOKClO72R7aGlnedvMfFrkVjDBC8GmqH58 RCLDJHJXcd+aw2qMMXPr84z0hWWyuNGroLc3g0ubbdu4HlLuOnMtqzmI1U9f3LXuTXOV ZNHdpESG2Gxz6yVUa6AhKRYtPczUTVSodcqwKazLd5WskOwZjr2prbRo32E6i4KARvTX ZaeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NUwJ6Ia5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb36-20020a1709071ca400b0072fb108db55si4314185ejc.895.2022.07.29.03.54.59; Fri, 29 Jul 2022 03:55:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NUwJ6Ia5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235560AbiG2KsR (ORCPT + 99 others); Fri, 29 Jul 2022 06:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232387AbiG2KsO (ORCPT ); Fri, 29 Jul 2022 06:48:14 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF52A1AD; Fri, 29 Jul 2022 03:48:13 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id z18so5312714edb.10; Fri, 29 Jul 2022 03:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=3n/U/FQWga428NP8njwRwJq8YQtOFS7dE4r1PAnkS1w=; b=NUwJ6Ia5ztlFAPJRSi//yXxSQSxStivnbYzEDrxWCEUcunK9mPPbSDW9UDDz5jYYTf 5/3Tv/X7zyoHU/COku0GH9BU+wnuhqnwNFhGBh/oBwLrmzhgi2WmL6r/pQigVKDP+2wN r2nnp+tCjUus1cege2Vm5IiCUqgIiTt4/grj8tzAwe+OtUD4H+EwBDhK/GPRq3Lq3Riq OU7YrReBurHOIdx3AJ1A2MhkIWr3n3xTalz66sqsFBkMks+QVyqGj8zIaTAQPSbuEfQf 8cevW1Q80DurxbNMHDhAvDW9cs5zdQWNQyPeZtlVDDib66Jn5ZADWJkEZ//9TVlc5tq5 Kiow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=3n/U/FQWga428NP8njwRwJq8YQtOFS7dE4r1PAnkS1w=; b=zHm82nlJ9x4xd8lO9Q8TwwhBPELe0WiAZiEc3E+uY71Dnr6RAn8Rk6/ydgPwAxBxrR 3CRu1godetGM4Q6Ir/pWtNdAVYlF8+317V7SnqSAMKaoS/qJ7ZXR8vZT89+Lr8SFhI00 BTHeuhWfaC+eLbcOUO2B7c9x/2gb73dSMF2aEBUqxjaasqJGBBrqlG225n5osWaZzZ6D xvdRrXYwDw+ckzur6wMOCIoPmR30T8qb3rWsEStLsXsD3z/sRlAVCQOAPCKAzw3gANfe QZN/PwjNfQ6+NT50qrCPcAGKNg9riE9SbEZ3hJcpxQQ5P5njeb0QSYABGINyifm4+Dnd 4TMA== X-Gm-Message-State: AJIora8w+u/RFNE81Ht6KgBTc15QZ6QhbOjgogmbjsl+h+cNrqoXjZKh YtHzpX8xHrEODFVz+QeuCK8l7bW5g9lfqPnOYYY= X-Received: by 2002:a05:6402:2714:b0:43c:1c1:717e with SMTP id y20-20020a056402271400b0043c01c1717emr2983928edd.67.1659091692189; Fri, 29 Jul 2022 03:48:12 -0700 (PDT) MIME-Version: 1.0 References: <20220728142824.3836-1-markuss.broks@gmail.com> <20220728142824.3836-2-markuss.broks@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Fri, 29 Jul 2022 12:47:35 +0200 Message-ID: Subject: Re: [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node To: Greg Kroah-Hartman Cc: Markuss Broks , Linux Kernel Mailing List , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Jonathan Corbet , Ard Biesheuvel , Jiri Slaby , Helge Deller , "Paul E. McKenney" , Borislav Petkov , Andrew Morton , Kees Cook , Randy Dunlap , Damien Le Moal , Thomas Zimmermann , Javier Martinez Canillas , Michal Suchanek , Andy Shevchenko , Arnd Bergmann , Wei Ming Chen , Bartlomiej Zolnierkiewicz , Tony Lindgren , Linux Documentation List , linux-efi , "open list:SERIAL DRIVERS" , "open list:FRAMEBUFFER LAYER" , dri-devel , Petr Mladek Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 29, 2022 at 9:57 AM Greg Kroah-Hartman wrote: > On Thu, Jul 28, 2022 at 11:04:24PM +0200, Andy Shevchenko wrote: > > On Thu, Jul 28, 2022 at 4:41 PM Greg Kroah-Hartman > > wrote: > > > On Thu, Jul 28, 2022 at 05:28:18PM +0300, Markuss Broks wrote: ... > > > > + unsigned long node; > > > > > > That should not be an unsigned long, but rather an 'int'. Something got > > > messed up, of_setup_earlycon() should be changed to reflect this before > > > propagating the error to other places in the kernel. > > > > It's a pointer, but what puzzles me, why it can't be declared as a such: > > > > struct device_node *node; > > > > ? > > It should not be a pointer, trace things backwards, it comes from a call > to of_setup_earlycon() from early_init_dt_scan_chosen_stdout() which has > offset declared as an int, and then does: > if (of_setup_earlycon(match, offset, options) == 0) > > So why would it be a node? This is a very good question. > > > And it's not really a "node" but an "offset", right? > > > > Seems no. > > Really? What am I missing here? It's me who is missing something here, thanks for your elaboration! After it it becomes clear that your first question should be addressed. -- With Best Regards, Andy Shevchenko