Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1199427pxb; Fri, 21 Jan 2022 12:05:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKSLQbhiXkZ78MMRQH54a+Yz9BAiahZNYq7PC0sk9ufaKxwf4w+sNx0XMt4jvMEGtypiCn X-Received: by 2002:a17:902:8693:b0:148:a2e8:278d with SMTP id g19-20020a170902869300b00148a2e8278dmr4900193plo.148.1642795522730; Fri, 21 Jan 2022 12:05:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642795522; cv=none; d=google.com; s=arc-20160816; b=P/jxpD4DKke08YEeS2p7jGpZuajW8PhnZZ2ySnO/9eKFTdMhoxOp5AP7MHFCOpR5g8 AiBkGM7aBl8K6Al3/Tx1aEs6Uu2sCWyyreMqsUMOY9eWxpX1TdRmlOli50Aij5LbPrIS 7tX3z7eq+EHQOQO/cnA/GvoSseU7VWuIE58LUDB4uvml+9vvAa9P+ezVZVDJkymDl3av KmbHAzRIKXbes29QW8JuQKEh7U5qN02kFhNSPfkc8whVrUfOADrsp82ghZ8W9Vsuyso5 1D3fzGzTs1oRKyWfnBny55QtYsEqZcxAPJSZugXyHWaaLAZnz+F+9v3klEAHVHuVz654 6nRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=bspuQP3T0hlCK8tbEQKySP37ljQxvaGl/vz9fqnxRLU=; b=fqFCOdSOxKD/z3xJ/+RiyOIZnqImLGS6w1nZDv/xxs0jWbD9KzFFxEwgeR7Mzf5avU RsXbjDFz4ElxCwmQVePxoBgnMWfhyj9DqFUa6ryowDS2EjGr5h/TUFj2jbHobw6TLBXi DmH8GRTeFT8FPr8bdWh+wJ3PjuJGZsOJWENWTRi+1RNPRqLz+uyzQf7ChKuIslDs63Cr HtUlLn8rP7NLpmQ2Z+or2x6CjOTAFi2EhiPFhZ5jkLIoUcH37XwqVeSlRzZFbx501Mjy BdOSC0J5Sg/8gLQraq+sv/a3fwShVktvFF8fHIehX+n25+gouv599gG/mlau6/J3ChgM xJZw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si7857410pfm.13.2022.01.21.12.05.09; Fri, 21 Jan 2022 12:05:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245307AbiASU6d (ORCPT + 99 others); Wed, 19 Jan 2022 15:58:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245242AbiASU60 (ORCPT ); Wed, 19 Jan 2022 15:58:26 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00A3BC061574; Wed, 19 Jan 2022 12:58:25 -0800 (PST) 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 C0646B81B40; Wed, 19 Jan 2022 20:58:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD93AC340E1; Wed, 19 Jan 2022 20:58:19 +0000 (UTC) Date: Wed, 19 Jan 2022 15:58:18 -0500 From: Steven Rostedt To: Andy Shevchenko Cc: David Laight , Lucas De Marchi , "linux-kernel@vger.kernel.org" , "intel-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" , "linux-security-module@vger.kernel.org" , "nouveau@lists.freedesktop.org" , "netdev@vger.kernel.org" , Alex Deucher , Andrew Morton , Ben Skeggs , Christian =?UTF-8?B?S8O2bmln?= , Chris Wilson , Daniel Vetter , David Airlie , "David S . Miller" , Emma Anholt , Eryk Brol , Francis Laniel , Greg Kroah-Hartman , Harry Wentland , Jakub Kicinski , Jani Nikula , Joonas Lahtinen , Julia Lawall , Kentaro Takeda , Leo Li , Mikita Lipski , Petr Mladek , Rahul Lakkireddy , Raju Rangoju , Rasmus Villemoes , Rodrigo Vivi , Sakari Ailus , Sergey Senozhatsky , Vishal Kulkarni Subject: Re: [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation Message-ID: <20220119155818.7ab45e0e@gandalf.local.home> In-Reply-To: References: <20220119072450.2890107-1-lucas.demarchi@intel.com> <20220119072450.2890107-2-lucas.demarchi@intel.com> <20220119100102.61f9bfde@gandalf.local.home> <06420a70f4434c2b8590cc89cad0dd6a@AcuMS.aculab.com> <9c26ca9bf75d494ea966059d9bcbc2b5@AcuMS.aculab.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Jan 2022 21:22:57 +0200 Andy Shevchenko wrote: > On Wed, Jan 19, 2022 at 04:38:26PM +0000, David Laight wrote: > > > > > > +static inline const char *yesno(bool v) { return v ? "yes" : "no"; } > > > > > > return "yes\0no" + v * 4; > > > > > > :-) > > > > except '"no\0\0yes" + v * 4' works a bit better. > > Is it a C code obfuscation contest? > return '/'/'/'; -- Steve