All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Sudeep Holla <Sudeep.Holla@arm.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Stephen Boyd <sboyd@codeaurora.org>
Subject: drivers/base/power/opp/core.c:1901:6: error: redefinition of 'dev_pm_opp_remove_table'
Date: Mon, 13 Feb 2017 05:09:32 +0800	[thread overview]
Message-ID: <201702130525.GiAnnU4b%fengguang.wu@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1ce42845f987e92eabfc6e026d44d826c25c74a5
commit: 411466c5081d2f649b3583cae0f6c9ad5edec636 PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_, }remove_table
date:   9 months ago
config: x86_64-randconfig-x008-201707 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 411466c5081d2f649b3583cae0f6c9ad5edec636
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:119:34: note: previous definition of 'dev_pm_opp_find_freq_floor' was here
    static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:596:5: error: redefinition of 'dev_pm_opp_set_rate'
    int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
        ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:180:19: note: previous definition of 'dev_pm_opp_set_rate' was here
    static inline int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
                      ^~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:926:6: error: redefinition of 'dev_pm_opp_remove'
    void dev_pm_opp_remove(struct device *dev, unsigned long freq)
         ^~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:137:20: note: previous definition of 'dev_pm_opp_remove' was here
    static inline void dev_pm_opp_remove(struct device *dev, unsigned long freq)
                       ^~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1212:5: error: redefinition of 'dev_pm_opp_set_supported_hw'
    int dev_pm_opp_set_supported_hw(struct device *dev, const u32 *versions,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:157:19: note: previous definition of 'dev_pm_opp_set_supported_hw' was here
    static inline int dev_pm_opp_set_supported_hw(struct device *dev,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1272:6: error: redefinition of 'dev_pm_opp_put_supported_hw'
    void dev_pm_opp_put_supported_hw(struct device *dev)
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:164:20: note: previous definition of 'dev_pm_opp_put_supported_hw' was here
    static inline void dev_pm_opp_put_supported_hw(struct device *dev) {}
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1324:5: error: redefinition of 'dev_pm_opp_set_prop_name'
    int dev_pm_opp_set_prop_name(struct device *dev, const char *name)
        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:166:19: note: previous definition of 'dev_pm_opp_set_prop_name' was here
    static inline int dev_pm_opp_set_prop_name(struct device *dev, const char *name)
                      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1381:6: error: redefinition of 'dev_pm_opp_put_prop_name'
    void dev_pm_opp_put_prop_name(struct device *dev)
         ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:171:20: note: previous definition of 'dev_pm_opp_put_prop_name' was here
    static inline void dev_pm_opp_put_prop_name(struct device *dev) {}
                       ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1431:5: error: redefinition of 'dev_pm_opp_set_regulator'
    int dev_pm_opp_set_regulator(struct device *dev, const char *name)
        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:173:19: note: previous definition of 'dev_pm_opp_set_regulator' was here
    static inline int dev_pm_opp_set_regulator(struct device *dev, const char *name)
                      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1490:6: error: redefinition of 'dev_pm_opp_put_regulator'
    void dev_pm_opp_put_regulator(struct device *dev)
         ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:178:20: note: previous definition of 'dev_pm_opp_put_regulator' was here
    static inline void dev_pm_opp_put_regulator(struct device *dev) {}
                       ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1684:5: error: redefinition of 'dev_pm_opp_add'
    int dev_pm_opp_add(struct device *dev, unsigned long freq, unsigned long u_volt)
        ^~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:131:19: note: previous definition of 'dev_pm_opp_add' was here
    static inline int dev_pm_opp_add(struct device *dev, unsigned long freq,
                      ^~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1791:5: error: redefinition of 'dev_pm_opp_enable'
    int dev_pm_opp_enable(struct device *dev, unsigned long freq)
        ^~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:141:19: note: previous definition of 'dev_pm_opp_enable' was here
    static inline int dev_pm_opp_enable(struct device *dev, unsigned long freq)
                      ^~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1817:5: error: redefinition of 'dev_pm_opp_disable'
    int dev_pm_opp_disable(struct device *dev, unsigned long freq)
        ^~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:146:19: note: previous definition of 'dev_pm_opp_disable' was here
    static inline int dev_pm_opp_disable(struct device *dev, unsigned long freq)
                      ^~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1837:28: error: redefinition of 'dev_pm_opp_get_notifier'
    struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev)
                               ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:151:42: note: previous definition of 'dev_pm_opp_get_notifier' was here
    static inline struct srcu_notifier_head *dev_pm_opp_get_notifier(
                                             ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/base/power/opp/core.c:1901:6: error: redefinition of 'dev_pm_opp_remove_table'
    void dev_pm_opp_remove_table(struct device *dev)
         ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:195:20: note: previous definition of 'dev_pm_opp_remove_table' was here
    static inline void dev_pm_opp_remove_table(struct device *dev)
                       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1921:6: error: redefinition of 'dev_pm_opp_of_remove_table'
    void dev_pm_opp_of_remove_table(struct device *dev)
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:217:20: note: previous definition of 'dev_pm_opp_of_remove_table' was here
    static inline void dev_pm_opp_of_remove_table(struct device *dev)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:2057:5: error: redefinition of 'dev_pm_opp_of_add_table'
    int dev_pm_opp_of_add_table(struct device *dev)
        ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:25:
   include/linux/pm_opp.h:212:19: note: previous definition of 'dev_pm_opp_of_add_table' was here
    static inline int dev_pm_opp_of_add_table(struct device *dev)
                      ^~~~~~~~~~~~~~~~~~~~~~~

vim +/dev_pm_opp_remove_table +1901 drivers/base/power/opp/core.c

  1831	 * Locking: This function must be called under rcu_read_lock(). opp_table is a
  1832	 * RCU protected pointer. The reason for the same is that the opp pointer which
  1833	 * is returned will remain valid for use with opp_get_{voltage, freq} only while
  1834	 * under the locked area. The pointer returned must be used prior to unlocking
  1835	 * with rcu_read_unlock() to maintain the integrity of the pointer.
  1836	 */
> 1837	struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev)
  1838	{
  1839		struct opp_table *opp_table = _find_opp_table(dev);
  1840	
  1841		if (IS_ERR(opp_table))
  1842			return ERR_CAST(opp_table); /* matching type */
  1843	
  1844		return &opp_table->srcu_head;
  1845	}
  1846	EXPORT_SYMBOL_GPL(dev_pm_opp_get_notifier);
  1847	
  1848	/*
  1849	 * Free OPPs either created using static entries present in DT or even the
  1850	 * dynamically added entries based on remove_all param.
  1851	 */
  1852	static void _dev_pm_opp_remove_table(struct device *dev, bool remove_all)
  1853	{
  1854		struct opp_table *opp_table;
  1855		struct dev_pm_opp *opp, *tmp;
  1856	
  1857		/* Hold our table modification lock here */
  1858		mutex_lock(&opp_table_lock);
  1859	
  1860		/* Check for existing table for 'dev' */
  1861		opp_table = _find_opp_table(dev);
  1862		if (IS_ERR(opp_table)) {
  1863			int error = PTR_ERR(opp_table);
  1864	
  1865			if (error != -ENODEV)
  1866				WARN(1, "%s: opp_table: %d\n",
  1867				     IS_ERR_OR_NULL(dev) ?
  1868						"Invalid device" : dev_name(dev),
  1869				     error);
  1870			goto unlock;
  1871		}
  1872	
  1873		/* Find if opp_table manages a single device */
  1874		if (list_is_singular(&opp_table->dev_list)) {
  1875			/* Free static OPPs */
  1876			list_for_each_entry_safe(opp, tmp, &opp_table->opp_list, node) {
  1877				if (remove_all || !opp->dynamic)
  1878					_opp_remove(opp_table, opp, true);
  1879			}
  1880		} else {
  1881			_remove_opp_dev(_find_opp_dev(dev, opp_table), opp_table);
  1882		}
  1883	
  1884	unlock:
  1885		mutex_unlock(&opp_table_lock);
  1886	}
  1887	
  1888	/**
  1889	 * dev_pm_opp_remove_table() - Free all OPPs associated with the device
  1890	 * @dev:	device pointer used to lookup OPP table.
  1891	 *
  1892	 * Free both OPPs created using static entries present in DT and the
  1893	 * dynamically added entries.
  1894	 *
  1895	 * Locking: The internal opp_table and opp structures are RCU protected.
  1896	 * Hence this function indirectly uses RCU updater strategy with mutex locks
  1897	 * to keep the integrity of the internal data structures. Callers should ensure
  1898	 * that this function is *NOT* called under RCU protection or in contexts where
  1899	 * mutex cannot be locked.
  1900	 */
> 1901	void dev_pm_opp_remove_table(struct device *dev)
  1902	{
  1903		_dev_pm_opp_remove_table(dev, true);
  1904	}

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

             reply	other threads:[~2017-02-12 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-12 21:09 kbuild test robot [this message]
2017-02-13 10:40 ` drivers/base/power/opp/core.c:1901:6: error: redefinition of 'dev_pm_opp_remove_table' Sudeep Holla
2017-02-14  2:25   ` Philip Li

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=201702130525.GiAnnU4b%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=Sudeep.Holla@arm.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@codeaurora.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.