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>
This commit is contained in:
Dominik Ermel 2022-11-25 11:15:44 +00:00 committed by Carles Cufí
commit 9a48fdf62f
4 changed files with 2 additions and 31 deletions

View file

@ -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

View file

@ -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 @@ shell_mgmt_exec(struct smp_streamer *ctxt)
{
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;

View file

@ -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

View file

@ -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 @@ stat_mgmt_show(struct smp_streamer *ctxt)
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;