Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31217481rwd; Thu, 6 Jul 2023 18:05:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlFVDEvvxHzHX5sGWU6XkGqnmXCrhAditXN0WG0Qu+4C9neBBQK/92Uf9lL9BkDTt4jdYtfe X-Received: by 2002:a17:902:d501:b0:1b8:5bd0:fe12 with SMTP id b1-20020a170902d50100b001b85bd0fe12mr4589596plg.16.1688691941000; Thu, 06 Jul 2023 18:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688691940; cv=none; d=google.com; s=arc-20160816; b=lDxRYkjNslpho6kuI8S1WPPi4UUcF5cnqFNz1kyY3x5Yl3OLJgeLDpxOOzNVz1mPOb XxAVaI7vQ9fDqycwy8PPGijGAPa3MB/xhH9UeX0d/XwI2sIbVLgXuhcQ6Uk1eCNDjMOv GaV+jss4UpdLtzvfGnbhwTbnjcfX5WvmWmcNHh9oJn0b6n7wmFHrLZSg5SstBBj5OkI7 E4yfReGZcqJSrYbsSaODODxdxraR6V2O4ZLqMonQl4PRNHN9JnZX9YlJ6Pqx4YvDXOpt HOXZvKzVYtB5IOTsL5b9nF4AYbMbdJ7aeQvPV1DjmQ+hvRVvLn6S/8m08s3+g0ji1zoO UajQ== 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:date:subject:cc:to:from; bh=Dv2gy/Ml28++K09mtmH8tWTE8Lo2PHTAhjkAUPtBBE8=; fh=WzRG3WH3uvRbKqWQdKb+SWZNQhoyocMFA6Hw0LDjFNQ=; b=kFzhmMXRNOV1Cv6QkN42tEFBYO/nU8XgWYEcn33o320y7WX3v3UwMpoijw1zIGhYlX XmT0y0C5j7PTuDGk0gyG5xXRUion443C1NLja7QA1z891gVNxI2SDhxyNrvkHpe1Pb5m jTK9Fkup2JioOr8BnwDl1pe0rUyffmNdzITymBwcuLypNqQEcV+gp0dbrkej7zwzwTBR rko89EHT4tT6Zp9bZBmkYlfE4jNyrIF3puBi2urGpUkN68co0sOk9MQko0UNZ7niUXcN XiSna1j9cFFdZxl2LWAgz1oEkex+uKUxgqUelH41eg9JIpR1vigt61x2lrfkfC6TsEv4 /bVw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s12-20020a170903200c00b001b8946f3f95si2220078pla.312.2023.07.06.18.05.26; Thu, 06 Jul 2023 18:05:40 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232159AbjGGAhS (ORCPT + 99 others); Thu, 6 Jul 2023 20:37:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230445AbjGGAhR (ORCPT ); Thu, 6 Jul 2023 20:37:17 -0400 Received: from mail-sh.amlogic.com (mail-sh.amlogic.com [58.32.228.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50BC619BD; Thu, 6 Jul 2023 17:37:16 -0700 (PDT) Received: from droid01-cd.amlogic.com (10.98.11.200) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.2507.13; Fri, 7 Jul 2023 08:37:06 +0800 From: Xianwei Zhao To: , , , CC: Rob Herring , Krzysztof Kozlowski , Conor Dooley , "Neil Armstrong" , Kevin Hilman , Xianwei Zhao Subject: [PATCH V2 1/4] soc: amlogic: use name instead of index as criterion Date: Fri, 7 Jul 2023 08:37:07 +0800 Message-ID: <20230707003710.2667989-2-xianwei.zhao@amlogic.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230707003710.2667989-1-xianwei.zhao@amlogic.com> References: <20230707003710.2667989-1-xianwei.zhao@amlogic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.98.11.200] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 The variate 'index' could be equal to zero in some SoCs. Such as C3 SoC, PWRC_C3_NNA_ID be defined zero. Use 'name' instead of 'index' as criterion. Signed-off-by: Xianwei Zhao --- V1 -> V2: add a new patch for change. --- drivers/soc/amlogic/meson-secure-pwrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c index 25b4b71df9b8..c11d65a3e3d9 100644 --- a/drivers/soc/amlogic/meson-secure-pwrc.c +++ b/drivers/soc/amlogic/meson-secure-pwrc.c @@ -179,7 +179,7 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev) for (i = 0 ; i < match->count ; ++i) { struct meson_secure_pwrc_domain *dom = &pwrc->domains[i]; - if (!match->domains[i].index) + if (!match->domains[i].name) continue; dom->pwrc = pwrc; -- 2.37.1