mgmt/mcumgr: Remove redundant config headers
The shell_mgmt_config.h and stat_mgmt_config.h as they have been only
providing alternative identifiers for Kconfig options.
Now the Kconfig options are directly used in code and the headers
have been removed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
diff --git a/subsys/mgmt/mcumgr/grp/shell_mgmt/include/mgmt/mcumgr/grp/shell_mgmt/shell_mgmt_config.h b/subsys/mgmt/mcumgr/grp/shell_mgmt/include/mgmt/mcumgr/grp/shell_mgmt/shell_mgmt_config.h
deleted file mode 100644
index 4e3df00..0000000
--- a/subsys/mgmt/mcumgr/grp/shell_mgmt/include/mgmt/mcumgr/grp/shell_mgmt/shell_mgmt_config.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 2018-2021 mcumgr authors
- *
- * SPDX-License-Identifier: Apache-2.0
- */
-
-#ifndef H_SHELL_MGMT_CONFIG_
-#define H_SHELL_MGMT_CONFIG_
-
-#define SHELL_MGMT_MAX_LINE_LEN CONFIG_SHELL_CMD_BUFF_SIZE
-#define SHELL_MGMT_MAX_ARGC CONFIG_SHELL_ARGC_MAX
-
-#endif
diff --git a/subsys/mgmt/mcumgr/grp/shell_mgmt/src/shell_mgmt.c b/subsys/mgmt/mcumgr/grp/shell_mgmt/src/shell_mgmt.c
index 7bd65ea..f18537e 100644
--- a/subsys/mgmt/mcumgr/grp/shell_mgmt/src/shell_mgmt.c
+++ b/subsys/mgmt/mcumgr/grp/shell_mgmt/src/shell_mgmt.c
@@ -16,8 +16,6 @@
#include <zcbor_encode.h>
#include <zcbor_decode.h>
-#include <mgmt/mcumgr/grp/shell_mgmt/shell_mgmt_config.h>
-
static int
shell_exec(const char *line)
{
@@ -44,7 +42,7 @@
{
int rc;
bool ok;
- char line[SHELL_MGMT_MAX_LINE_LEN + 1];
+ char line[CONFIG_SHELL_CMD_BUFF_SIZE + 1];
size_t len = 0;
struct zcbor_string cmd_out;
zcbor_state_t *zsd = ctxt->reader->zs;
diff --git a/subsys/mgmt/mcumgr/grp/stat_mgmt/include/mgmt/mcumgr/grp/stat_mgmt/stat_mgmt_config.h b/subsys/mgmt/mcumgr/grp/stat_mgmt/include/mgmt/mcumgr/grp/stat_mgmt/stat_mgmt_config.h
deleted file mode 100644
index 5094f26..0000000
--- a/subsys/mgmt/mcumgr/grp/stat_mgmt/include/mgmt/mcumgr/grp/stat_mgmt/stat_mgmt_config.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Copyright (c) 2018-2021 mcumgr authors
- *
- * SPDX-License-Identifier: Apache-2.0
- */
-
-#ifndef H_STAT_MGMT_CONFIG_
-#define H_STAT_MGMT_CONFIG_
-
-#define STAT_MGMT_MAX_NAME_LEN CONFIG_STAT_MGMT_MAX_NAME_LEN
-
-#endif
diff --git a/subsys/mgmt/mcumgr/grp/stat_mgmt/src/stat_mgmt.c b/subsys/mgmt/mcumgr/grp/stat_mgmt/src/stat_mgmt.c
index 153d7a4..2f9f42d 100644
--- a/subsys/mgmt/mcumgr/grp/stat_mgmt/src/stat_mgmt.c
+++ b/subsys/mgmt/mcumgr/grp/stat_mgmt/src/stat_mgmt.c
@@ -17,8 +17,6 @@
#include <zephyr/mgmt/mcumgr/smp/smp.h>
#include <zephyr/mgmt/mcumgr/grp/stat_mgmt/stat_mgmt.h>
-#include <mgmt/mcumgr/grp/stat_mgmt/stat_mgmt_config.h>
-
static struct mgmt_handler stat_mgmt_handlers[];
typedef int stat_mgmt_foreach_entry_fn(zcbor_state_t *zse, struct stat_mgmt_entry *entry);
@@ -120,7 +118,7 @@
struct zcbor_string value = { 0 };
zcbor_state_t *zse = ctxt->writer->zs;
zcbor_state_t *zsd = ctxt->reader->zs;
- char stat_name[STAT_MGMT_MAX_NAME_LEN];
+ char stat_name[CONFIG_STAT_MGMT_MAX_NAME_LEN];
bool ok;
size_t counter = 0;