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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41973C433EF for ; Wed, 19 Jan 2022 15:01:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355388AbiASPBK (ORCPT ); Wed, 19 Jan 2022 10:01:10 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:46164 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349566AbiASPBK (ORCPT ); Wed, 19 Jan 2022 10:01:10 -0500 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 C6765B81A06; Wed, 19 Jan 2022 15:01:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC12DC004E1; Wed, 19 Jan 2022 15:01:03 +0000 (UTC) Date: Wed, 19 Jan 2022 10:01:02 -0500 From: Steven Rostedt To: Andy Shevchenko Cc: 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 , Andy Shevchenko , 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: <20220119100102.61f9bfde@gandalf.local.home> In-Reply-To: References: <20220119072450.2890107-1-lucas.demarchi@intel.com> <20220119072450.2890107-2-lucas.demarchi@intel.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: On Wed, 19 Jan 2022 11:15:08 +0200 Andy Shevchenko wrote: > > +static inline const char *yesno(bool v) { return v ? "yes" : "no"; } > > > > Perhaps keep it on 4 lines? Yes, yes/no is short, but if we add others > (enable/disable) it will not be possible to keep on one line. And hence > style will be broken among similar functions. Agreed. Functions should always be of the normal format: type func(params) { body; } Unless it is a stub function. type func(params) { return 0; } -- Steve