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 AD03BC28B2B for ; Fri, 19 Aug 2022 18:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350160AbiHSSEU (ORCPT ); Fri, 19 Aug 2022 14:04:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349807AbiHSSD6 (ORCPT ); Fri, 19 Aug 2022 14:03:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A53F63F2E; Fri, 19 Aug 2022 10:49:53 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id DA4876186D; Fri, 19 Aug 2022 17:49:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4C1EC433D6; Fri, 19 Aug 2022 17:49:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660931392; bh=XMlk3D/uGMkXZBaYH68xGUpyRvK9o5OVs002Yxl4T9I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YNIqkyrR2+wWSotUwuIYnIk4n45l9lpznKwr8ZqiJyDNHO/OcsQy6hx2H2o7XTNao eJ+5fB6AgAxiRLRBfc8Co78SwJo7yEYSK166pzRK/crcVcQnbEJa7QZ92pFp0drhFF 6LxrgTpIwf1fAJGy6eyRvnGIoTykSm7gqb/4ABiUTibXIfwOLUNyeGWnD4S1SacmqH pXM/yIHzGzykuL9cTqb5qKoZILio69MZIXNQy8oNyuxI3kaoemU9j1meqEYEWbkSfA PCJgIBLYNiHMlxy1JIUVM95/elpq5lworGqlKLawK1oBlGBWWhbDGLvImOXu/KZ4Bk vrHHbyczlLCUg== Date: Fri, 19 Aug 2022 19:00:25 +0100 From: Jonathan Cameron To: Dmitry Rokosov Cc: Andy Shevchenko , "akpm@linux-foundation.org" , "robh+dt@kernel.org" , "andriy.shevchenko@linux.intel.com" , "christophe.jaillet@wanadoo.fr" , "stano.jakubek@gmail.com" , "shawnguo@kernel.org" , "stephan@gerhold.net" , "daniel.lezcano@linaro.org" , "wsa@kernel.org" , "lars@metafoo.de" , "Michael.Hennerich@analog.com" , "jbhayana@google.com" , "lucas.demarchi@intel.com" , "jani.nikula@intel.com" , "linus.walleij@linaro.org" , "linux-iio@vger.kernel.org" , kernel , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v6 3/4] iio: add MEMSensing MSA311 3-axis accelerometer driver Message-ID: <20220819190025.7702573b@jic23-huawei> In-Reply-To: <20220819125818.37qc66akgercd6zb@CAB-WSD-L081021.sigma.sbrf.ru> References: <20220816191842.14020-1-ddrokosov@sberdevices.ru> <20220816191842.14020-4-ddrokosov@sberdevices.ru> <20220819125818.37qc66akgercd6zb@CAB-WSD-L081021.sigma.sbrf.ru> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; 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: devicetree@vger.kernel.org On Fri, 19 Aug 2022 12:57:54 +0000 Dmitry Rokosov wrote: > On Fri, Aug 19, 2022 at 11:41:55AM +0300, Andy Shevchenko wrote: > > [...] > > > > Spec: https://cdn-shop.adafruit.com/product-files/5309/MSA311-V1.1-ENG.pdf > > > > Have you ever seen such a tag? > > We have the Datasheet that is more or less established for this kind of links. > > As I mentioned before, if I use Datasheet tag, line length limit will be > exceeded. If it's okay, I don't mind. Fine to go long. If someone can't see the remaining chars of a link on their 80 character wide terminal - they can scroll sideways :) > > > > > +static inline int msa311_set_odr(struct msa311_priv *msa311, unsigned int odr) > > > > Why inline? > > > > Why not? :) It's short function which is good to be inline, I think. Let the compiler decide that. Generally in kernel code, inline is reserved for the few places it's necessary or where compilers have been shown to get it wrong. > > > > +{ > > > + struct device *dev = msa311->dev; > > > + unsigned int pwr_mode; > > > > > + bool good_odr = false; > >