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 6BB7EEB64D9 for ; Sun, 2 Jul 2023 09:14:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229579AbjGBJOW (ORCPT ); Sun, 2 Jul 2023 05:14:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjGBJOV (ORCPT ); Sun, 2 Jul 2023 05:14:21 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 052091AC; Sun, 2 Jul 2023 02:14:21 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Qv3FP6ld2z67pnp; Sun, 2 Jul 2023 17:11:05 +0800 (CST) Received: from localhost (10.48.51.211) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sun, 2 Jul 2023 10:14:15 +0100 Date: Sun, 2 Jul 2023 17:14:10 +0800 From: Jonathan Cameron To: George Stark CC: , , , , , , , , , , , , Subject: Re: [PATCH v3 1/5] meson saradc: move enums declaration before variables declaration Message-ID: <20230702171410.00007827@Huawei.com> In-Reply-To: <20230627224017.1724097-2-gnstark@sberdevices.ru> References: <20230627224017.1724097-1-gnstark@sberdevices.ru> <20230627224017.1724097-2-gnstark@sberdevices.ru> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.48.51.211] X-ClientProxiedBy: lhrpeml500004.china.huawei.com (7.191.163.9) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Wed, 28 Jun 2023 01:37:14 +0300 George Stark wrote: > Move enums declaration before variables declaration. > This is fairly harmless, but would be nice to say 'why'. Is this just for consistency with the rest of the driver or will it be required after changes later in the patch set? > Signed-off-by: George Stark > --- > drivers/iio/adc/meson_saradc.c | 44 +++++++++++++++++----------------- > 1 file changed, 22 insertions(+), 22 deletions(-) > > diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c > index 18937a262af6..af38d95bd504 100644 > --- a/drivers/iio/adc/meson_saradc.c > +++ b/drivers/iio/adc/meson_saradc.c > @@ -202,6 +202,28 @@ > .datasheet_name = "TEMP_SENSOR", \ > } > > +enum meson_sar_adc_avg_mode { > + NO_AVERAGING = 0x0, > + MEAN_AVERAGING = 0x1, > + MEDIAN_AVERAGING = 0x2, > +}; > + > +enum meson_sar_adc_num_samples { > + ONE_SAMPLE = 0x0, > + TWO_SAMPLES = 0x1, > + FOUR_SAMPLES = 0x2, > + EIGHT_SAMPLES = 0x3, > +}; > + > +enum meson_sar_adc_chan7_mux_sel { > + CHAN7_MUX_VSS = 0x0, > + CHAN7_MUX_VDD_DIV4 = 0x1, > + CHAN7_MUX_VDD_DIV2 = 0x2, > + CHAN7_MUX_VDD_MUL3_DIV4 = 0x3, > + CHAN7_MUX_VDD = 0x4, > + CHAN7_MUX_CH7_INPUT = 0x7, > +}; > + > static const struct iio_chan_spec meson_sar_adc_iio_channels[] = { > MESON_SAR_ADC_CHAN(0), > MESON_SAR_ADC_CHAN(1), > @@ -227,28 +249,6 @@ static const struct iio_chan_spec meson_sar_adc_and_temp_iio_channels[] = { > IIO_CHAN_SOFT_TIMESTAMP(9), > }; > > -enum meson_sar_adc_avg_mode { > - NO_AVERAGING = 0x0, > - MEAN_AVERAGING = 0x1, > - MEDIAN_AVERAGING = 0x2, > -}; > - > -enum meson_sar_adc_num_samples { > - ONE_SAMPLE = 0x0, > - TWO_SAMPLES = 0x1, > - FOUR_SAMPLES = 0x2, > - EIGHT_SAMPLES = 0x3, > -}; > - > -enum meson_sar_adc_chan7_mux_sel { > - CHAN7_MUX_VSS = 0x0, > - CHAN7_MUX_VDD_DIV4 = 0x1, > - CHAN7_MUX_VDD_DIV2 = 0x2, > - CHAN7_MUX_VDD_MUL3_DIV4 = 0x3, > - CHAN7_MUX_VDD = 0x4, > - CHAN7_MUX_CH7_INPUT = 0x7, > -}; > - > struct meson_sar_adc_param { > bool has_bl30_integration; > unsigned long clock_rate;