From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-sparse@vger.kernel.org
Subject: __builtin_types_compatible_p() is too accepting
Date: Wed, 3 Nov 2021 16:36:00 +0300 [thread overview]
Message-ID: <20211103133600.GU2794@kadam> (raw)
The kunmap_atomic() has a BUILD_BUG_ON(__same_type((__addr), struct page *))
which does __builtin_types_compatible_p(typeof(a), typeof(b)).
The problem is that Sparse considers "void *" compatible with
"struct page *" so the BUILD_BUG_ON() triggers but GCC says they are not
compatible (which is the desired behavior for the kernel).
regards,
dan carpenter
next reply other threads:[~2021-11-03 13:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 13:36 Dan Carpenter [this message]
2021-11-08 11:48 ` __builtin_types_compatible_p() is too accepting Dan Carpenter
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=20211103133600.GU2794@kadam \
--to=dan.carpenter@oracle.com \
--cc=linux-sparse@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).