Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6441281pxb; Wed, 17 Feb 2021 04:51:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHmkOHAWRLlKLvsZXGEjXAGdepuFJYdgkcjfzdbujWJ6yDoEAPk6L3rkl1uxZxrSJSxCX4 X-Received: by 2002:a17:906:5798:: with SMTP id k24mr2307709ejq.125.1613566307135; Wed, 17 Feb 2021 04:51:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613566307; cv=none; d=google.com; s=arc-20160816; b=gFJogFmHTVdGkK+HPlmYkIrWPv1KoKuHe/Cu1nvqv6MMvkVwQ8l6kMY1lvZVNhTaYW uSGnTJwAeiR4AaJtJ0WtdI9bO8vutOkMuC2nwzDZSmBz8ZWzwjHXmajf2FwVVWJQIgiH 5Y/Ob/0z24MNWt5dCe7Qv3VP5YfleaUjPA9ma2Uulk9OSHH3s/2pEZUWf8QfCJf7Q4cS E/QStCNlyMXXXHmAXJTZh9YMT2t195k8pGFLGVpy7WGec7BfMtsLM4ywQeDiBT2QNgJL PGQM7XosO6Qx+W3aGK9yPKFwAMbH9KjTu6Sz9xBJQB65eFP9iYw2WnZLTyBhjhBBxXRk hlnw== 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=N00yAhsyZbw+Nel/sbxQYAWqciOhUzp9bz7wDMnc5es=; b=agEcOQ5Bu0X3ITA2nmz9/NU2OGa3m81iy4e1Id2o8PdCydf+dZm3YvR+jivrFDVEsP KfiPnt3IFD+/oeXmH5OzYSXjpvIk/ngPDwWIv1g/mZEKWREWECThyrChu3P7bo0/3cfd 6aBRctzc1+KEBEI7xMuurXxOz7u7YOdk4JutdTJo8Q+SW9DZGddaBoD6AZDNfrk7YfH/ o2Nu/x8wZ7dYRVg+M0ugbDyJNjfzQlLTWQu30etaazaMb1O3gccRkliMV4HvGMc3Yzwz UTZ/7Fo0fvPOJ5Spk+Pg8x8mHJMBKnp1xhWMVlhKAoqPQWZtxKnxkuG5NmAVQhi1BY1D A/Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=X95Zya3L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si1261274edn.168.2021.02.17.04.51.16; Wed, 17 Feb 2021 04:51:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=X95Zya3L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232782AbhBQMqt (ORCPT + 99 others); Wed, 17 Feb 2021 07:46:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:41734 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232688AbhBQMqq (ORCPT ); Wed, 17 Feb 2021 07:46:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1613565959; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N00yAhsyZbw+Nel/sbxQYAWqciOhUzp9bz7wDMnc5es=; b=X95Zya3LHME58OqF/fGOges5Ys2yN9XI9UOk1w4f4CQcA/Ji7pUuY5gTbuBmcaGxOAAlR0 VZlYkf6Brip0RW+RZIDnZtVwCKLZ31/SZOAFdyEPBkyMeDAlAl+SNdaLEKU6ksQT1aIM19 vTTytiQ0WWvTgFE3S2DIgxsEVdTyXiM= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4C233AF26; Wed, 17 Feb 2021 12:45:59 +0000 (UTC) Date: Wed, 17 Feb 2021 13:45:58 +0100 From: Petr Mladek To: Andy Shevchenko Cc: Christian =?iso-8859-1?Q?K=F6nig?= , Sakari Ailus , Rasmus Villemoes , Sergey Senozhatsky , Steven Rostedt , Andy Shevchenko , Alex Deucher , Mikita Lipski , Eryk Brol , Chris Wilson , "David S. Miller" , Rahul Lakkireddy , Francis Laniel , amd-gfx@lists.freedesktop.org, dri-devel , Linux Kernel Mailing List , intel-gfx , netdev , Harry Wentland , Leo Li , David Airlie , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Raju Rangoju , Jakub Kicinski Subject: Re: [PATCH v1 1/3] string: Consolidate yesno() helpers under string.h hood Message-ID: References: <20210215142137.64476-1-andriy.shevchenko@linux.intel.com> <43456ba7-c372-84cc-4949-dcb817188e21@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2021-02-15 16:39:26, Andy Shevchenko wrote: > +Cc: Sakari and printk people > > On Mon, Feb 15, 2021 at 4:28 PM Christian K?nig > wrote: > > Am 15.02.21 um 15:21 schrieb Andy Shevchenko: > > > We have already few similar implementation and a lot of code that can benefit > > > of the yesno() helper. Consolidate yesno() helpers under string.h hood. > > > > > > Signed-off-by: Andy Shevchenko > > > > Looks like a good idea to me, feel free to add an Acked-by: Christian > > K?nig to the series. > > Thanks. > > > But looking at the use cases for this, wouldn't it make more sense to > > teach kprintf some new format modifier for this? > > As a next step? IIRC Sakari has at some point the series converted > yesno and Co. to something which I don't remember the details of. > > Guys, what do you think? Honestly, I think that yesno() is much easier to understand than %py. And %py[DOY] looks really scary. It has been suggested at https://lore.kernel.org/lkml/YCqaNnr7ynRydczE@smile.fi.intel.com/#t Yes, enabledisable() is hard to parse but it is still self-explaining and can be found easily by cscope. On the contrary, %pyD will likely print some python code and it is not clear if it would be compatible with v3. I am just kidding but you get the picture. Best Regards, Petr