All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 1713/4903] drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare'
@ 2020-09-04 11:56 kernel test robot
  2020-09-04 19:40 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2020-09-04 11:56 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3610 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7a6956579ce6950890ea706f6fcf7874a7981f50
commit: 5936b3bdaa888907596df0a954db4d14657ec621 [1713/4903] drm/panel: samsung: Use dev_ based logging
config: riscv-randconfig-r034-20200904 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1284dc34abd11ce4275ad21c0470ad8c679b59b7)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        git checkout 5936b3bdaa888907596df0a954db4d14657ec621
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare' [-Wframe-larger-than=]
   static int s6e63m0_prepare(struct drm_panel *panel)
              ^
   1 warning generated.

# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5936b3bdaa888907596df0a954db4d14657ec621
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 5936b3bdaa888907596df0a954db4d14657ec621
vim +/s6e63m0_prepare +322 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c

994a08a266e3e6 Paweł Chmiel 2019-02-22  321  
994a08a266e3e6 Paweł Chmiel 2019-02-22 @322  static int s6e63m0_prepare(struct drm_panel *panel)
994a08a266e3e6 Paweł Chmiel 2019-02-22  323  {
994a08a266e3e6 Paweł Chmiel 2019-02-22  324  	struct s6e63m0 *ctx = panel_to_s6e63m0(panel);
994a08a266e3e6 Paweł Chmiel 2019-02-22  325  	int ret;
994a08a266e3e6 Paweł Chmiel 2019-02-22  326  
994a08a266e3e6 Paweł Chmiel 2019-02-22  327  	if (ctx->prepared)
994a08a266e3e6 Paweł Chmiel 2019-02-22  328  		return 0;
994a08a266e3e6 Paweł Chmiel 2019-02-22  329  
994a08a266e3e6 Paweł Chmiel 2019-02-22  330  	ret = s6e63m0_power_on(ctx);
994a08a266e3e6 Paweł Chmiel 2019-02-22  331  	if (ret < 0)
994a08a266e3e6 Paweł Chmiel 2019-02-22  332  		return ret;
994a08a266e3e6 Paweł Chmiel 2019-02-22  333  
994a08a266e3e6 Paweł Chmiel 2019-02-22  334  	s6e63m0_init(ctx);
994a08a266e3e6 Paweł Chmiel 2019-02-22  335  
994a08a266e3e6 Paweł Chmiel 2019-02-22  336  	ret = s6e63m0_clear_error(ctx);
994a08a266e3e6 Paweł Chmiel 2019-02-22  337  
994a08a266e3e6 Paweł Chmiel 2019-02-22  338  	if (ret < 0)
994a08a266e3e6 Paweł Chmiel 2019-02-22  339  		s6e63m0_unprepare(panel);
994a08a266e3e6 Paweł Chmiel 2019-02-22  340  
994a08a266e3e6 Paweł Chmiel 2019-02-22  341  	ctx->prepared = true;
994a08a266e3e6 Paweł Chmiel 2019-02-22  342  
994a08a266e3e6 Paweł Chmiel 2019-02-22  343  	return ret;
994a08a266e3e6 Paweł Chmiel 2019-02-22  344  }
994a08a266e3e6 Paweł Chmiel 2019-02-22  345  

:::::: The code at line 322 was first introduced by commit
:::::: 994a08a266e3e6002100ca6e205204512a2f93d4 drm/panel: Add driver for Samsung S6E63M0 panel

:::::: TO: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
:::::: CC: Thierry Reding <treding@nvidia.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29496 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 1713/4903] drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare'
  2020-09-04 11:56 [linux-next:master 1713/4903] drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare' kernel test robot
@ 2020-09-04 19:40 ` Linus Walleij
  2020-09-09 18:29   ` Nick Desaulniers
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2020-09-04 19:40 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

On Fri, Sep 4, 2020 at 1:57 PM kernel test robot <lkp@intel.com> wrote:

> >> drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare' [-Wframe-larger-than=]
>    static int s6e63m0_prepare(struct drm_panel *panel)
>               ^
>    1 warning generated.

What can we even do with a warning like this? It's utterly confusing.

Whoever enabled this warning need to think seriously about how
these things get reported, to me this is just some unintelligible
noise and I even know very well what a stack frame is.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 1713/4903] drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare'
  2020-09-04 19:40 ` Linus Walleij
@ 2020-09-09 18:29   ` Nick Desaulniers
  2020-09-09 21:14     ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Desaulniers @ 2020-09-09 18:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

On Fri, Sep 4, 2020 at 12:40 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Fri, Sep 4, 2020 at 1:57 PM kernel test robot <lkp@intel.com> wrote:
>
> > >> drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare' [-Wframe-larger-than=]
> >    static int s6e63m0_prepare(struct drm_panel *panel)
> >               ^
> >    1 warning generated.
>
> What can we even do with a warning like this? It's utterly confusing.
>
> Whoever enabled this warning need to think seriously about how
> these things get reported, to me this is just some unintelligible
> noise and I even know very well what a stack frame is.

I agree. I ended up writing a tool to debug these:
https://github.com/ClangBuiltLinux/frame-larger-than
I don't have time to look into this specific issue, but it looks like
a randconfig; if any of the sanitizers are enabled, it's a common
issue that magnifies stack usage.
-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 1713/4903] drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare'
  2020-09-09 18:29   ` Nick Desaulniers
@ 2020-09-09 21:14     ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2020-09-09 21:14 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]

On Wed, Sep 9, 2020 at 8:29 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
> On Fri, Sep 4, 2020 at 12:40 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> > On Fri, Sep 4, 2020 at 1:57 PM kernel test robot <lkp@intel.com> wrote:
> >
> > > >> drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare' [-Wframe-larger-than=]
> > >    static int s6e63m0_prepare(struct drm_panel *panel)
> > >               ^
> > >    1 warning generated.
> >
> > What can we even do with a warning like this? It's utterly confusing.
> >
> > Whoever enabled this warning need to think seriously about how
> > these things get reported, to me this is just some unintelligible
> > noise and I even know very well what a stack frame is.
>
> I agree. I ended up writing a tool to debug these:
> https://github.com/ClangBuiltLinux/frame-larger-than
> I don't have time to look into this specific issue, but it looks like
> a randconfig; if any of the sanitizers are enabled, it's a common
> issue that magnifies stack usage.

Hm thanks that got me thinking.

For some instrumentation like KASan we (on ARM) double
the stack size by increasing the order by one. I'm not sure
this is reflected up to the compiler checks actually. It
would report a non-issue for an assumed default stack
size.

Thanks!
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-09 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04 11:56 [linux-next:master 1713/4903] drivers/gpu/drm/panel/panel-samsung-s6e63m0.c:322:12: warning: stack frame size of 12576 bytes in function 's6e63m0_prepare' kernel test robot
2020-09-04 19:40 ` Linus Walleij
2020-09-09 18:29   ` Nick Desaulniers
2020-09-09 21:14     ` Linus Walleij

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.