From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Bart Van Assche
<bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>,
Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] IB/core: Fix different types mix in ib_device_cap_flags structure values
Date: Tue, 31 May 2016 21:54:32 +0300 [thread overview]
Message-ID: <20160531185432.GF7477@leon.nu> (raw)
In-Reply-To: <20160531182100.GC21834-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
On Tue, May 31, 2016 at 12:21:00PM -0600, Jason Gunthorpe wrote:
> On Tue, May 31, 2016 at 09:12:23PM +0300, Leon Romanovsky wrote:
>
> > I understand from the description/standards that first enum declares
> > type.
>
> No, you quoted the relevant standard:
>
> .. but shall be capable of representing the values of all the members
> of the enumeration. ..
>
> Truncation is not allowed.
I'm not convinced that it talks about truncation.
From the same document:
"The expression that defines the value of an enumeration constant shall
be an integer constant expression that has a value representable as an
int."
>
> Jason
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>,
Max Gurtovoy <maxg@mellanox.com>,
matanb@mellanox.com, sagi@grimberg.me,
linux-rdma@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] IB/core: Fix different types mix in ib_device_cap_flags structure values
Date: Tue, 31 May 2016 21:54:32 +0300 [thread overview]
Message-ID: <20160531185432.GF7477@leon.nu> (raw)
In-Reply-To: <20160531182100.GC21834@obsidianresearch.com>
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
On Tue, May 31, 2016 at 12:21:00PM -0600, Jason Gunthorpe wrote:
> On Tue, May 31, 2016 at 09:12:23PM +0300, Leon Romanovsky wrote:
>
> > I understand from the description/standards that first enum declares
> > type.
>
> No, you quoted the relevant standard:
>
> .. but shall be capable of representing the values of all the members
> of the enumeration. ..
>
> Truncation is not allowed.
I'm not convinced that it talks about truncation.
From the same document:
"The expression that defines the value of an enumeration constant shall
be an integer constant expression that has a value representable as an
int."
>
> Jason
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-31 18:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 10:09 [PATCH] IB/core: Fix different types mix in ib_device_cap_flags structure values Max Gurtovoy
2016-05-31 15:36 ` Bart Van Assche
2016-05-31 15:36 ` Bart Van Assche
[not found] ` <4156c03f-4977-17eb-db64-6df775b6e592-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-31 19:14 ` Max Gurtovoy
2016-05-31 19:14 ` Max Gurtovoy
[not found] ` <1464602994-21226-1-git-send-email-maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-31 15:35 ` Bart Van Assche
2016-05-31 15:35 ` Bart Van Assche
2016-05-31 17:13 ` Jason Gunthorpe
[not found] ` <20160531171306.GA6618-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-31 17:30 ` Leon Romanovsky
2016-05-31 17:30 ` Leon Romanovsky
[not found] ` <20160531173033.GC7477-2ukJVAZIZ/Y@public.gmane.org>
2016-05-31 18:05 ` Bart Van Assche
2016-05-31 18:05 ` Bart Van Assche
2016-05-31 18:12 ` Leon Romanovsky
[not found] ` <20160531181223.GE7477-2ukJVAZIZ/Y@public.gmane.org>
2016-05-31 18:21 ` Jason Gunthorpe
2016-05-31 18:21 ` Jason Gunthorpe
[not found] ` <20160531182100.GC21834-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-31 18:54 ` Leon Romanovsky [this message]
2016-05-31 18:54 ` Leon Romanovsky
2016-05-31 19:39 ` Jason Gunthorpe
2016-06-01 12:04 ` Max Gurtovoy
2016-06-01 12:04 ` Max Gurtovoy
[not found] ` <574ECF44.3070003-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-06-01 15:35 ` Sagi Grimberg
2016-06-01 15:35 ` Sagi Grimberg
2016-05-31 18:43 ` Bart Van Assche
2016-05-31 18:43 ` Bart Van Assche
2016-05-31 18:16 ` Jason Gunthorpe
2016-05-31 19:16 ` Robert LeBlanc
2016-05-31 19:16 ` Robert LeBlanc
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=20160531185432.GF7477@leon.nu \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org \
--cc=stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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.