diff mbox series

[1/8] xen/arm: bootfdt.c: Remove unused-but-set variable

Message ID 20220427094941.291554-2-michal.orzel@arm.com (mailing list archive)
State New, archived
Headers show
Series xen: Remove unused-but-set variables | expand

Commit Message

Michal Orzel April 27, 2022, 9:49 a.m. UTC
Function device_tree_node_compatible defines and sets a variable
mlen but does not make use of it. Remove this variable.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
---
 xen/arch/arm/bootfdt.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Julien Grall April 27, 2022, 5:15 p.m. UTC | #1
Hi Michal,

On 27/04/2022 10:49, Michal Orzel wrote:
> Function device_tree_node_compatible defines and sets a variable
> mlen but does not make use of it. Remove this variable.
> 
> Signed-off-by: Michal Orzel <michal.orzel@arm.com>

Reviewed-by: Julien Grall <jgrall@amazon.com>

> ---
>   xen/arch/arm/bootfdt.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
> index e318ef9603..29671c8df0 100644
> --- a/xen/arch/arm/bootfdt.c
> +++ b/xen/arch/arm/bootfdt.c
> @@ -36,11 +36,8 @@ static bool __init device_tree_node_compatible(const void *fdt, int node,
>                                                  const char *match)
>   {
>       int len, l;
> -    int mlen;
>       const void *prop;
>   
> -    mlen = strlen(match);
> -
>       prop = fdt_getprop(fdt, node, "compatible", &len);
>       if ( prop == NULL )
>           return false;

Cheers,
diff mbox series

Patch

diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
index e318ef9603..29671c8df0 100644
--- a/xen/arch/arm/bootfdt.c
+++ b/xen/arch/arm/bootfdt.c
@@ -36,11 +36,8 @@  static bool __init device_tree_node_compatible(const void *fdt, int node,
                                                const char *match)
 {
     int len, l;
-    int mlen;
     const void *prop;
 
-    mlen = strlen(match);
-
     prop = fdt_getprop(fdt, node, "compatible", &len);
     if ( prop == NULL )
         return false;