From 2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 26 Jul 2022 07:11:40 +0200 Subject: Merging upstream version 2.1~rc0 (Closes: #1015722). Signed-off-by: Daniel Baumann --- plugins/ocp/ocp-nvme.c | 18 +++--------------- plugins/ocp/ocp-nvme.h | 2 +- 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'plugins/ocp') diff --git a/plugins/ocp/ocp-nvme.c b/plugins/ocp/ocp-nvme.c index 6b7fc9d..56cfdff 100644 --- a/plugins/ocp/ocp-nvme.c +++ b/plugins/ocp/ocp-nvme.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0-only +// SPDX-License-Identifier: GPL-2.0-or-later /* Copyright (c) 2022 Meta Platforms, Inc. * * Authors: Arthur Shau , @@ -380,11 +380,6 @@ static int get_c0_log_page(int fd, char *format) } /* print the data */ - if (!data) { - fprintf(stderr, "ERROR : OCP : Invalid buffer to read 0xC0 log\n"); - ret = -1; - goto out; - } switch (fmt) { case NORMAL: ocp_print_C0_log_normal(data); @@ -430,7 +425,7 @@ static int ocp_smart_add_log(int argc, char **argv, struct command *cmd, if (ret) fprintf(stderr, "ERROR : OCP : Failure reading the C0 Log Page, ret = %d\n", ret); - + close(fd); return ret; } @@ -728,13 +723,6 @@ static int get_c3_log_page(int fd, char *format) } } - /* print the data */ - if (!log_data) { - fprintf(stderr, - "ERROR : OCP : Invalid C3 log data buffer\n"); - ret = -1; - goto out; - } switch (fmt) { case NORMAL: ocp_print_C3_log_normal(fd, log_data); @@ -783,6 +771,6 @@ static int ocp_latency_monitor_log(int argc, char **argv, struct command *comman fprintf(stderr, "ERROR : OCP : Failure reading the C3 Log Page, ret = %d\n", ret); - + close(fd); return ret; } diff --git a/plugins/ocp/ocp-nvme.h b/plugins/ocp/ocp-nvme.h index 19378cd..3e3f437 100644 --- a/plugins/ocp/ocp-nvme.h +++ b/plugins/ocp/ocp-nvme.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* Copyright (c) 2022 Meta Platforms, Inc. * * Authors: Arthur Shau , -- cgit v1.2.3