From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Miller <davem@davemloft.net>,
dccp@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 0/4][RFC]: coding convention for CCID-struct prefixes
Date: Tue, 6 Oct 2009 07:36:22 +0200 [thread overview]
Message-ID: <20091006053622.GA3585@gerrit.erg.abdn.ac.uk> (raw)
In-Reply-To: <20091005123823.GE30535@ghostprotocols.net>
| > I am waiting for the feedback also in order to rebuild the test tree; and have
| > informed CCID-4 developers (CCID-4 subtree) about this.
|
| On a first look I saw one inconsistency, while in ccid3 you do:
|
| - return scaled_div(w_init << 6, hctx->tx_rtt);
| + return scaled_div(w_init << 6, hc->tx_rtt);
|
| in ccid2 you do:
|
| - struct ccid2_seq *seqp = hctx->ccid2hctx_seqh;
| + struct ccid2_seq *seqp = hctx->tx_seqh;
|
| Since this change is about reducing the names by removing redundancy, I
| think the ccid3 variant is better, i.e.: hc->tx_foo.
|
I fully agree with your comment, but could I ask you to take a second look please?
(My fine-grained separation of patches may not have been as good an idea
as I had initially thought.)
The first change (scaled_div/ccid3) is from patch 1/4, whereas the second (seqp/ccid2)
is from patch 4/4. In the end the changes complement one another, and both ccids have
the same naming scheme:
* patch 1/4 replaces hc{tx,rx}->ccid2hc{tx,rx}_ with hc{tx,rx}->{tx,rx}_ (ccid2.{c,h})
* patch 2/4 replaces hc{tx,rx}->ccid3hc{tx,rx}_ with hc{tx,rx}->{tx_rx}_ (ccid3.{c,h})
* patch 3/4 replaces hc{tx,rx}->{tx,rx}_ with hc->{tx,rx}_ (ccid2.{c,h})
* patch 4/4 replaces hc{tx,rx}->{tx,rx}_ with hc->{tx,rx}_ (ccid3.{c,h})
I checked again and re-applied the submitted patches and did the following:
gerrit@virtual_carrot > grep -REhC2 'hc(tx|rx)' net/dccp/
static inline struct ccid3_hc_tx_sock *ccid3_hc_tx_sk(const struct sock *sk)
{
struct ccid3_hc_tx_sock *hctx = ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
BUG_ON(hctx == NULL);
return hctx;
}
--
static inline struct ccid3_hc_rx_sock *ccid3_hc_rx_sk(const struct sock *sk)
{
struct ccid3_hc_rx_sock *hcrx = ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
BUG_ON(hcrx == NULL);
return hcrx;
}
These are the only two exceptions, I left the hc{tx,rx} in since they don't appear
in a prefix.
Can you please have a look and say whether you are ok with the naming scheme?
As per earlier email, I'd be ok to repackage or combine the patches into a single one,
or combine patch 1/4 with 3/4 and 2/4 with 4/4.
next prev parent reply other threads:[~2009-10-06 5:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ccid_coding_convention>
2009-10-05 10:53 ` [PATCH 0/4][RFC]: coding convention for CCID-struct prefixes Gerrit Renker
2009-10-05 10:53 ` [PATCH 1/4][RFC] dccp ccid-2: Overhaul CCID naming convention 1/2 Gerrit Renker
2009-10-05 10:53 ` [PATCH 2/4][RFC] dccp ccid-3: Overhaul CCID naming convention 2/2 Gerrit Renker
2009-10-05 10:53 ` [PATCH 3/4][RFC] dccp ccid-2: Remove CCID naming redundancy 1/2 Gerrit Renker
2009-10-05 10:53 ` [PATCH 4/4][RFC] dccp ccid-3: Remove CCID naming redundancy 2/2 Gerrit Renker
2009-10-05 10:58 ` [PATCH 0/4][RFC]: coding convention for CCID-struct prefixes David Miller
2009-10-05 11:23 ` Gerrit Renker
2009-10-05 12:38 ` Arnaldo Carvalho de Melo
2009-10-06 5:36 ` Gerrit Renker [this message]
2009-10-07 13:31 ` Arnaldo Carvalho de Melo
2009-10-07 20:51 ` David Miller
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=20091006053622.GA3585@gerrit.erg.abdn.ac.uk \
--to=gerrit@erg.abdn.ac.uk \
--cc=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=dccp@vger.kernel.org \
--cc=netdev@vger.kernel.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).