Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp888825rdf; Tue, 21 Nov 2023 22:24:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFF+BMf2t79wOhTDOhvPHccS4tRA7nlKExIg8dRrmPDtkGW1CXiU19Mrmq1zkMkO2LSztxv X-Received: by 2002:a05:6808:1804:b0:3b2:e61f:f0a8 with SMTP id bh4-20020a056808180400b003b2e61ff0a8mr1812757oib.45.1700634244764; Tue, 21 Nov 2023 22:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700634244; cv=none; d=google.com; s=arc-20160816; b=ecc1PxAG28ruGjHtG9twkwPl1rl5B0MNi/idHSkFjMLpVMHplmDoRsza80b2Q4CP3P cDnt89ew/+ksWUttuyjoTC+PGGX7469JLZlu+dFLmhof+td+0lEBi7qNs7UmwQmYAWGa kFD6P86QHHgNiFGW/CIzkei8Sdct4vHdSvNrFfqiCMnf8I5LpK9F5baech+iE5k4pnDy DOJczmbZc4Utw+DJi5IRk1Is/urxu9wxA19DSZzvmHcdSnXZ9bhjwWehuAQhAbR4n92Z KypfksfbfCtqgelzr3UumbXXTO7xWAF8Ti9+yO3xAvfaEbOimcFEU2RA1DTqWG06ZhLF 0RpA== 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=d99XFCQRWrNbR042hjdiwDF6s9GaTBwfflZOiLd6u+c=; fh=40+TGzva0NcwzIvtx2Kwg+nPQQvnk6Ad5NLcVD1uCnc=; b=MBYztskThHl5N/zw/9ANdhqaQzpkrOMN03VP6iBohUMuhzmSR3Qnq8GNF/b7r5kKNz Z5MXGYtozEiLZ6rdDXb10EYEyAHmDusuGE/ZrV0bseKzqyAsYazWNXYCiZtccKXLwsA0 zu2VOkvmGoqpbwCOKZEKMyvlR75QWBTp8OK7MuviZtl/ITGHCQr4nxfUxftOMrp7/9Rt nPeGjtNBSP9jxoOtDWnfWbaqZQAXmOG91vmhsWO4lg/4gftGzrpBvMQckH/uo7bbZB6l qFB97IGs/WQEgQ3J+bwqfqMGvv69Et/OAVNymjirI5JSdQ+7+AO3J5thHr7DiD2HP0O2 8XQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@atomide.com header.s=25mailst header.b=RY7AHEEi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id h5-20020a056a00218500b006c3b92140ebsi11882385pfi.151.2023.11.21.22.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 22:24:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=fail header.i=@atomide.com header.s=25mailst header.b=RY7AHEEi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 994B081A2069; Tue, 21 Nov 2023 22:24:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234740AbjKVGXl (ORCPT + 99 others); Wed, 22 Nov 2023 01:23:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjKVGXk (ORCPT ); Wed, 22 Nov 2023 01:23:40 -0500 Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E20CBB; Tue, 21 Nov 2023 22:23:37 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 9B64560852; Wed, 22 Nov 2023 06:23:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1700634216; bh=7l8RYfSv+Xt+pXcLeRVZNV78n1VkGJsOJq4cyIHNZ2E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RY7AHEEi03COXU08D3dl1hmNCiQVZwbml+LgwDKpjXDS9wMpcP61T3e9Yl2mf75GC sc/Q5HDOGd3hZXskcWgkbE+Lm0B0v09qXFzitE9iUsd0py3fVqAsCf25q23n7e5aVO KhqLryduelrBTbaclcOFlDnculfmIaHWpvn1aCblCRQldP8ahViBVnykG6wax7eJck YuPV9B+468z4/a6gIg3KvWn+bf4WZ5KJWjfwGPZtebcBZJQ6V04ytJ5nmSmu9cGF1g kBsqBxiGkbwAigoFVLLoaW2Gbp+rfHhc6XM8QiiqgpBSd5pEzBeJK1joHrydsZZCxN QntdvDAEje7sw== Date: Wed, 22 Nov 2023 08:23:04 +0200 From: Tony Lindgren To: Andy Shevchenko Cc: Greg Kroah-Hartman , Jiri Slaby , Petr Mladek , Steven Rostedt , John Ogness , Sergey Senozhatsky , "David S . Miller" , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH v3 3/3] serial: core: Move console character device handling from printk Message-ID: <20231122062304.GE5169@atomide.com> References: <20231121113203.61341-1-tony@atomide.com> <20231121113203.61341-4-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 21 Nov 2023 22:24:02 -0800 (PST) * Andy Shevchenko [231121 18:00]: > On Tue, Nov 21, 2023 at 01:31:57PM +0200, Tony Lindgren wrote: > > + ret = add_preferred_console_match(name, drv->dev_name, port->line); > > + if (ret && ret != -ENOENT) > > + return ret; > > + > > + return 0; > > 2nd time and so on, perhaps deserves a helper? > > static inline int add_preferred_console...(...) > { > int ret; > > ret = add_preferred_console_match(name, drv->dev_name, port->line); > if (ret == -ENOENT) > return 0; > return ret; > > } > > ? Yes good idea, thanks. Tony