Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1876520rwn; Fri, 9 Sep 2022 05:33:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR6On61paClsta94qKM06PwOmeBK/lhTWLQWfI4tWe4apSPMRre73ibTshGg2tpHelMxrcVd X-Received: by 2002:a05:6a02:305:b0:435:2c48:a808 with SMTP id bn5-20020a056a02030500b004352c48a808mr8428328pgb.419.1662726785292; Fri, 09 Sep 2022 05:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662726785; cv=none; d=google.com; s=arc-20160816; b=l2GXM2StYyqfDh/aVjcB1LWdMNEG1G3t4knPbl5O3RYHnGb4S3G2HfWfCzL3jgXhL9 rn/UpPMIv6Ms3aDCXPzS0KQ+Feso/wDXQgump7zEbOUQ9fRhtaCOCG44SLrfPiLJOqS2 Xphx3QT//kHkrav3lQ6/CefSaPu8eWCM72h2EIpbp/1PJtjEEijNt+pHl5B3BfqULrp2 Gmx46wD82hiVfT9HoG3n+fEVpwzPQvtJjiHrbvttJ/YXRUUc15fO+pa1TBUzXtxcNzU3 vEZM/kMESfFoX0lBLlSm0T0wKK1Okqwgmi9bbxpI84e9chojvFykitt86fX86fD2JK5R Z5+g== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=es7cXcnluStnLj/X+RLEtw3iYI7hgKP6NgWxYDQbNEA=; b=o8aZ4HGQoNyYzNVCl1WfkshC3RSGxM8W/Qo9HdwexEfY/OpHRFHiE32hLIgT6nqu+M swZqeMia7nsS6JYId8K7kBCGNMVcY7MYUQ2voK6GWRojess4geIUL8aYUPuRe3k1gOON TaL2Ay0USyruTcPS/qhLS3SHEU5m/9U2F32WAGJ/MMXw8XqlqLjrpaS9aKmcpm8UkZFy TNehWSYKcAVfWnQ8jMZLvn534CjoSm/tikSH+SSSwdwH/D37wLwfiQSymd64QAbzg9HM QL37CPApsdhSfH05m7WAVkBgCaJfWfrxhkoUh01LfZwyXLSkmJjcwdBxQPJ0ELRYRK5l jOEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fl65HRPA; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl10-20020a17090b384a00b001fab0d18bcasi472606pjb.66.2022.09.09.05.32.52; Fri, 09 Sep 2022 05:33:05 -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=@kernel.org header.s=k20201202 header.b=fl65HRPA; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230134AbiIIMYT (ORCPT + 99 others); Fri, 9 Sep 2022 08:24:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbiIIMXv (ORCPT ); Fri, 9 Sep 2022 08:23:51 -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 F1E6E48EB0; Fri, 9 Sep 2022 05:23:03 -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 A3533B822A8; Fri, 9 Sep 2022 12:23:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F001C433D7; Fri, 9 Sep 2022 12:23:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662726181; bh=f/MBk4DuV+ezF4qXmdCJCjmryA6nTjeI9XVb4sRPRn8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fl65HRPASBnRey7QziwpTTh++x1s075YBaImqSA2XFii2ys0KOSOxu4LXRJFmue+1 zTNQlcg2Lt35tZzXHX7tQ6aCugsDvKfnidzQTkiahJbbTuaH3KTyOQKDDquC6Ip2i0 iCb0nhC/Jj5sFUJwMt9VGnBtVdgP1EQRzEtoh8HSutp930G7nb67pu5jUDyqjGA16I 37jw3n60ubTVjXuRmLbu1hDiZr3QDo7rtNUjFPdvpY1nshUWOAwnNEcz9rgvQa4jg4 a3gzW9x1+BxRdV4h67haa3Et9KQK0qoEXOjYc6YR64IoEYdMcVPgddxHnjmDlv8TZq wVLmEcCXIDehA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oWd2M-0001Xo-Nt; Fri, 09 Sep 2022 14:23:10 +0200 Date: Fri, 9 Sep 2022 14:23:10 +0200 From: Johan Hovold To: Ilpo =?utf-8?B?SsOkcnZpbmVu?= Cc: Jiri Slaby , Greg Kroah-Hartman , 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 =?utf-8?Q?F=C3=A4rber?= , Manivannan Sadhasivam , Russell King , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Pali =?utf-8?B?Um9ow6Fy?= , 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: <20220906104805.23211-1-jslaby@suse.cz> <4e9b4471-a6f2-4b16-d830-67d253ae4e6a@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4e9b4471-a6f2-4b16-d830-67d253ae4e6a@linux.intel.com> 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 Wed, Sep 07, 2022 at 01:16:23PM +0300, Ilpo Järvinen wrote: > Also, I don't understand why you see it unreadable when the actual code is > out in the open in that macro. It's formatted much better than e.g. > read_poll_timeout() if you want an example of something that is hardly > readable ;-). I agree though there's a learning-curve, albeit small, that > it actually creates a function but that doesn't seem to me as big of an > obstacle you seem to think. There's a huge difference between the proposed macro with its I-lost-count-of-how-many arguments and levels of indirection and something like wait_event() which take one condition and has a descriptive name: wait_event(device->misc_wait, atomic_read(&device->ap_pending_cnt) == 0); vs static DEFINE_UART_PORT_TX_HELPER_LIMITED(altera_jtaguart_do_tx_chars, true, writel(ch, port->membase + ALTERA_JTAGUART_DATA_REG), ({})); In the former case, you just need to look at the code to understand what is going on, very much unlike in the latter case. Johan