From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Julia Lawall <julia@diku.dk>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
lksctp-developers@lists.sourceforge.net, sri@us.ibm.com
Subject: Re: [Lksctp-developers] [PATCH 8/8] : Use FIELD_SIZEOF
Date: Mon, 11 Feb 2008 02:23:11 +0000 [thread overview]
Message-ID: <47AFB18F.1020006@hp.com> (raw)
In-Reply-To: <20080210211258.GE1754@martell.zuzino.mipt.ru>
Alexey Dobriyan wrote:
> On Sun, Feb 10, 2008 at 09:16:04PM +0100, Julia Lawall wrote:
>> --- a/include/net/sctp/sctp.h
>> +++ b/include/net/sctp/sctp.h
>> @@ -618,7 +618,7 @@ static inline int param_type2af(__be16 t
>> static inline int sctp_sanity_check(void)
>> {
>> SCTP_ASSERT(sizeof(struct sctp_ulpevent) <>> - sizeof(((struct sk_buff *)0)->cb),
>> + FIELD_SIZEOF(struct sk_buff, cb),
>> "SCTP: ulpevent does not fit in skb!\n", return 0);
>>
>> return 1;
>
> Same here. Use BUILD_BUG_ON instead.
Ack. BUILD_BUG_ON is definitely appropriate here, especially considering
that SCTP_ASSERT compiles to nothing with debugging turned off.
-vlad
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Lksctp-developers mailing list
> Lksctp-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lksctp-developers
>
WARNING: multiple messages have this Message-ID (diff)
From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Julia Lawall <julia@diku.dk>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
lksctp-developers@lists.sourceforge.net, sri@us.ibm.com
Subject: Re: [Lksctp-developers] [PATCH 8/8] : Use FIELD_SIZEOF
Date: Sun, 10 Feb 2008 21:23:11 -0500 [thread overview]
Message-ID: <47AFB18F.1020006@hp.com> (raw)
In-Reply-To: <20080210211258.GE1754@martell.zuzino.mipt.ru>
Alexey Dobriyan wrote:
> On Sun, Feb 10, 2008 at 09:16:04PM +0100, Julia Lawall wrote:
>> --- a/include/net/sctp/sctp.h
>> +++ b/include/net/sctp/sctp.h
>> @@ -618,7 +618,7 @@ static inline int param_type2af(__be16 t
>> static inline int sctp_sanity_check(void)
>> {
>> SCTP_ASSERT(sizeof(struct sctp_ulpevent) <=
>> - sizeof(((struct sk_buff *)0)->cb),
>> + FIELD_SIZEOF(struct sk_buff, cb),
>> "SCTP: ulpevent does not fit in skb!\n", return 0);
>>
>> return 1;
>
> Same here. Use BUILD_BUG_ON instead.
Ack. BUILD_BUG_ON is definitely appropriate here, especially considering
that SCTP_ASSERT compiles to nothing with debugging turned off.
-vlad
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Lksctp-developers mailing list
> Lksctp-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lksctp-developers
>
next prev parent reply other threads:[~2008-02-11 2:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-10 20:16 [PATCH 8/8] : Use FIELD_SIZEOF Julia Lawall
2008-02-10 20:16 ` Julia Lawall
2008-02-10 21:12 ` Alexey Dobriyan
2008-02-10 21:12 ` Alexey Dobriyan
2008-02-11 2:23 ` Vlad Yasevich [this message]
2008-02-11 2:23 ` [Lksctp-developers] " Vlad Yasevich
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=47AFB18F.1020006@hp.com \
--to=vladislav.yasevich@hp.com \
--cc=adobriyan@gmail.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lksctp-developers@lists.sourceforge.net \
--cc=sri@us.ibm.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.