From: Greg KH <gregkh@linuxfoundation.org>
To: Ubuntu <tanjubrunostar0@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
outreachy@lists.linux.dev
Subject: Re: Request for assistance
Date: Thu, 20 Oct 2022 13:10:08 +0200 [thread overview]
Message-ID: <Y1EskCZF7qkiPW2O@kroah.com> (raw)
In-Reply-To: <Y1Eqa7uKB+Wk+Mb+@elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net>
On Thu, Oct 20, 2022 at 11:00:59AM +0000, Ubuntu wrote:
> Hello,
> I have a diffictly deciding where exactly to split a long line of code. for example, this line of code is too long
>
> uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate);
>
> if i spit it this way:
> uCTSTime =
> bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate);
>
> It does not help as the second line is still too long. I considered doing it this way instead:
> uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
> pDevice->byTopCCKBasicRate);
> But i did this on one of my patches and i was told it is not advisable to split a line between
> parenthesis '(' and ')'
Who told you that?
You are close, the code should look like:
uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
pDevice->byTopCCKBasicRate);
Like millions of other lines in the kernel source tree. When in doubt,
look at existing implementations.
hope this helps,
greg k-h
next prev parent reply other threads:[~2022-10-20 11:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 11:00 Request for assistance Ubuntu
2022-10-20 11:10 ` Greg KH [this message]
2022-10-20 11:14 ` Tanju Brunostar
2022-10-20 11:59 ` Julia Lawall
[not found] ` <CAOkYk0iU0B98JsH77avky--AS19V=GhQox2f_b4PAG3ZBB+SVQ@mail.gmail.com>
2022-10-20 11:34 ` Tanju Brunostar
2022-10-20 12:10 ` Greg KH
2022-10-20 14:39 ` Theodore Ts'o
[not found] ` <Y1Hby38PE/QVlRhF@Slackware>
2022-10-21 6:11 ` Tanju Brunostar
-- strict thread matches above, loose matches on Subject: below --
2022-10-22 8:11 request " Tanju Brunostar
2022-10-22 8:13 ` Julia Lawall
2022-10-22 8:20 ` Tanju Brunostar
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=Y1EskCZF7qkiPW2O@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
--cc=tanjubrunostar0@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox