[PATCH v2 5/5] xen: Code style conformity
Simon Glass
sjg at chromium.org
Sat Aug 22 17:09:52 CEST 2020
On Fri, 21 Aug 2020 at 03:10, Anastasiia Lukianenko <vicooodin at gmail.com> wrote:
>
> From: Anastasiia Lukianenko <anastasiia_lukianenko at epam.com>
>
> Cleaning up the following:
>
> ERROR: do not use assignment in if condition
> #281: FILE: drivers/xen/pvblock.c:260:
> + if ((err = xenbus_switch_state(XBT_NIL, nodename,
> CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "err"
> #52: FILE: drivers/xen/pvblock.c:298:
> + if (err != NULL) {
> ERROR: do not use assignment in if condition
> #176: FILE: drivers/xen/gnttab.c:103:
> + if ((flags = nflags) & (GTF_reading | GTF_writing)) {
> WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
> #329: FILE: include/xen/gnttab.h:1:
> +/*
> WARNING: Misplaced SPDX-License-Identifier tag - use line 1 instead
> #330: FILE: include/xen/gnttab.h:2:
> + * SPDX-License-Identifier: GPL-2.0
> ERROR: do not use assignment in if condition
> #630: FILE: lib/sscanf.c:558:
> + if ((n = inr) < width) {
>
> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko at epam.com>
> ---
>
> Changes since v1:
> - cleaned errors like in drivers/xen/pvblock.c:
> CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "err"
> - added commit message
>
> drivers/xen/gnttab.c | 3 ++-
> drivers/xen/pvblock.c | 12 ++++++------
> include/xen/gnttab.h | 3 +--
> lib/sscanf.c | 3 ++-
> 4 files changed, 11 insertions(+), 10 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list