From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Stephen Hemminger
<stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH 1.6.1] don't inline rte_string_fns
Date: Thu, 20 Mar 2014 17:30:32 +0100 [thread overview]
Message-ID: <2143975.C98iGihseR@xps13> (raw)
In-Reply-To: <20140227091856.768d413c-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
Hi,
I have some minor comments below.
27/02/2014 09:18, Stephen Hemminger :
> The function rte_snprintf() can never be inlined by Gcc.
> If compiled with -Winline it generates an error:
> function ‘rte_snprintf’ can never be inlined because it uses variable
> argument lists [-Werror=inline]
>
> Therefore since both rte_snprintf and rte_strsplit are not performance
> sensitive just move them to being real functions.
>
> Signed-off-by: Stephen Hemminger <stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>
> --- /dev/null
> +++ b/lib/librte_eal/common/eal_common_string_fns.c
> @@ -0,0 +1,95 @@
> +/*-
> + * BSD LICENSE
> + *
> + * Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
It is now 2014 in version 1.6.0.
[...]
> +#include <stdio.h>
> +#include <stdarg.h>
> +#include <stddef.h>
> +#include <errno.h>
I think stddef.h is not needed.
[...]
> --- a/lib/librte_eal/common/include/rte_string_fns.h
> +++ b/lib/librte_eal/common/include/rte_string_fns.h
> @@ -47,7 +47,6 @@ extern "C" {
> #include <stdio.h>
> #include <stdarg.h>
> #include <stddef.h>
> -#include <errno.h>
stdarg and stddef are not needed.
[...]
> +int
> +rte_snprintf(char *buffer, int buflen, const char *format, ...);
>
>
One blank line should be sufficient.
> +int
> rte_strsplit(char *string, int stringlen,
Thank you
--
Thomas
next prev parent reply other threads:[~2014-03-20 16:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 17:18 [PATCH 1.6.1] don't inline rte_string_fns Stephen Hemminger
[not found] ` <20140227091856.768d413c-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
2014-03-20 16:30 ` Thomas Monjalon [this message]
2014-04-17 13:40 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2143975.C98iGihseR@xps13 \
--to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
--cc=stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.