Commit 7118782d authored by Rob Herring (Arm)'s avatar Rob Herring (Arm)
Browse files

of: Constify of_changeset_entry function arguments



__of_changeset_entry_invert() and __of_changeset_entry_revert() don't
modify struct of_changeset_entry arguments, so they can be const.

Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20241010-dt-const-v1-5-87a51f558425@kernel.org


Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
parent 9c63fea9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -536,7 +536,7 @@ static void __of_changeset_entry_destroy(struct of_changeset_entry *ce)
	kfree(ce);
}

static void __of_changeset_entry_invert(struct of_changeset_entry *ce,
static void __of_changeset_entry_invert(const struct of_changeset_entry *ce,
					  struct of_changeset_entry *rce)
{
	memcpy(rce, ce, sizeof(*rce));
@@ -636,7 +636,7 @@ static int __of_changeset_entry_apply(struct of_changeset_entry *ce)
	return 0;
}

static inline int __of_changeset_entry_revert(struct of_changeset_entry *ce)
static inline int __of_changeset_entry_revert(const struct of_changeset_entry *ce)
{
	struct of_changeset_entry ce_inverted;