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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4778C3F6B0 for ; Fri, 29 Jul 2022 07:57:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235127AbiG2H5c (ORCPT ); Fri, 29 Jul 2022 03:57:32 -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: Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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