Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1936461rwb; Fri, 19 Aug 2022 12:02:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Asxnljs9wniEFQ3SxlrQDrHHwEQvBeRJnsoO07LKOXk3aer2s3fM/LFsdFbtsJKzcfke7 X-Received: by 2002:a17:902:f70d:b0:16c:50a2:78d1 with SMTP id h13-20020a170902f70d00b0016c50a278d1mr8647436plo.34.1660935720235; Fri, 19 Aug 2022 12:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660935720; cv=none; d=google.com; s=arc-20160816; b=q0SWspKwTw6zLK0t/Qp4yPTQXraGuQRIBGYNaEO4YV2OC9u7yMJPOgFR90QSn1mUBE NjPVqV2YFKkfqr440N++wW2hoDJCE0wXNtgR3CHDqXMcSE2wAYD2N1R+wDC1ZsKbdGss 0WHsaTFMZ259DDydUjGxc1j0L+iygT9PHaudimHcsYe5XtFpRBP3jFRdEySZkfUcc1VO yq2RJfhyLbvzID8S3FZQa48+XQYM6Q+liDp+wQviS/M+Zk+tnzZhJcnjag+N/hXrL35Y RDAkyb5+HbfPIRVhcJB7H923cb/6mjtEKz8lhedkbbcYziKaEjE4jFqQRbsaQUs5MvJO yzkw== 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 :dkim-signature; bh=LnXKQE1jHrmJy87mXJT/8F+1DiyLQi7GtY8zvCZ5KY4=; b=nrv1Ft+06nKAEuc9wwJ9cxDK5AovzwgGP903lIOBswoWg0oHK8ScrhYxT6HE3DMafO uFJQXylDVMnzckp37lISwAp5ERF5lAhN/L78jyLrrb/aBUlPOCh4Cpe+IK7toXjV6fdn aHafdwOZLlCtRnEd0JlcrGRp7B0vqxhy7nBd9NvZw7a+Hstes/uVeTYW/SB3udqyDx3u xlQT2799L2tKjA1TSs4AZzXfokp0T57jUEEJctfa0heIaM654QUssbzFsovIS5+LX4qS GOH9p96FkZZEK8FU3d4QNZqgamHNOcVAVynsSV6Bb2M42esfUpBN6j1MXW/LBljTsI89 ehLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YNIqkyrR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a170902740c00b0016b7b134ab7si4366437pll.368.2022.08.19.12.01.47; Fri, 19 Aug 2022 12:02:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YNIqkyrR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349895AbiHSSE1 (ORCPT + 99 others); Fri, 19 Aug 2022 14:04:27 -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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; > >