From patchwork Wed Jul 28 14:42:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 488091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22EACC4338F for ; Wed, 28 Jul 2021 14:42:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08D5661051 for ; Wed, 28 Jul 2021 14:42:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236830AbhG1Omm (ORCPT ); Wed, 28 Jul 2021 10:42:42 -0400 Received: from smtp-relay-canonical-1.canonical.com ([185.125.188.121]:56716 "EHLO smtp-relay-canonical-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236731AbhG1Oml (ORCPT ); Wed, 28 Jul 2021 10:42:41 -0400 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id 15FD9402C2 for ; Wed, 28 Jul 2021 14:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627483359; bh=HAie+4ObP5wDsqMY5KGCgt4d7K8iKvd4Bvw66slM+7o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EJ1ngy8+YbC3nMzKPdN+X4aZs1bkJNRgVeiOtwtBOTZX/dT5w8ohRuwbvzx1gjlWB jQPgBPlXwcoToE0jonF1ALcfZciu30YV7thA36215FgV9bi2BZBEc+zXKutKyBA1sE 8up1q21O3eof05/vuseQLgITXtnYt6c1ghS6wUlIPt3CHi/ZpVE6B+GDk0HEQLGyyr Kgw525b8mXFR7AQqxhzSU04woY92ZIwBMS5Y7qJ5cJmx8jDJgaBKrSC1UEsRhzQKba AIOzOenw9FCKzBwP9s31U+aoetzBCx+PZTqC/skv/oq8A097EaowOzNczNUEA7gVsR zWWaIF6QZPScw== Received: by mail-ej1-f72.google.com with SMTP id c18-20020a1709067632b02905478dfedcafso888956ejn.21 for ; Wed, 28 Jul 2021 07:42:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HAie+4ObP5wDsqMY5KGCgt4d7K8iKvd4Bvw66slM+7o=; b=n5jBmYw/tbW42omeMntMDQDr97b7Em5DrA9o7vM4f9eSQmGRyNrtDUOUt9g2LUQDHD 2Bpx0EuWCJfdwlkPufTqtd3MZJcSOoi8ldiIllBTs1Mhyq6A8lOmPgGlS4Zb9s/B6sy3 1oA/Ni5MRg71AEPl9c/PKWuQgiy+rh1KDuCaw+bdn28yjpD2EkBj1PgBGLKB4lFS1a79 qxMDwcm4XaIDi3KPqEeRtu9bocDJXi4ma/dOoaruyHA6IJ3IvGK2xtdmaiXvjF/xRixw 5vwvIEdGLs1lE0dQY5GKrwSNK+OROOgnC9+8KvfXRYHfbaBoNk0pb6YP2rcYaa5N5sXQ vUdg== X-Gm-Message-State: AOAM533EKs9P5Vdq5MZJzszp31k8ktUcL0T+NOfNCzAywHWi2y924kfq Ryzfl0lia0jkC1Ke0HAzrG7YKp7ppyNL57MGcV6rAC3JNpCo2w4X3hNdiZJX3GZjtVKDlLpK5Sk JwrNyuS1Lr7l/Xc0SucMxupKN2Vt9omL39byKgpI= X-Received: by 2002:a17:906:c836:: with SMTP id dd22mr16340503ejb.3.1627483358786; Wed, 28 Jul 2021 07:42:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxteeSA3oSAeRNij5f1M2M78dulmjLVEORBllzGQQO9MQOzz6cXVa/fw6iRYfYcKNgfnOcF3g== X-Received: by 2002:a17:906:c836:: with SMTP id dd22mr16340483ejb.3.1627483358609; Wed, 28 Jul 2021 07:42:38 -0700 (PDT) Received: from localhost.localdomain ([86.32.47.9]) by smtp.gmail.com with ESMTPSA id d19sm2683676eds.54.2021.07.28.07.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 07:42:38 -0700 (PDT) From: Krzysztof Kozlowski To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Frank Rowand , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/3] of: unify of_count_phandle_with_args() arguments with !CONFIG_OF Date: Wed, 28 Jul 2021 16:42:27 +0200 Message-Id: <20210728144229.323611-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210728144229.323611-1-krzysztof.kozlowski@canonical.com> References: <20210728144229.323611-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Unify the declaration of of_count_phandle_with_args() between enabled and disabled OF by making constifying pointed device_node. Signed-off-by: Krzysztof Kozlowski --- include/linux/of.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/of.h b/include/linux/of.h index 0e786b60bd5d..6f1c41f109bb 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -896,7 +896,7 @@ static inline int of_parse_phandle_with_fixed_args(const struct device_node *np, return -ENOSYS; } -static inline int of_count_phandle_with_args(struct device_node *np, +static inline int of_count_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name) {