Linux-Sparse Archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Luc Van Oostenryck" <lucvoo@kernel.org>,
	"Uwe Kleine-König" <ukleinek@debian.org>
Cc: linux-sparse@vger.kernel.org,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] fix "unreplaced" warnings caused by using typeof() on inline functions
Date: Fri, 2 Sep 2022 13:02:45 +0300	[thread overview]
Message-ID: <YxHUxfOxDuwe9k1n@smile.fi.intel.com> (raw)
In-Reply-To: <Yr7kPM1wLZnOqxOA@smile.fi.intel.com>

On Fri, Jul 01, 2022 at 03:10:36PM +0300, Andy Shevchenko wrote:
> On Fri, Jun 24, 2022 at 06:46:01PM +0200, Luc Van Oostenryck wrote:
> > From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> > 
> > Currently, sparse do all its inlining at the tree level, during
> > constant expansion. To not mix-up the evaluation of the original
> > function body in case the address of an inline function is taken or
> > when the function can't otherwise be inlined, the statements and
> > symbols lists of inline functions are kept in separated fields.
> > Then, if the original body must be evaluated it must first be
> > 'uninlined' to have a copy in the usual fields.
> > 
> > This make sense when dealing with the definition of the function.
> > But, when using typeof() on functions, the resulting type doesn't
> > refer to this definition, it's just a copy of the type and only
> > of the type. There shouldn't be any reasons to uninline anything.
> > However, the distinction between 'full function' and 'type only'
> > is not made during evaluation and the uninlining attempt produce
> > a lot of "warning: unreplaced symbol '...'" because of the lack
> > of a corresponding definition.
> > 
> > Fix this by not doing the uninlining if the symbol lack a definition.
> > 
> > Note: It would maybe be more appropriate for EXPR_TYPE to use
> >       a stripped-own version of evaluate_symbol() doing only the
> >       examination of the return and argument types, bypassing the
> >       attempt to uninline the body and evaluate the initializer and
> >       the statements since there is none of those for an EXPR_TYPE.
> 
> Uwe, can we get a Debian package with this fix, it's really a tons of such
> messages when compile kernel with C=1?

As of today it seems Debian still has old sparse version...

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2022-09-02 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 16:46 [PATCH] fix "unreplaced" warnings caused by using typeof() on inline functions Luc Van Oostenryck
2022-07-01 12:10 ` Andy Shevchenko
2022-07-01 13:31   ` Uwe Kleine-König
2022-09-02 10:02   ` Andy Shevchenko [this message]

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=YxHUxfOxDuwe9k1n@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=lucvoo@kernel.org \
    --cc=ukleinek@debian.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 read-only IMAP folder(s) and NNTP newsgroup(s).