* [PATCH v2] libfdt: Remove fdt parameter from overlay_fixup_one_phandle
@ 2024-11-23 9:48 Bingwu Zhang
2024-11-25 1:26 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Bingwu Zhang @ 2024-11-23 9:48 UTC (permalink / raw)
To: David Gibson, devicetree-compiler; +Cc: Bingwu Zhang, devicetree, ~xtex/staging
From: Bingwu Zhang <xtexchooser@duck.com>
When compiling with -Wall -Wextra, the unused fdt parameter becomes a
warning. With -Werror, it becomes an error and fails the build.
As the parameter is not used in the function, let's remove it.
Signed-off-by: Bingwu Zhang <xtexchooser@duck.com>
---
Changes from v1:
- Remove fdt parameter rather than suppressing the warning directly
Link: https://lore.kernel.org/devicetree-compiler/20241116101228.164707-5-xtex@envs.net/ # v1
---
libfdt/fdt_overlay.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
index f61ca7ed2f0b..e6b9eb643958 100644
--- a/libfdt/fdt_overlay.c
+++ b/libfdt/fdt_overlay.c
@@ -307,7 +307,6 @@ static int overlay_update_local_references(void *fdto, uint32_t delta)
/**
* overlay_fixup_one_phandle - Set an overlay phandle to the base one
- * @fdt: Base Device Tree blob
* @fdto: Device tree overlay blob
* @symbols_off: Node offset of the symbols node in the base device tree
* @path: Path to a node holding a phandle in the overlay
@@ -328,8 +327,7 @@ static int overlay_update_local_references(void *fdto, uint32_t delta)
* 0 on success
* Negative error code on failure
*/
-static int overlay_fixup_one_phandle(void *fdt, void *fdto,
- int symbols_off,
+static int overlay_fixup_one_phandle(void *fdto, int symbols_off,
const char *path, uint32_t path_len,
const char *name, uint32_t name_len,
int poffset, uint32_t phandle)
@@ -443,7 +441,7 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off,
if ((*endptr != '\0') || (endptr <= (sep + 1)))
return -FDT_ERR_BADOVERLAY;
- ret = overlay_fixup_one_phandle(fdt, fdto, symbols_off,
+ ret = overlay_fixup_one_phandle(fdto, symbols_off,
path, path_len, name, name_len,
poffset, phandle);
if (ret)
base-commit: b3bbee6b1242b4bb84fcb31365b76a3a45be3b6b
--
2.47.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] libfdt: Remove fdt parameter from overlay_fixup_one_phandle
2024-11-23 9:48 [PATCH v2] libfdt: Remove fdt parameter from overlay_fixup_one_phandle Bingwu Zhang
@ 2024-11-25 1:26 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2024-11-25 1:26 UTC (permalink / raw)
To: Bingwu Zhang; +Cc: devicetree-compiler, Bingwu Zhang, devicetree, ~xtex/staging
[-- Attachment #1: Type: text/plain, Size: 2385 bytes --]
On Sat, Nov 23, 2024 at 05:48:14PM +0800, Bingwu Zhang wrote:
> From: Bingwu Zhang <xtexchooser@duck.com>
>
> When compiling with -Wall -Wextra, the unused fdt parameter becomes a
> warning. With -Werror, it becomes an error and fails the build.
>
> As the parameter is not used in the function, let's remove it.
>
> Signed-off-by: Bingwu Zhang <xtexchooser@duck.com>
Merged, thanks!
> ---
> Changes from v1:
> - Remove fdt parameter rather than suppressing the warning directly
> Link: https://lore.kernel.org/devicetree-compiler/20241116101228.164707-5-xtex@envs.net/ # v1
> ---
> libfdt/fdt_overlay.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
> index f61ca7ed2f0b..e6b9eb643958 100644
> --- a/libfdt/fdt_overlay.c
> +++ b/libfdt/fdt_overlay.c
> @@ -307,7 +307,6 @@ static int overlay_update_local_references(void *fdto, uint32_t delta)
>
> /**
> * overlay_fixup_one_phandle - Set an overlay phandle to the base one
> - * @fdt: Base Device Tree blob
> * @fdto: Device tree overlay blob
> * @symbols_off: Node offset of the symbols node in the base device tree
> * @path: Path to a node holding a phandle in the overlay
> @@ -328,8 +327,7 @@ static int overlay_update_local_references(void *fdto, uint32_t delta)
> * 0 on success
> * Negative error code on failure
> */
> -static int overlay_fixup_one_phandle(void *fdt, void *fdto,
> - int symbols_off,
> +static int overlay_fixup_one_phandle(void *fdto, int symbols_off,
> const char *path, uint32_t path_len,
> const char *name, uint32_t name_len,
> int poffset, uint32_t phandle)
> @@ -443,7 +441,7 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off,
> if ((*endptr != '\0') || (endptr <= (sep + 1)))
> return -FDT_ERR_BADOVERLAY;
>
> - ret = overlay_fixup_one_phandle(fdt, fdto, symbols_off,
> + ret = overlay_fixup_one_phandle(fdto, symbols_off,
> path, path_len, name, name_len,
> poffset, phandle);
> if (ret)
>
> base-commit: b3bbee6b1242b4bb84fcb31365b76a3a45be3b6b
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-25 1:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-23 9:48 [PATCH v2] libfdt: Remove fdt parameter from overlay_fixup_one_phandle Bingwu Zhang
2024-11-25 1:26 ` David Gibson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).