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 X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B43EC433DB for ; Wed, 17 Feb 2021 12:46:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4BE1664D7F for ; Wed, 17 Feb 2021 12:46:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232799AbhBQMqw (ORCPT ); Wed, 17 Feb 2021 07:46:52 -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 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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C775C433DB for ; Wed, 17 Feb 2021 12:46:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C496D64D7F for ; Wed, 17 Feb 2021 12:46:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C496D64D7F Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 478F16E0CF; Wed, 17 Feb 2021 12:46:02 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id D89126E08C; Wed, 17 Feb 2021 12:46:00 +0000 (UTC) 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 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-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Rasmus Villemoes , dri-devel , Chris Wilson , Francis Laniel , Andy Shevchenko , amd-gfx@lists.freedesktop.org, Jakub Kicinski , Sakari Ailus , Leo Li , intel-gfx , Steven Rostedt , Rahul Lakkireddy , Rodrigo Vivi , Mikita Lipski , Eryk Brol , netdev , Linux Kernel Mailing List , Christian =?iso-8859-1?Q?K=F6nig?= , Sergey Senozhatsky , Raju Rangoju , Alex Deucher , "David S. Miller" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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=F6nig > 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 ho= od. > > > > > > Signed-off-by: Andy Shevchenko > > > > Looks like a good idea to me, feel free to add an Acked-by: Christian > > K=F6nig 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8437C433DB for ; Wed, 17 Feb 2021 12:46:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5E2164D7F for ; Wed, 17 Feb 2021 12:46:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5E2164D7F Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 077826E08C; Wed, 17 Feb 2021 12:46:02 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id D89126E08C; Wed, 17 Feb 2021 12:46:00 +0000 (UTC) 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 Message-ID: References: <20210215142137.64476-1-andriy.shevchenko@linux.intel.com> <43456ba7-c372-84cc-4949-dcb817188e21@amd.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [Intel-gfx] [PATCH v1 1/3] string: Consolidate yesno() helpers under string.h hood X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Rasmus Villemoes , dri-devel , Chris Wilson , Francis Laniel , Andy Shevchenko , amd-gfx@lists.freedesktop.org, Jakub Kicinski , Harry Wentland , Sakari Ailus , Leo Li , intel-gfx , Steven Rostedt , Rahul Lakkireddy , Mikita Lipski , Eryk Brol , netdev , Linux Kernel Mailing List , Christian =?iso-8859-1?Q?K=F6nig?= , Sergey Senozhatsky , Raju Rangoju , Alex Deucher , "David S. Miller" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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=F6nig > 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 ho= od. > > > > > > Signed-off-by: Andy Shevchenko > > > > Looks like a good idea to me, feel free to add an Acked-by: Christian > > K=F6nig 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 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx 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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBD51C433E0 for ; Wed, 17 Feb 2021 13:32:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9637E64D5D for ; Wed, 17 Feb 2021 13:32:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9637E64D5D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 53DE76E529; Wed, 17 Feb 2021 13:32:18 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id D89126E08C; Wed, 17 Feb 2021 12:46:00 +0000 (UTC) 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 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-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Wed, 17 Feb 2021 13:32:17 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Joonas Lahtinen , Rasmus Villemoes , dri-devel , Chris Wilson , Francis Laniel , Andy Shevchenko , amd-gfx@lists.freedesktop.org, Jakub Kicinski , Harry Wentland , Sakari Ailus , Leo Li , intel-gfx , Steven Rostedt , Rahul Lakkireddy , Jani Nikula , Rodrigo Vivi , Mikita Lipski , Eryk Brol , netdev , Linux Kernel Mailing List , Christian =?iso-8859-1?Q?K=F6nig?= , Sergey Senozhatsky , Daniel Vetter , Raju Rangoju , Alex Deucher , "David S. Miller" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" 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=F6nig > 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 ho= od. > > > > > > Signed-off-by: Andy Shevchenko > > > > Looks like a good idea to me, feel free to add an Acked-by: Christian > > K=F6nig 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 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx