dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>
To: Bruce Richardson <bruce.richardson@intel.com>, <dev@dpdk.org>
Subject: Re: [PATCH] doc/contributing: remove obsolete advice in coding std
Date: Mon, 9 Jun 2025 11:12:29 +0100	[thread overview]
Message-ID: <4d8da5b6-10e1-465e-aac0-b353a8f9cf4e@intel.com> (raw)
In-Reply-To: <20250327162839.2472573-1-bruce.richardson@intel.com>

Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

On 27/03/2025 16:28, Bruce Richardson wrote:
> Remove obsolete, and generally not followed, advice in the coding
> standards doc, around local variables.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>   doc/guides/contributing/coding_style.rst | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
> index 1ebc79ca3c..0d8821b325 100644
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -556,14 +556,10 @@ Exits should be 0 on success, or 1 on failure.
>   Local Variables
>   ~~~~~~~~~~~~~~~
>   
> -* Variables should be declared at the start of a block of code rather than in the middle.
> -  The exception to this is when the variable is ``const`` in which case the declaration must be at the point of first use/assignment.
> -  Declaring variable inside a for loop is OK.
>   * When declaring variables in functions, multiple variables per line are OK.
>     However, if multiple declarations would cause the line to exceed a reasonable line length, begin a new set of declarations on the next line rather than using a line continuation.
>   * Be careful to not obfuscate the code by initializing variables in the declarations, only the last variable on a line should be initialized.
>     If multiple variables are to be initialized when defined, put one per line.
> -* Do not use function calls in initializers, except for ``const`` variables.
>   
>   .. code-block:: c
>   

-- 
Regards,
Vladimir


  reply	other threads:[~2025-06-09 10:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27 16:28 [PATCH] doc/contributing: remove obsolete advice in coding std Bruce Richardson
2025-06-09 10:12 ` Medvedkin, Vladimir [this message]
2025-07-20 20:12 ` 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=4d8da5b6-10e1-465e-aac0-b353a8f9cf4e@intel.com \
    --to=vladimir.medvedkin@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).