Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp372662imn; Wed, 3 Aug 2022 07:30:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR7hjTmUZgzVtWbvsLf56PgQvrHdJxFjiurFD97KOVEJoA0rKjQUIwA+9gZd1E3ORUoP8f6s X-Received: by 2002:a17:902:8e89:b0:16d:69b7:49b4 with SMTP id bg9-20020a1709028e8900b0016d69b749b4mr26286922plb.167.1659537015303; Wed, 03 Aug 2022 07:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659537015; cv=none; d=google.com; s=arc-20160816; b=DH8FpjDdCXFoQHNWFVoicYlqnAvJkJc0B+FXXn1lrWpgn479qCmdDtzmVONMb2XEPD +EB1pbSTJ5gxv9ixayK7jMa2FtzeTmWgV+rIXCnnNZIzZ4OuFZkRdDbn2/Tvmm5C3BcD xyqeQzxTNFEYtDKstfzohXPtTAdi5DIl6RRmAmQbbaNbAcCzS4xRue4kHnMLnz6e/ZM0 F7bI5FNhc7T3yI9P0QBUU79giXyPFV2B9afFMQ00eKvt91cAkgPawWzyA8XxlJIDszEw gyYb59IQmeP763phNc2Z8ZMO3QtdAudAExacSAoh4g1AEEX41UDkBfhnoHgB2AojSm3v aOjg== 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=0kFvvVa1Ry8lFNFwqRcLz5HfPPFKIoO5GClVTFVHKAo=; b=sedfFnS/5wh1EWzJAsSMUCxnT4GnQupVwy53Rx2y2FC2eCe8FrMJzbD5zHlU/wD+1p L5LZtdciC/TXYU3fCp3WZjks6w360UMPa6AydxeJW6MtA3ht50vJ2Ku8o2/aa4tN76z/ p5Hc1qm3ekpRGJNWlqib5b3J1eXRbsHtahs9p0B7QM8fo7ml5k9C6ggw3bP0cf+eHETQ T9CBnUNbLb6JhVrAFHxRRfHR2qZhPdBA0jzjzH2HrJwN+A/NdSEOpvk3SA4LaRPzKwG5 /iD+td8v6RTDqKncPN0UGSSdH6mD47G4Ddoh8bx55lhVNeQLJGwbtqsY4fVgDq5+p5XI pS2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Pm+xw36k; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cj6-20020a056a00298600b0052dccbf4079si5933485pfb.220.2022.08.03.07.29.48; Wed, 03 Aug 2022 07:30:15 -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=@chromium.org header.s=google header.b=Pm+xw36k; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238241AbiHCNzQ (ORCPT + 99 others); Wed, 3 Aug 2022 09:55:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238509AbiHCNy5 (ORCPT ); Wed, 3 Aug 2022 09:54:57 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D005B2A26E for ; Wed, 3 Aug 2022 06:54:09 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id gk3so19440066ejb.8 for ; Wed, 03 Aug 2022 06:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=0kFvvVa1Ry8lFNFwqRcLz5HfPPFKIoO5GClVTFVHKAo=; b=Pm+xw36k75MgbBYWtIlvzPVrEx1sxmMi8PhC7QjORA4TpioAt1Y653gXwcZnqM9GAJ uRV1XrvItB7XOV23G8z6Tztth/UWRNpO9yBmRRYZxXJI+jL2XiuM4cAujb2TzKuEofAQ AScoKYAzpWNkClXatjzcWb6M+Nhj0lckjKEBA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=0kFvvVa1Ry8lFNFwqRcLz5HfPPFKIoO5GClVTFVHKAo=; b=KAgUCuYBVmIGcL7sdI5csCLjbroZRTlUnUE6UFAp9Bp3Nlo1aHAjlrbmIU7F1eiGGg HXyFSQrG2isJlfeEh9hgLhD3UDGXECchCKJJMWTMRpuWrWRDWhryd3pCvdhEHO8dnKE7 fbmcUa0w4cnjSRzD12U3trWUgkVfHyIsFW2rnJXsrQjHuMa7Px86fSXMf/SwG6yEyRZG BpoR2JYSzxwGkhFImWsH9E4fO3wfM9t5wcQ4g+ign9UVMEIc4d9cruAs9AMiXE3B1PHl vfVNGzpQXimxvB0UFlcEavKnSZc2ojyHyU7Bp0jNj+JAPHMsJPw4BGSmIbkKtF6kDx0s qGEw== X-Gm-Message-State: AJIora8ivh6VdeIv7DSThHtP36x+T3VFA9ou+trP9fnqACw8mmm4tNC/ 8vZmguchKc1MHQ2LHQdK+ouXc6JR8bueD6XE X-Received: by 2002:a17:907:7f94:b0:72b:47da:4bf3 with SMTP id qk20-20020a1709077f9400b0072b47da4bf3mr20747279ejc.157.1659534848158; Wed, 03 Aug 2022 06:54:08 -0700 (PDT) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com. [209.85.128.49]) by smtp.gmail.com with ESMTPSA id d7-20020a170906304700b0072b92daef1csm7421005ejd.146.2022.08.03.06.54.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Aug 2022 06:54:08 -0700 (PDT) Received: by mail-wm1-f49.google.com with SMTP id c187-20020a1c35c4000000b003a30d88fe8eso972745wma.2 for ; Wed, 03 Aug 2022 06:54:07 -0700 (PDT) X-Received: by 2002:a05:600c:1549:b0:3a3:2aa2:6f60 with SMTP id f9-20020a05600c154900b003a32aa26f60mr2974636wmg.57.1659534836576; Wed, 03 Aug 2022 06:53:56 -0700 (PDT) MIME-Version: 1.0 References: <20220802223738.898592-1-dianders@chromium.org> <20220802153434.v3.5.I55a9e65cb1c22221316629e98768ff473f47a067@changeid> <228e5e34-6467-a75b-129d-2b37b32acf13@linaro.org> In-Reply-To: <228e5e34-6467-a75b-129d-2b37b32acf13@linaro.org> From: Doug Anderson Date: Wed, 3 Aug 2022 06:53:43 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 5/6] drm/msm/dsi: Take advantage of devm_regulator_bulk_get_const() To: Dmitry Baryshkov Cc: Rob Clark , Abhinav Kumar , dri-devel , Mark Brown , linux-arm-msm , freedreno , AngeloGioacchino Del Regno , Bjorn Andersson , Daniel Vetter , David Airlie , Jonathan Marek , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , Konrad Dybcio , Loic Poulain , Marijn Suijten , Rajeev Nandan , Sean Paul , Sireesh Kodali , Stephen Boyd , Vinod Koul , Vladimir Lypak , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Hi, On Wed, Aug 3, 2022 at 12:19 AM Dmitry Baryshkov wrote: > > On 03/08/2022 01:37, Douglas Anderson wrote: > > As of the commit 1de452a0edda ("regulator: core: Allow drivers to > > define their init data as const") we no longer need to do copying of > > regulator bulk data from initdata to something dynamic. Let's take > > advantage of that. > > > > In addition to saving some code, this also moves us to using > > ARRAY_SIZE() to specify how many regulators we have which is less > > error prone. > > > > This gets rid of some layers of wrappers which makes it obvious that > > we can get rid of an extra error print. > > devm_regulator_bulk_get_const() prints errors for you so you don't > > need an extra layer of printing. > > > > In all cases here I have preserved the old settings without any > > investigation about whether the loads being set are sensible. In the > > cases of some of the PHYs if several PHYs in the same file used > > exactly the same settings I had them point to the same data structure. > > > > NOTE: Though I haven't done the math, this is likely an overall > > savings in terms of "static const" data. We previously always > > allocated space for 8 supplies. Each of these supplies took up 36 > > bytes of data (32 for name, 4 for an int). > > > > Signed-off-by: Douglas Anderson > > Ah, so to array conversion is already done. That's great. > > Reviewed-by: Dmitry Baryshkov > > > > --- > > > > Changes in v3: > > - Do all the PHYs too. > > It would have been easier if DSI and DSI PHY were split to separate patches. One of the earlier patches in the series (where we remove the "disable" load) was harder to split since the DSI and DSI PHY code was sharing a single data structure. Once I had one patch touching both at the same time I figured I'd keep them all like that. If you need me to rework them to be separate patches to make it easier to land then please yell. Otherwise I'll assume it's OK. -Doug