Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp111827imn; Fri, 29 Jul 2022 01:08:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uU9XRJ/XgQnXUeO3CnO7HIRjjip80ijI84aSR+Pjrg59WuJM3ddQRdV7/eADoTrHcFMeul X-Received: by 2002:a05:6402:a47:b0:43d:17a0:fdc9 with SMTP id bt7-20020a0564020a4700b0043d17a0fdc9mr2015395edb.41.1659082125647; Fri, 29 Jul 2022 01:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659082125; cv=none; d=google.com; s=arc-20160816; b=gPhu0TxlqJMrAT1L+WJuKq9HvH5VCSp/Ya927pDGvQ3gV/p2RD3PjJEOEv8Uv+80kn JbrVUXmxoJkz6KjdTs2unYwCrfxtZFFpNKUYeTmLAPzZoXr2AVgnS5mfp+xoP9aY2Qg0 r8buE4LrwmXHUeCcQCPheMtPjcwPQ0Y0Yi48U4YR7F9S3YGTNUbI8WVZQ9PnXcnK/nJU h8c4OPNvD1FulKpiL8ttO4ytHyuxQuRZYvielYPiqqcioyIxJG/ABbgGVWAxpn4Z6Cbe YKZmn7CiM1R/Ct1oz0beI4gdPv8VVV53m5X0K8UJzlu+EHjq+uCiDRZwPX1KfaUBht/K jOgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=v/DM14fst99fxq9Xr7+GLPtD30/VARy6d5Qs7d+biIQ=; b=c/5CnjwuvaJNxMTfTLKm89fgRKJ8BUOCFXpz96eO0vNFfLXiB51rmK6u/S1BoUrBNd e1yJRD3B6kDfoY+hbu37UkxbnOumP6GvMbZsenTwbSFhAzVeGDlJe0zFPqfaIJr5S7SF NcYm1+zqPrs7pqW8Jh/tVHoLF8MX/TeBehj2hE3oCW8P1qc8IeI0why5Ih8FpTPq3TE5 5ToTzpY4TLpavN/Es2D+t686MEjCT+mWuZzVr82PAU62RC5g2NZGRZwK9tMsCTwraCFh EfXTjOt6Cns/XCE+dn1vFHhOt4wH7JVP0z8k+JhPFuKptlBD+JMDpWtVj90VRwgFNkVL hSuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=C5ZbaoWI; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020a170906370b00b006e8c309996esi2362449ejc.551.2022.07.29.01.08.21; Fri, 29 Jul 2022 01:08:45 -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=@linuxfoundation.org header.s=korg header.b=C5ZbaoWI; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235157AbiG2H5d (ORCPT + 99 others); Fri, 29 Jul 2022 03:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235036AbiG2H5b (ORCPT ); Fri, 29 Jul 2022 03:57:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12DD07E027; Fri, 29 Jul 2022 00:57:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A2F5D61BF8; Fri, 29 Jul 2022 07:57:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CEAAC433D6; Fri, 29 Jul 2022 07:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659081450; bh=kGpstCAAwPkGYsBYA0Sv1cWBhpQqBl9cZdq6KbVZpIc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C5ZbaoWIRXMrNQTc535bsP0zIPJb4o4x7G+72avOewl26tmgUH0fnYcLGAm1TRjkG wqEuTzdTP5GGSarwRrwLDIPmR7ZtpH/JQSaxOqnbgevhFJYaZFL/c+mM1lO2blfykq e/98jXo2dQ75Q6EsD/pRVQ6C38alFpyauc3p8dHA= Date: Fri, 29 Jul 2022 09:57:27 +0200 From: Greg Kroah-Hartman To: Andy Shevchenko 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 Subject: Re: [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node Message-ID: References: <20220728142824.3836-1-markuss.broks@gmail.com> <20220728142824.3836-2-markuss.broks@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 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: > > > Pass a pointer to device-tree node in case the driver probed from > > > OF. This makes early console drivers able to fetch options from > > > device-tree node properties. > > ... > > > > + 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? > > And it's not really a "node" but an "offset", right? > > Seems no. Really? What am I missing here? confused, greg k-h