Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1194688pxb; Fri, 21 Jan 2022 11:59:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZLOMhJQvoIA/MI+tNk1i/v+9zBtYappEdXFEE4B38/BUiBipXc60O2PODtnYOOhIlCKK3 X-Received: by 2002:a17:902:b184:b0:149:be5f:c6f3 with SMTP id s4-20020a170902b18400b00149be5fc6f3mr4977364plr.174.1642795196103; Fri, 21 Jan 2022 11:59:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642795196; cv=none; d=google.com; s=arc-20160816; b=JwF4G8yIhmVZLGGL6CovkqIoYzADVcBnb3nKwzO2TUsn+2HGobt9tEgPoNG4PaHq9K WzoihD/8d7qSTXvRs6bS31oAc+ZlknxT4e4mExIioMUOAKWmAbJhfZwvNTj3IDWmmwHu y5ojPnzR3XwLxek1/CQ4RRi+0V+l+Cx8/CVNaA9s5s7wilWs58UyMZV2FmmNZqfdL/ZI bq87z4lZSomNWs/ilH3oQ+gzkM/soKM+G4qoYlXk7vv79EQNT3k5R20tbnkcTy3qGB7A nTRMMJKHs//Iw5dVt5CCxLlfrmkyxo0FTaibRTsmHg0ntd4Xm0ESV215RgZglZu1YTMq cMsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=hrozZoLeF1JbYJDt+ZJ7KXdm+RvcSVYkhBjgQpPkzHw=; b=Z75jR+EepNi5Rpeppl2UBQ5pnjZvmiSDHgh4Rf+pUJ6gqjMjaectCHZA+hB+crcYIl an0LlTkkmGONkRcqLQ5G5cIBBSCWlDmD1kkPApDWKsUdX+kVckxprnA94ArJOH/cQZ7Q dUPSg2sAwxQ/Iem6lmhYYv+ct1osMQ944dHXOab+iYvoold2XzWKvxsgh55yJ72uX/hi jaKnyngdqOUffuJnht72/CRtqazB+6a0Q6C44tXwHp4x5bdJoQ7vdJxQW4NI5W1zlMfn mCfC36ojYOisu9mdBWtcBwGj0tZNexyrjlKeoteiyuc7yf4GAbLCaogL8Ovl4vGq0M7s O3KA== 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 127si6878032pgc.257.2022.01.21.11.59.44; Fri, 21 Jan 2022 11:59:56 -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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357009AbiASTfk (ORCPT + 99 others); Wed, 19 Jan 2022 14:35:40 -0500 Received: from mga14.intel.com ([192.55.52.115]:20338 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240141AbiASTfe (ORCPT ); Wed, 19 Jan 2022 14:35:34 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10231"; a="245369850" X-IronPort-AV: E=Sophos;i="5.88,300,1635231600"; d="scan'208";a="245369850" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2022 11:24:18 -0800 X-IronPort-AV: E=Sophos;i="5.88,300,1635231600"; d="scan'208";a="532444461" Received: from smile.fi.intel.com ([10.237.72.61]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2022 11:24:08 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nAGXp-00CEYE-CW; Wed, 19 Jan 2022 21:22:57 +0200 Date: Wed, 19 Jan 2022 21:22:57 +0200 From: Andy Shevchenko To: David Laight Cc: 'Steven Rostedt' , 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 =?iso-8859-1?Q?K=F6nig?= , 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: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c26ca9bf75d494ea966059d9bcbc2b5@AcuMS.aculab.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- With Best Regards, Andy Shevchenko