Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1200754pxb; Fri, 21 Jan 2022 12:06:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOdlmcijqqWHn2s/TSCFRhqff41VCU0oo3yKJSTH5wQdp5ZD1KnjNDv7Kc5S8RvLyil4HW X-Received: by 2002:a05:6a00:2181:b0:4c1:3b84:b43f with SMTP id h1-20020a056a00218100b004c13b84b43fmr5254361pfi.50.1642795614223; Fri, 21 Jan 2022 12:06:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642795614; cv=none; d=google.com; s=arc-20160816; b=mIH3szvpgfQvG7M77QSU+5mIC8jRSvcTfFbVPODyczGmr1zsyiVWR5dBLbddiXGiCl 6ozkDeoHnEdX5JwYkkQInQfpEFEy0vFqgHZelvmvLaHmfZPAkhiEW60FRXXi8MGzMJrb RkNz1n2HrdbP1+FAeo2bISnnoFwDThoi6G0HHaPBHx3ZRf6f4Bi3d+3RpHlD+ooX/2MP P+m7F8E26PrtASv0C4V85rRbSzoDCson64kmQrTKEfeNNo0firg+4CGo8PVivy1jVLPJ ecGe/hrc8ZM/r/Xiz8mQRP8B4jYA9/bnPQee3a9jRml6U4POQA9Zm72pLXQuBGV70pP2 cuug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=y2xKUwt6SNoMoA3pSfGguZI371sd92xTaP2x/+ECvUQ=; b=sPWzCMueaby0RD5C2X4eVPOeimUQFgr5AhdegF8ffi64XLb0v8OStJxu6bksH7I2N/ Iosr4KySodVjJHku8N0Tqy5ozq8uX/i/p3W0MBGfvleUf+bB5vxYHGq/07MPtTumIof6 zhlsNkUpexLfq33KvceL81thC3nLLW2KKq3fiR+Z7aAGnZ+3TIFDvuD9ZF4VoaqsKr2s wwhjyL/EL1a3cfH4ogZJywHCIaUR9efaydD+OGxtuIqmt33QNzlVtfBkTE1Vi2tLZGJ/ Ykho2BaHz0oAqrkOx27L8nZ+kcxHWsjZEfb4fzD5zWmvDg0/fudmfYqUb1eLjUMZDy61 ka1g== 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=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w25si6847670pgk.153.2022.01.21.12.06.41; Fri, 21 Jan 2022 12:06:54 -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=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357541AbiASWZM convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 Jan 2022 17:25:12 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:39280 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357507AbiASWZF (ORCPT ); Wed, 19 Jan 2022 17:25:05 -0500 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-3-gc2FjgmsNLmz-uRweWCGWA-1; Wed, 19 Jan 2022 22:25:02 +0000 X-MC-Unique: gc2FjgmsNLmz-uRweWCGWA-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Wed, 19 Jan 2022 22:25:00 +0000 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.028; Wed, 19 Jan 2022 22:25:00 +0000 From: David Laight To: 'Andy Shevchenko' 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 , =?iso-8859-1?Q?Christian_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 Thread-Topic: [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation Thread-Index: AQHYDUVmV8sHy8JfXU2yTPkp1VbmK6xqitzAgAAAVLCAAC4ygIAAMm1Q Date: Wed, 19 Jan 2022 22:25:00 +0000 Message-ID: <2978e422e33f48f0bd07d937cdab13a5@AcuMS.aculab.com> 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> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > except '"no\0\0yes" + v * 4' works a bit better. > > Is it a C code obfuscation contest? That would be: return &(v * 3)["no\0yes"]; :-) - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)