Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp317049rwa; Sat, 20 Aug 2022 04:30:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR7ZTo/eV55DNF7hxtMpEf5ANcxCUkF/ArB2gFAnghYsptzN8a8/ihEBAgDe5brgycSkTprM X-Received: by 2002:a17:902:db11:b0:16f:342:a439 with SMTP id m17-20020a170902db1100b0016f0342a439mr11360005plx.13.1660995013683; Sat, 20 Aug 2022 04:30:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660995013; cv=none; d=google.com; s=arc-20160816; b=qVNjjB8AHya3D0VJBVArU3Tiw8lwRYo9e94LiWiH5szSGXv1hWyhTaG0XBP0/lhoLd avedcxAouTcAQwlQXb0D15ZJuahOVYfVjz9lqqtaKO5pYbFmY2wvKvLJdyGu46GBomFT JhJm4lK+y8XRK+mm5989y2r2K2a3DEP4W7NXEjUxS2qhNjIOdpGfZoIswF/f7ZaGiVww 5gfAMnP+bjE+JVhaBxXqCK5Of6EaMmLfJ/YIt37jS3gq1Rg/2moDPX5iywfojTbkSPgQ OV5jTbzlri1nFGI8XpaSvMCwbOYdz7ceZHrOFa5m3vfyUKuTE/VqBsMzSJj8oLIq+hjM v2xQ== 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=DDF8qSMrxBre70Ze2sdrmGoU+msYB6PTY+/D7tauzGA=; b=xVn3MIIZ/0xERffinVLNWLa8LemohLdvit9fCXFAtvMRncesldKClaB0oQBtCmmOsf MytcbGk7ShilJ6qgQ1A//rFpOpGRN2CFnWhNl3evrA/FuXsdqmfrU1MNwzvSx34AJSvg 4HZg/NbCYl8b22jpjRkP2KbpxMc7ktZci0Y2X9u8NtRokjypL1vPlIhvwu2e0yClCk0z gDvT8gHXvVgmdneL+t4uzfc0wOEOf1ek80H2fShEOZe4u4ApCydyHVcMKtUqkps3EdDb iaqdyKsUEbQvtv5CH7v0+w3fSZ7K4cLAMO0yru7zyGsV3PweS08oz0LqRn2Tsv4a5Z5C Rsmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EETcnA+j; 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 z15-20020a170903018f00b0016e00409f22si7419324plg.20.2022.08.20.04.30.01; Sat, 20 Aug 2022 04:30:13 -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=EETcnA+j; 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 S1344493AbiHTL1e (ORCPT + 99 others); Sat, 20 Aug 2022 07:27:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241503AbiHTL1c (ORCPT ); Sat, 20 Aug 2022 07:27:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D58DE220C2; Sat, 20 Aug 2022 04:27:31 -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 ams.source.kernel.org (Postfix) with ESMTPS id 65FF6B80B8E; Sat, 20 Aug 2022 11:27:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D6ABC433C1; Sat, 20 Aug 2022 11:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660994849; bh=2x0Gsy+of145puKe++xz+vCM/2yS9d9yxU3kwmjgqz4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EETcnA+jD97hRAAmnT6LpnuOKiKz0cf2ZhDX152jOU+0vhd5JKKmDBWc6rU1ohN2X HTJ+dGrH/kfKv/MI3DnWCuyHfW3ewXakq+65Qzzk1dLkfG/JmzIQRNIAeY+4qmv0Xg un6NwC6pu458ZeCnSat1dDLnRUy0H+aBuSusBy71bCUW9IosftGlSn/I5RXQQD/D1Q hI0OAK2T3DLQ3t/335ckA5T54Z96c5yYHnvyKEu23D0A2vhd9yhbf4Wx6ET7lSEszQ YoNfp51NDCuN9a9oTLkNsjCWpJMoHbxLgqsQFQYEzmI+N9UMxFl6ZLeaxAmSdmU7GJ 8DRlVGzwMNc5g== Date: Sat, 20 Aug 2022 12:38:04 +0100 From: Jonathan Cameron To: "Vaittinen, Matti" Cc: Andy Shevchenko , Matti Vaittinen , Lars-Peter Clausen , Miaoqian Lin , Andy Shevchenko , Xiang wangx , linux-iio , Linux Kernel Mailing List Subject: Re: [PATCH v3 08/14] iio: bmg160_core: Simplify using devm_regulator_*get_enable() Message-ID: <20220820123707.7f075381@jic23-huawei> In-Reply-To: <795d16f2-4dee-7492-4a87-e928020efebe@fi.rohmeurope.com> References: <3fd11489356b1c73a3d7b4bd9dec7e12c9fe8788.1660934107.git.mazziesaccount@gmail.com> <795d16f2-4dee-7492-4a87-e928020efebe@fi.rohmeurope.com> 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 Sat, 20 Aug 2022 06:19:00 +0000 "Vaittinen, Matti" wrote: > Thanks for the review Andy > > On 8/20/22 02:30, Andy Shevchenko wrote: > > On Fri, Aug 19, 2022 at 10:21 PM Matti Vaittinen > > wrote: > >> > >> Use devm_regulator_bulk_get_enable() instead of open coded bulk-get, > >> bulk-enable, add-action-to-disable-at-detach - pattern. > > > > ... > > > >> int bmg160_core_probe(struct device *dev, struct regmap *regmap, int irq, > >> const char *name) > >> { > >> struct bmg160_data *data; > >> struct iio_dev *indio_dev; > >> int ret; > >> + static const char * const regulators[] = {"vdd", "vddio"}; > > > > Please, keep this following the "longest line first" rule. Note, in > > This was not following the (IMO slightly silly) rule even prior my > patch. I can for sure move my line up - but that won't give you the > "reverse X-mas tree". > > I don't have any real objections on changing the styling though - I > don't expect this to be merged before the dependency is in rc1 - so I > guess I will anyways need to respin this for next cycle. I can do the > styling then. I was a bit surprised Mark didn't do an immutable branch for this, but indeed looks like it's going to be a multiple cycle thing - so we'll probably have a bunch of new cases introduced in the meantime that we need to tidy up. Ah well. > > > this case you even can move it out of the function, so we will see > > clearly that this is (not a hidden) global variable. > > Here I do disagree with you. Moving the array out of the function makes > it _much_ less obvious it is not used outside this function. Reason for > making is "static const" is to allow the data be placed in read-only > area (thanks to Guenter who originally gave me this tip). > > > P.S. Same applies for the rest of the similar places in your series. > > > > Br, > -- Matti >