All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: kernel test robot <lkp@intel.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, Jakub Kicinski <kuba@kernel.org>
Subject: Re: [linux-next:master 2051/2153] alpha-linux-ld: drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.o:undefined reference to `stmmac_simple_pm_ops'
Date: Wed, 13 Aug 2025 15:12:22 +0100	[thread overview]
Message-ID: <aJydRm4JvaZkE-m5@shell.armlinux.org.uk> (raw)
In-Reply-To: <202508132051.a7hJXkrd-lkp@intel.com>

Hi Rafael,

It seems that in the config below, CONFIG_PM is not set, which leads
EXPORT_SIMPLE_DEV_PM_OPS() not to export the ops, and define it static.

However, if I instead do:

DEFINE_SIMPLE_DEV_PM_OPS(name, ...);
EXPORT_SYMBOL_GPL(name);

then the symbol will obviously still be exported, and it also won't be
static, but the struct will be empty.

Essentially, EXPORT_SIMPLE_DEV_PM_OPS() is not semantically the same as
DEFINE_SIMPLE_DEV_PM_OPS() + EXPORT_SYMBOL_GPL() which is not what I
expected.

First question is, is this expected behaviour?

Second, should I be using DEFINE_SIMPLE_DEV_PM_OPS() +
EXPORT_SYMBOL_GPL() instead for this case? If not, should I use
pm_ptr() in all the drivers that reference the
EXPORT_SIMPLE_DEV_PM_OPS() symbol?

Thanks.

On Wed, Aug 13, 2025 at 08:19:37PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   43c3c17f0c805882d1b48818b1085747a68c80ec
> commit: 38772638d6d1989655f5a05b273dc62a026e0ef1 [2051/2153] net: stmmac: loongson: convert to suspend()/resume() methods
> config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250813/202508132051.a7hJXkrd-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 15.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250813/202508132051.a7hJXkrd-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202508132051.a7hJXkrd-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    `xe_configfs_exit' referenced in section `.data.rel.ro' of drivers/gpu/drm/xe/xe_module.o: defined in discarded section `.exit.text' of drivers/gpu/drm/xe/xe_configfs.o
> >> alpha-linux-ld: drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.o:(.data.rel+0xe0): undefined reference to `stmmac_simple_pm_ops'
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

      reply	other threads:[~2025-08-13 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 12:19 [linux-next:master 2051/2153] alpha-linux-ld: drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.o:undefined reference to `stmmac_simple_pm_ops' kernel test robot
2025-08-13 14:12 ` Russell King (Oracle) [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=aJydRm4JvaZkE-m5@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=kuba@kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@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 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.