From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ABF5443272; Fri, 3 Nov 2023 02:06:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DF5D40265; Fri, 3 Nov 2023 02:06:44 +0100 (CET) Received: from forward501c.mail.yandex.net (forward501c.mail.yandex.net [178.154.239.209]) by mails.dpdk.org (Postfix) with ESMTP id 943CE4021E for ; Fri, 3 Nov 2023 02:06:43 +0100 (CET) Received: from mail-nwsmtp-smtp-production-main-78.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-78.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:228c:0:640:6319:0]) by forward501c.mail.yandex.net (Yandex) with ESMTP id ED938610DB; Fri, 3 Nov 2023 04:06:42 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-78.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id d6M8CQ6DbOs0-LoPGiWFP; Fri, 03 Nov 2023 04:06:42 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1698973602; bh=DKlwUzK44Sg76qB/WRf6he7AwaWjvdUR9QbsJJqWF0Y=; h=From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID; b=fsvGcZhF6B8Y4rq8itxWtOFAbzUy/xjsQQmDx/oxQ7hrAfchHH9uN79x4YaWUI4qO ccnxpc+0m7K0F7gQCGGe8ODbRvHTM+HqhECZPFdJbFIxGJIp77ejcs8LaGFwVbv8Em RqAmhSgI74U5WGIbinQLejGNCrkqEx4CVKKyrFsQ= Authentication-Results: mail-nwsmtp-smtp-production-main-78.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: Date: Fri, 3 Nov 2023 01:06:39 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] eal: add const to init function parameter Content-Language: en-US, ru-RU To: Bruce Richardson , dev@dpdk.org Cc: stephen@networkplumber.org References: <20231102181148.56930-1-bruce.richardson@intel.com> From: Konstantin Ananyev In-Reply-To: <20231102181148.56930-1-bruce.richardson@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 02.11.2023 18:11, Bruce Richardson пишет: > Change the parameter type of argv parameter to rte_eal_init from > "char **" to "char * const *", since we don't modify the argv pointers > passed in. > > Signed-off-by: Bruce Richardson > --- > lib/eal/common/eal_common_options.c | 2 +- > lib/eal/common/eal_options.h | 2 +- > lib/eal/freebsd/eal.c | 4 ++-- > lib/eal/include/rte_eal.h | 2 +- > lib/eal/linux/eal.c | 4 ++-- > lib/eal/windows/eal.c | 4 ++-- > 6 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c > index a6d21f1cba..7927eb1f1d 100644 > --- a/lib/eal/common/eal_common_options.c > +++ b/lib/eal/common/eal_common_options.c > @@ -206,7 +206,7 @@ handle_eal_info_request(const char *cmd, const char *params __rte_unused, > } > > int > -eal_save_args(int argc, char **argv) > +eal_save_args(int argc, char * const *argv) > { > int i, j; > > diff --git a/lib/eal/common/eal_options.h b/lib/eal/common/eal_options.h > index 3cc9cb6412..21ab2492fc 100644 > --- a/lib/eal/common/eal_options.h > +++ b/lib/eal/common/eal_options.h > @@ -105,7 +105,7 @@ int eal_check_common_options(struct internal_config *internal_cfg); > void eal_common_usage(void); > enum rte_proc_type_t eal_proc_type_detect(void); > int eal_plugins_init(void); > -int eal_save_args(int argc, char **argv); > +int eal_save_args(int argc, char * const *argv); > int handle_eal_info_request(const char *cmd, const char *params __rte_unused, > struct rte_tel_data *d); > > diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c > index 568e06e9ed..f241e7dd5e 100644 > --- a/lib/eal/freebsd/eal.c > +++ b/lib/eal/freebsd/eal.c > @@ -365,7 +365,7 @@ eal_get_hugepage_mem_size(void) > > /* Parse the arguments for --log-level only */ > static void > -eal_log_level_parse(int argc, char **argv) > +eal_log_level_parse(int argc, char * const *argv) > { > int opt; > char **argvopt; > @@ -577,7 +577,7 @@ static void rte_eal_init_alert(const char *msg) > > /* Launch threads, called at application init(). */ > int > -rte_eal_init(int argc, char **argv) > +rte_eal_init(int argc, char * const *argv) > { > int i, fctret, ret; > static uint32_t run_once; > diff --git a/lib/eal/include/rte_eal.h b/lib/eal/include/rte_eal.h > index cd318ee141..e0a74865ad 100644 > --- a/lib/eal/include/rte_eal.h > +++ b/lib/eal/include/rte_eal.h > @@ -109,7 +109,7 @@ int rte_eal_iopl_init(void); > * > * ENOEXEC indicates that a service core failed to launch successfully. > */ > -int rte_eal_init(int argc, char **argv); > +int rte_eal_init(int argc, char * const *argv); > > /** > * Clean up the Environment Abstraction Layer (EAL) > diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c > index 57da058cec..a56b85f2ce 100644 > --- a/lib/eal/linux/eal.c > +++ b/lib/eal/linux/eal.c > @@ -548,7 +548,7 @@ eal_parse_vfio_vf_token(const char *vf_token) > > /* Parse the arguments for --log-level only */ > static void > -eal_log_level_parse(int argc, char **argv) > +eal_log_level_parse(int argc, char * const *argv) > { > int opt; > char **argvopt; > @@ -964,7 +964,7 @@ eal_worker_thread_create(unsigned int lcore_id) > > /* Launch threads, called at application init(). */ > int > -rte_eal_init(int argc, char **argv) > +rte_eal_init(int argc, char * const *argv) > { > int i, fctret, ret; > static RTE_ATOMIC(uint32_t) run_once; > diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c > index 7ec2152211..1abb2eb2f7 100644 > --- a/lib/eal/windows/eal.c > +++ b/lib/eal/windows/eal.c > @@ -98,7 +98,7 @@ eal_usage(const char *prgname) > > /* Parse the arguments for --log-level only */ > static void > -eal_log_level_parse(int argc, char **argv) > +eal_log_level_parse(int argc, char * const *argv) > { > int opt; > char **argvopt; > @@ -273,7 +273,7 @@ rte_eal_cleanup(void) > > /* Launch threads, called at application init(). */ > int > -rte_eal_init(int argc, char **argv) > +rte_eal_init(int argc, char * const *argv) > { > int i, fctret, bscan; > const struct rte_config *config = rte_eal_get_configuration(); Acked-by: Konstantin Ananyev