All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Wei Yang" <richardw.yang@linux.intel.com>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	"Peter Maydell" <peter.maydell@linaro.org>,
	imammedo@redhat.com, mjt@tls.msk.ru
Subject: Re: [Qemu-devel] [PATCH 1/2] CODING_STYLE: specify the indent rule for multiline code
Date: Tue, 19 Feb 2019 22:03:04 +0000	[thread overview]
Message-ID: <20190219220304.6mtpg44yry252glj@master> (raw)
In-Reply-To: <83037dad-5d57-2ebd-0038-27dd38975d3f@redhat.com>

On Tue, Feb 19, 2019 at 11:55:04AM -0600, Eric Blake wrote:
>On 2/19/19 11:34 AM, Philippe Mathieu-Daudé wrote:
>
>> 
>> What is still unclear is what to do when a function name is over 60
>> characters (you follow a library/API and can not shorten it), for example:
>> 
>> static void ccid_card_vscard_handle_message(PassthruState *card,
>>     const VSCMsgHeader *scr_msg_header);
>> 
>> What is the project guideline in this case?
>
>I don't know that we have an official guideline, but I've seen enough
>code doing that. I've also seen this style:
>
>static void long_func_name(
>    parameter one, parameter two)
>{
>    if (condition) {
>        call_some_really_long_name(
>            arg1,
>            arg2);
>    }
>
>where even the first argument is put at an indentation of 4 from the
>primary line.

We should put this style in the example too?

>
>-- 
>Eric Blake, Principal Software Engineer
>Red Hat, Inc.           +1-919-301-3226
>Virtualization:  qemu.org | libvirt.org

-- 
Wei Yang
Help you, Help me

  reply	other threads:[~2019-02-19 22:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  1:31 [Qemu-devel] [PATCH 0/2] CODING_STYLE: trivial update Wei Yang
2019-02-19  1:31 ` [Qemu-devel] [PATCH 1/2] CODING_STYLE: specify the indent rule for multiline code Wei Yang
2019-02-19 17:34   ` Philippe Mathieu-Daudé
2019-02-19 17:55     ` Eric Blake
2019-02-19 22:03       ` Wei Yang [this message]
2019-02-19 17:52   ` Eric Blake
2019-02-19 22:04     ` Wei Yang
2019-02-19  1:31 ` [Qemu-devel] [PATCH 2/2] CODING_STYLE: indent example code as all others Wei Yang
2019-02-19 17:38   ` Philippe Mathieu-Daudé
2019-02-19 17:56     ` Eric Blake
2019-02-19 18:55       ` Philippe Mathieu-Daudé
2019-02-19 22:20         ` Wei Yang
2019-02-19 23:55           ` Philippe Mathieu-Daudé
2019-02-19 22:05     ` Wei Yang
2019-02-19 17:57   ` Eric Blake

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=20190219220304.6mtpg44yry252glj@master \
    --to=richard.weiyang@gmail.com \
    --cc=eblake@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richardw.yang@linux.intel.com \
    /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.