LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Changbin Du <changbin.du@gmail.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Changbin Du <changbin.du@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Randy Dunlap <rdunlap@infradead.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: linux-next: Tree for Oct 31 (vboxguest)
Date: Fri, 2 Nov 2018 23:59:14 +0000	[thread overview]
Message-ID: <20181102235214.uow7crqa5qxnuzxr@mail.google.com> (raw)
In-Reply-To: <CAK7LNAQbBG=KV5Q8o5-JiNCswuse94jECoqT+T+UEY7bLCRPNw@mail.gmail.com>

Hi Yamada,
>On Fri, Nov 02, 2018 at 05:25:00PM +0900, Masahiro Yamada wrote:
>[...]
> > > >
> > > > diff --git a/drivers/virt/vboxguest/vboxguest_core.c
> > > > b/drivers/virt/vboxguest/vboxguest_core.c
> > > > index 3093655c7b92..1475ed5ffcde 100644
> > > > --- a/drivers/virt/vboxguest/vboxguest_core.c
> > > > +++ b/drivers/virt/vboxguest/vboxguest_core.c
> > > > @@ -1312,7 +1312,7 @@ static int vbg_ioctl_hgcm_call(struct vbg_dev *gdev,
> > > >                 return -EINVAL;
> > > >         }
> > > >
> > > > -       if (f32bit)
> > > > +       if (IS_ENABLED(CONFIG_COMPAT) && f32bit)
> > > >                 ret = vbg_hgcm_call32(gdev, client_id,
> > > >                                       call->function, call->timeout_ms,
> > > >                                       VBG_IOCTL_HGCM_CALL_PARMS32(call),
> > >
> > > Right, but adding the CONFIG_COMPAT guard to both the caller and the callee
> > > looks a bit redundant...
> > >
> > >
> > > I think most cases causing this kind of problem
> > > rely on the assumption that 'static' functions are inlined.
> > >
> > > We can force the compiler to do so
> > > by replacing 'static' with 'static __always_inline'
> > >
> > Declaring it as normal 'inline' is enough. The inline functions are
> > still inlined by gcc. Thanks.
> 
> 
> How about clang?
> 
> For clang, -Og might be equivalent to -O1 at this moment, but I am not sure.
> 
> In my understanding, Clang does not inline functions marked with 'static inline'
> for -Og (or -O1) optimization level.
> 
> Theoretically, 'inline' keyword is a just hint for the compiler, after all.
> 
I only verified it with GCC. But on my machine, clang does not work since it
lacks 'asm-goto' feature. Is clang linux completed?

changbin@acer:~/Desktop/work/linux$ make HOSTCC=clang CC=clang
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
Compiler lacks asm-goto support.
arch/x86/Makefile:308: recipe for target 'checkbin' failed
make: *** [checkbin] Error 1
changbin@acer:~/Desktop/work/linux$ clang -v
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0
Candidate multilib: .;@m64
Selected multilib: .;@m64

> 
> -- 
> Best Regards
> Masahiro Yamada

-- 
Thanks,
Changbin Du

      parent reply	other threads:[~2018-11-02 23:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31  3:59 linux-next: Tree for Oct 31 Stephen Rothwell
2018-10-31 15:51 ` linux-next: Tree for Oct 31 (vboxguest) Randy Dunlap
2018-10-31 16:50   ` Hans de Goede
2018-10-31 19:06     ` Randy Dunlap
2018-10-31 21:41   ` Arnd Bergmann
2018-10-31 21:45     ` Randy Dunlap
2018-11-01  3:32     ` Masahiro Yamada
2018-11-01 14:29       ` Changbin Du
2018-11-02  8:25         ` Masahiro Yamada
2018-11-02 15:54           ` Arnd Bergmann
2018-11-02 23:59             ` Changbin Du
2018-11-04  2:43             ` Masahiro Yamada
2018-11-04 23:38               ` Changbin Du
2018-11-05  3:00                 ` Masahiro Yamada
2018-11-02 23:59           ` Changbin Du [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=20181102235214.uow7crqa5qxnuzxr@mail.google.com \
    --to=changbin.du@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sfr@canb.auug.org.au \
    --cc=yamada.masahiro@socionext.com \
    --subject='Re: linux-next: Tree for Oct 31 (vboxguest)' \
    /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

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).