Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1794926rwn; Fri, 9 Sep 2022 04:18:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR7PzaCcNAQysZzDbe/QAH7Z/i5+XhlssKanB0QhmoaJfal8hMiLcFOr4Z4Z8wUkgHPn9abz X-Received: by 2002:a17:90b:2802:b0:1fb:4efd:a1ca with SMTP id qb2-20020a17090b280200b001fb4efda1camr9118000pjb.198.1662722327511; Fri, 09 Sep 2022 04:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662722327; cv=none; d=google.com; s=arc-20160816; b=Y32Num98rZ7qZf6PisYkx14Vpb4Xws2ck74ftfwT5Dm07tlOv21C5LxvDBj5TMWrz1 +ZcQsHoGvPEN36ZDNG+olQaJNatK0fcfTtSDIuPfISt/EDblAT2+VfTqCIgrIZVKvlET +Q/6uLLw11paNO0fBkpwxeeg/WKcDDcWvYZJ3h/wD7NmHHNf4E60q28oFxvOfMdm089C oxg0UsVFYSw8MLgRLtn5dHMx7p/Zfj0k8w69OfKnFUSrIg0g/nb5kapkRayDsAu2Xrsk 4r3UWv3vGa9r1rsC/yUQG6ns73vkPhPnySteP6NrbEOYWjFKMfbj5OKdK1OisTiUY3zH jzzQ== 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=y5vAvwbdrzBPqWu0ewq0rN+F/bim6fbE2yzKyGyBMZE=; b=SOjD1HktX4dhwb0N4BV3gZi2PXWePVYT4tPcxPdouSIgI/zU9Iqeu8SL9m6YeIlYci kCekdX5LMpv+aG1/hs0iDgsjlcJGH9NXExP8w4lc7Fwoolvar809CdqTCU5kRjLKOZgw QCQwJUeOD8KbK8I9CBPDxbVKaqNWFBGL7PRkEVa+YE5f1Y2TB5jM6d8qdoqUF4Oxt297 yD7SQRRY0xHy/CaFcdXY9JMpJ68gIc1mjV3APbkSmQvjkYTx+UNWtI55Vi+W4vPf3216 bId08y7P34/hmxFd5oO+B+sqN/7LqEOHzxPRjEPSFqFp/5/fUzrPZHlVTHAlzoInaGde SD3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HU5k6uR8; 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 69-20020a630348000000b0042b31fdb2d1si309493pgd.208.2022.09.09.04.18.35; Fri, 09 Sep 2022 04:18:47 -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=HU5k6uR8; 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 S229705AbiIILGQ (ORCPT + 99 others); Fri, 9 Sep 2022 07:06:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbiIILGN (ORCPT ); Fri, 9 Sep 2022 07:06:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EF34D21CA; Fri, 9 Sep 2022 04:06:11 -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 ams.source.kernel.org (Postfix) with ESMTPS id C1395B824F0; Fri, 9 Sep 2022 11:06:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BFB4C433C1; Fri, 9 Sep 2022 11:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662721568; bh=3NEzg2EVTYL6D0L+bzYSw8gVTESohGyL9ED7X39zx8U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HU5k6uR8qPVfMuxjpDGRdI+N9D1yMcepeX2HGegy4PMObnPCDRR8K5GtT7OuQmMAs vXwFDf3X12zECHtFKyXBvTi9vyydPUy0yn5eZNJhWXeZSzKGqpZd5lUfzZBY8q4+kL XzO/DAiVs1Vpku7HoApKQqDZ6NEUe1+9QqfgoffM= Date: Fri, 9 Sep 2022 13:06:00 +0200 From: Greg Kroah-Hartman To: Jiri Slaby Cc: Arnd Bergmann , Russell King , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Johan Hovold , linux-serial , LKML , Tobias Klauser , Richard Genoud , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Vladimir Zapolskiy , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andreas =?iso-8859-1?Q?F=E4rber?= , Manivannan Sadhasivam , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Pali =?iso-8859-1?Q?Roh=E1r?= , Kevin Cernekee , Palmer Dabbelt , Paul Walmsley , Orson Zhai , Baolin Wang , Chunyan Zhang , Patrice Chotard , linux-riscv@lists.infradead.org Subject: Re: [PATCH v3 0/4] tty: TX helpers Message-ID: References: <4e9b4471-a6f2-4b16-d830-67d253ae4e6a@linux.intel.com> <715b40ba-1bcc-4582-bed1-ef41126c7b94@www.fastmail.com> <2197faa3-0217-41e0-8ff0-b5396561c623@www.fastmail.com> <5feff23c-9458-616c-66ce-13cca5829162@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5feff23c-9458-616c-66ce-13cca5829162@kernel.org> X-Spam-Status: No, score=-7.1 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,T_SCC_BODY_TEXT_LINE 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, Sep 09, 2022 at 12:53:04PM +0200, Jiri Slaby wrote: > On 07. 09. 22, 16:56, Arnd Bergmann wrote: > > On Wed, Sep 7, 2022, at 3:52 PM, Russell King (Oracle) wrote: > > > On Wed, Sep 07, 2022 at 02:36:37PM +0200, Greg Kroah-Hartman wrote: > > > > > > Of course, it would have been nicer to see the definition of this > > > macro, because then we can understand what the "ch" argument is to > > > this macro, and how that relates to the macro argument that is > > > shown in the example as a writel(). > > > > I pulled out the 'ch' variable from the macro to avoid having > > the macro define local variables that are then passed to the > > inner expressions. > > Note that I had "port" and "ch" as a part of the macro parameters in [v2], > but it didn't help the situation much. > > > Maybe a more complete example would help clear up the confusion? > > > Arnd? > > > > Here is a patch on top of the series that would implement the > > uart_port_tx_helper_limited() and uart_port_tx_helper() > > macros that can be used directly from drivers in place of defining > > local functions, with the (alphabetically) first two drivers > > converted to that. > > If there are no objections, I will push the patches this directorin. I like > this more than [v2] or [v3] (the helper macros). Actually, I mentioned this > wait_event() style in [v1], but I perhaps simplified the concept too much to > completely eliminate the need of a wrapper function. And that made it too > complicated/too hard to understand. > > Except I'd drop the "_helper" part from the name. Originally (in [v1]), I > had uart_port_tx() and uart_port_tx_limited() functions. In [v2+v3], I added > _helper to avoid confusion as we were generating a helpers using the macros. > Yes, technically, uart_port_tx() is still a helper, but I think it's > superfluous to have it in the name now. No objection from me, thanks for doing this work! greg k-h