Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1077422iob; Wed, 4 May 2022 14:11:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUi8pko0z1s1hYM61Qk4aXogsfuXrDjONbf6SGSS8NfEbpnuCK+ZRQ96ZSfRrIMT7bi8aU X-Received: by 2002:a17:907:6e04:b0:6f4:d6f3:c72a with SMTP id sd4-20020a1709076e0400b006f4d6f3c72amr2960431ejc.636.1651698706312; Wed, 04 May 2022 14:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651698706; cv=none; d=google.com; s=arc-20160816; b=KOJ6Drt5yHOsliVshSFXm/zBDV1d/bxoKQq7AIhzvNFEtGErMuBcE2GpWDCn4y0JYS ohQT05DFGz+szBVKZFu3Dr2TUlBNM2iUjDLXcSfUXG746+pdqsNIYNRRPM+aClmiUzTl eHEc320qQw/wgPPb2DxpwacqpW+otSGM/MPcOtNXqO8M+eCGcMr2ZsqbR2xQggcfeA0I AuwIfY2tzD0hpStNC6TN52mXFrO1xjHBpp6xCubW1iFg3FBqCMd87s1e53WOFxrKJCfI 2zGD1jRCb0brkxyZ1IlK97vc/DaqZNPc3X49WoF3IQhy74NlkJItg7CB0Gc98QbuM0fo CAcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BT8BrcD290OhlXLzO/WMuO9iyvHDkVdQoNtwipl/it8=; b=srtisQs7HJwhOaYJG8ZkVobi++J1MY7l5vsC5eTlrawOQTivlLgdViHYht3MuUX8Vt Bh9XURe2iJAa7kdG4qi74g+bpAQycxYrOVLXFn8X344whWbkXwvfPSdKJ8cm0t06rHGN 5ppZ6C5Ni5Ffv0DLw9TdjNn+BSP0GWNVdX4Oc/Zn0/9BReKoRapIHa6EFx2YYmNuLcGy WCEbBtgVao8r2CDKMDcOBk6SMAcCVskDZo95FIhIKkGMmQZqlVCaCZla5Xl7S3IzO2gT R5Xk+fZp4BchfCuR+kYtjKPZyec4pA0A7w9z60hc0VXiEIHuyV/UWaut5kJY34YBqFlI 5RdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=f8YKGkv9; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a5099c4000000b0041dc855e2e6si18582285edb.105.2022.05.04.14.11.21; Wed, 04 May 2022 14:11:46 -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=@gmail.com header.s=20210112 header.b=f8YKGkv9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351400AbiEDOnH (ORCPT + 99 others); Wed, 4 May 2022 10:43:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351382AbiEDOnF (ORCPT ); Wed, 4 May 2022 10:43:05 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1F3341306; Wed, 4 May 2022 07:39:28 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id j6so3262797ejc.13; Wed, 04 May 2022 07:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BT8BrcD290OhlXLzO/WMuO9iyvHDkVdQoNtwipl/it8=; b=f8YKGkv96KqipMGRLRAqtvYuQU5pcL6bmvh6APgrpuajxzd6KJ1Yi0yaw0Vqv5XqpG AIPrhM5kOXh4mzvaKjBInTE6626gSl/2PBj7QwowFxDd9WZVH/ya8UQGvaooKmhbSGSk fJpuhfxPEUPMjW2r9EY6iUJy+Fz18cUlByOEqfMVBLhwriao+eUMc0+x1aggqNjt3Itz /xAAIYm4ebEfc0sXMnU8cC9gmFgVcTdU3Ww4ivSjWKep2YKEx9lVl2zjhaAfAlbVd7ml t1c2Zo8pwu7pelWphHS1o8zr+rY8uvTk+omRxkkxQD2DZQDnZJ8FJg6zIpabPB68A7NF bdLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BT8BrcD290OhlXLzO/WMuO9iyvHDkVdQoNtwipl/it8=; b=3WaZ4mcIziG/QUpsect0G59F76i1tFAlMf0n3EyKBteu9gyyS1XWs7ZCozknHkAU6B jIUxPFhXGM5C0QAE60yEJRtbWjmuqKxERCV5+iS88aDl620O9psXwvWgbZOoMI7t5jUQ ngOnV4UgScWMZUq33fkcPtw+wKAHyD7lEe9AfO7J/SOD3vyT/slA7W6oHYOzwe9H31Bv 9mKaABsP3juV99roWsDtOaVFOUFWmQjZWIPMlq/uGSBW/QM6LTZC5xqKcvvTt+POXaAe jVaNR9KosHVsVTZIyNLNnCFCUBDgokoMydUKz25KPedYsCZIJmBSy/oYXr1XidfLOPjw lY7w== X-Gm-Message-State: AOAM530Zem37HGQ6IP8ZswrEb8MJlQx9UmHSwVLm/xLdbE/C/nVoNo/J GA5kvD/Zj0ZjMI8nKhJL3eMUVLXnwPOj/mnEptWD1T/P+Q1A9u0M X-Received: by 2002:a17:907:6e04:b0:6f4:d6f3:c72a with SMTP id sd4-20020a1709076e0400b006f4d6f3c72amr1151943ejc.636.1651675167204; Wed, 04 May 2022 07:39:27 -0700 (PDT) MIME-Version: 1.0 References: <20220504133612.604304-1-Qing-wu.Li@leica-geosystems.com.cn> <20220504133612.604304-4-Qing-wu.Li@leica-geosystems.com.cn> In-Reply-To: From: Andy Shevchenko Date: Wed, 4 May 2022 16:38:51 +0200 Message-ID: Subject: Re: [PATCH V3 3/5] iio: accel: sca3300: modified to support multi chips To: LI Qingwu Cc: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Tomas Melin , devicetree , Linux Kernel Mailing List , linux-iio , Rob Herring Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Wed, May 4, 2022 at 4:35 PM LI Qingwu wrote: > > From: Andy Shevchenko > > Sent: Wednesday, May 4, 2022 10:20 PM > > On Wed, May 4, 2022 at 3:36 PM LI Qingwu > > wrote: ... > > > +struct sca3300_chip_info { > > > + const struct iio_chan_spec *channels; > > > + const int (*accel_scale_table)[2]; > > > + const int *accel_scale_modes_map; > > > + const unsigned long *scan_masks; > > > + const int *avail_modes_table; > > > + const int *freq_modes_map; > > > + const int *freq_table; > > > + const u8 num_accel_scales; > > > + const u8 num_avail_modes; > > > + const u8 num_channels; > > > + const u8 num_freqs; > > > + const u8 chip_id; > > > > Why do you have const qualifier on all members? The last one is > > understandable, but the rest, esp. pointers should be justified. > Because I thought it was static and has fix value for each chip, unacceptable for you? But why const qualifier? What is the point of it for example for u8 members if the entire object is qualified as const below in the same patch? On top of that, please explain what in your opinion the "const ... *foo" gives us, and what we will lose if we remove the "const" part out of them. > > > + const char *name; > > > +}; -- With Best Regards, Andy Shevchenko