From patchwork Tue Jan 17 15:21:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 643704 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E953C677F1 for ; Tue, 17 Jan 2023 15:20:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230144AbjAQPU4 (ORCPT ); Tue, 17 Jan 2023 10:20:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjAQPUw (ORCPT ); Tue, 17 Jan 2023 10:20:52 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0739238B5C; Tue, 17 Jan 2023 07:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673968851; x=1705504851; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fb+JWaRsNaPsvs8byFrWAP3CvcWmfiGFTmjbdAEmXcs=; b=hriRGm090/+KkXHvlTsyZhi6TlhliVD5ko8pdMN/S8CCaDp+rtVLxi0E Oswg4hKC/uFZ3tVL1KWd82izqR3ipZ1I0aDXJcP/WTmqsygeFRNb3h0h1 ez2L6DrmacUhdeyMpy1mSt8xW25Mr2VSOMPGHQMgbpJu7kCFv1WlDTALV j/9z3c9feCIFjKCoLbAqUnHa6ulDlcXJ+KrWXpySkxp/RshK74hQaWw4r 0PNRriTYHCCbxeLFF3nCt4hRQkE20MhG2anGz+G4SI7PYEgdp+37ObWmZ pHlG4tz+KrGFeRQBN2xpM345QmvsT9HLkl4+9lX8l/GPimZdKnnfukCrq Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="326788583" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="326788583" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2023 07:20:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="652575089" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="652575089" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 17 Jan 2023 07:20:48 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id B3B84E1; Tue, 17 Jan 2023 17:21:22 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Scally , Heikki Krogerus , Sakari Ailus Subject: [PATCH v1 1/1] device property: Make fwnode_graph_for_each_endpoint() consistent Date: Tue, 17 Jan 2023 17:21:20 +0200 Message-Id: <20230117152120.42531-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Make fwnode_graph_for_each_endpoint() consistent with the rest of for_each_*() definitions in the file, i.e. use the form of for (iter = func(NULL); iter; \ iter = func(iter)) as it's done in all the rest of the similar macro definitions. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus Acked-by: Sakari Ailus --- include/linux/property.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/property.h b/include/linux/property.h index 37179e3abad5..f090419818a2 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -436,9 +436,9 @@ fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode, unsigned int fwnode_graph_get_endpoint_count(struct fwnode_handle *fwnode, unsigned long flags); -#define fwnode_graph_for_each_endpoint(fwnode, child) \ - for (child = NULL; \ - (child = fwnode_graph_get_next_endpoint(fwnode, child)); ) +#define fwnode_graph_for_each_endpoint(fwnode, child) \ + for (child = fwnode_graph_get_next_endpoint(fwnode, NULL); child; \ + child = fwnode_graph_get_next_endpoint(fwnode, child)) int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, struct fwnode_endpoint *endpoint);