Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1138144pxb; Wed, 6 Apr 2022 09:35:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytxtK2b1+GTv3mog3cmRPtblSIjiOWQfG1/Gv3odihxmlMOlK6MvvajMzin/2s/fZb82j/ X-Received: by 2002:a17:902:ecd2:b0:156:9992:5892 with SMTP id a18-20020a170902ecd200b0015699925892mr9411828plh.7.1649262919466; Wed, 06 Apr 2022 09:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649262919; cv=none; d=google.com; s=arc-20160816; b=w1FwJL0ljqlOpRbICkJ73SoHMlQlXmh7vJ8yid/vAS0cMmFQoOHynWqdzRenxlMffu 4qFfZhf8zNYy8P+7S4Lbhh5ySmrO/FwzVPVZnBTNrwgI2vWldhysVh69YFFk1040UUsC FTzUTglVRC21DLbaQm0r4tX+twt1FgeNPmzvCK/Djdv++9CJV+YNgY+uS7mCDF3Ljq0G qnGOSaPlvb8qF5gcddo/uKslYg+W125887mqjHBmHIqE7t2RdVIkaw5cOT7sROsBOBBZ 4sA/fjmCCFHLmzPTK4vZ7uSnDlQrxYSkYIgqMflfGYHOYIKbf5wpyKvhy+eVsVGQNbdB I3rQ== 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 :dkim-signature; bh=MK5oarERqfUS0USradbggJgP8J3eUUka9GFKqM74s8U=; b=r1eN+mqOETTnvNPBbpCxlsNBNrYsvqBytUKW4hfP0ozpL/NJGm67jt9ZeuKUBBMbTF fYpbJSHZXZKbc23XQ6ct56dfcwpuJD1hxYlSA188pMDzpVq7Uc6RtjsjdfYINlm2QNBb lsBWBvjvAGCMKtQauRxbobWOQqpSZSYqbQ9fy43O1fC1GMXYR498WSVJvnxJiZOARujE 1pjiW7ICxddJVPQnGaQAH4HgUj0uqxnol6At4hM5ydkD22+FUW2lfQmZXA9yt4WSudvy pBkS4OKXmlIjdh4zq3krzY2bQjqVY5hMSH5bH5HNkpxLfkrDGvRhCqGSJFBeqfwTkmlq 9VDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XgpIo6Jm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r6-20020a170902be0600b0015621cb59ecsi14767383pls.122.2022.04.06.09.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 09:35:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XgpIo6Jm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8E4BD38DAD; Wed, 6 Apr 2022 08:43:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236342AbiDFPpS (ORCPT + 99 others); Wed, 6 Apr 2022 11:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236502AbiDFPoK (ORCPT ); Wed, 6 Apr 2022 11:44:10 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EF214DBFD0; Wed, 6 Apr 2022 06:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649250611; x=1680786611; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yw0fQih9tXF/247W2afpZYqH7VzQIZItG2AyzEHXwk4=; b=XgpIo6Jm5VdGRs3Zg4Xcmzw7TPr7IY44ewIPg732B7JILdGDESLbeiYW SXbcuW9T8Xu1jgKhuaahTTfNQWu1Xf0XM0Prfy7ETeNgtz+NdXGfZ45RF HXlTHWh/XWRPIvPKTSfQSS5BDCzzNr/AwPzaJpvAZALp/kDDn6OGqJT17 6EwGsprYvvEp9HB7Ti4Mi//d5zNmzU+0JL1J+Jju442uIhjejQLaocHoK npsbS1vy1c0nNwyI71szycX9vG/lNKIMBaSREeEyXz0rx5xvM8JpSolMY ZcG4sclF3draygJOt4GajL0D8oHbHh0NpvbIYoXrBPQMkiVKHjO/OCyGU Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="258628717" X-IronPort-AV: E=Sophos;i="5.90,239,1643702400"; d="scan'208";a="258628717" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 06:09:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,239,1643702400"; d="scan'208";a="588363716" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 06 Apr 2022 06:09:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 79BC12FB; Wed, 6 Apr 2022 16:05:55 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Len Brown , Michael Walle Subject: [PATCH v5 3/4] device property: Drop 'test' prefix in parameters of fwnode_is_ancestor_of() Date: Wed, 6 Apr 2022 16:05:51 +0300 Message-Id: <20220406130552.30930-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220406130552.30930-1-andriy.shevchenko@linux.intel.com> References: <20220406130552.30930-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 part 'is' in the function name implies the test against something. Drop unnecessary 'test' prefix in the fwnode_is_ancestor_of() parameters. No functional change intended. Signed-off-by: Andy Shevchenko --- v5: new patch drivers/base/property.c | 20 +++++++++----------- include/linux/property.h | 3 +-- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/base/property.c b/drivers/base/property.c index bca9a28ce271..839ee7f3ee12 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -656,28 +656,26 @@ struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode, EXPORT_SYMBOL_GPL(fwnode_get_nth_parent); /** - * fwnode_is_ancestor_of - Test if @test_ancestor is ancestor of @test_child - * @test_ancestor: Firmware which is tested for being an ancestor - * @test_child: Firmware which is tested for being the child + * fwnode_is_ancestor_of - Test if @ancestor is ancestor of @child + * @ancestor: Firmware which is tested for being an ancestor + * @child: Firmware which is tested for being the child * * A node is considered an ancestor of itself too. * - * Returns true if @test_ancestor is an ancestor of @test_child. - * Otherwise, returns false. + * Returns true if @ancestor is an ancestor of @child. Otherwise, returns false. */ -bool fwnode_is_ancestor_of(struct fwnode_handle *test_ancestor, - struct fwnode_handle *test_child) +bool fwnode_is_ancestor_of(struct fwnode_handle *ancestor, struct fwnode_handle *child) { struct fwnode_handle *parent; - if (IS_ERR_OR_NULL(test_ancestor)) + if (IS_ERR_OR_NULL(ancestor)) return false; - if (test_child == test_ancestor) + if (child == ancestor) return true; - fwnode_for_each_parent_node(test_child, parent) { - if (parent == test_ancestor) { + fwnode_for_each_parent_node(child, parent) { + if (parent == ancestor) { fwnode_handle_put(parent); return true; } diff --git a/include/linux/property.h b/include/linux/property.h index 15d6863ae962..fc24d45632eb 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -95,8 +95,7 @@ struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode); unsigned int fwnode_count_parents(const struct fwnode_handle *fwn); struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwn, unsigned int depth); -bool fwnode_is_ancestor_of(struct fwnode_handle *test_ancestor, - struct fwnode_handle *test_child); +bool fwnode_is_ancestor_of(struct fwnode_handle *ancestor, struct fwnode_handle *child); struct fwnode_handle *fwnode_get_next_child_node( const struct fwnode_handle *fwnode, struct fwnode_handle *child); struct fwnode_handle *fwnode_get_next_available_child_node( -- 2.35.1