lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201702130603.gEbe5E5G%fengguang.wu@intel.com>
Date:   Mon, 13 Feb 2017 06:40:14 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Stephen Boyd <sboyd@...eaurora.org>
Subject: drivers/base/power/opp/core.c:1597:5: error: redefinition of
 'dev_pm_opp_register_set_opp_helper'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7089db84e356562f8ba737c29e472cc42d530dbc
commit: 4dab160eb1586f67e8ba7c55ffdd2373f7a5553e PM / OPP: Allow platform specific custom set_opp() callbacks
date:   10 weeks 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 4dab160eb1586f67e8ba7c55ffdd2373f7a5553e
        # 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:24:
   include/linux/pm_opp.h:162:34: note: previous definition of 'dev_pm_opp_get_suspend_opp' was here
    static inline struct dev_pm_opp *dev_pm_opp_get_suspend_opp(struct device *dev)
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:367:5: error: redefinition of 'dev_pm_opp_get_opp_count'
    int dev_pm_opp_get_opp_count(struct device *dev)
        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:24:
   include/linux/pm_opp.h:142:19: note: previous definition of 'dev_pm_opp_get_opp_count' was here
    static inline int dev_pm_opp_get_opp_count(struct device *dev)
                      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:420:20: error: redefinition of 'dev_pm_opp_find_freq_exact'
    struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:24:
   include/linux/pm_opp.h:167:34: note: previous definition of 'dev_pm_opp_find_freq_exact' was here
    static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:486:20: error: redefinition of 'dev_pm_opp_find_freq_ceil'
    struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:24:
   include/linux/pm_opp.h:179:34: note: previous definition of 'dev_pm_opp_find_freq_ceil' was here
    static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:527:20: error: redefinition of 'dev_pm_opp_find_freq_floor'
    struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:24:
   include/linux/pm_opp.h:173: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:686: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:24:
   include/linux/pm_opp.h:242: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:985: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:24:
   include/linux/pm_opp.h:191: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:24:
   include/linux/pm_opp.h:211: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:24:
   include/linux/pm_opp.h:218: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:24:
   include/linux/pm_opp.h:228: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:24:
   include/linux/pm_opp.h:233: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:1465:19: error: redefinition of 'dev_pm_opp_set_regulators'
    struct opp_table *dev_pm_opp_set_regulators(struct device *dev,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:24:
   include/linux/pm_opp.h:235:33: note: previous definition of 'dev_pm_opp_set_regulators' was here
    static inline struct opp_table *dev_pm_opp_set_regulators(struct device *dev, const char * const names[], unsigned int count)
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1550:6: error: redefinition of 'dev_pm_opp_put_regulators'
    void dev_pm_opp_put_regulators(struct opp_table *opp_table)
         ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:24:
   include/linux/pm_opp.h:240:20: note: previous definition of 'dev_pm_opp_put_regulators' was here
    static inline void dev_pm_opp_put_regulators(struct opp_table *opp_table) {}
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/base/power/opp/core.c:1597:5: error: redefinition of 'dev_pm_opp_register_set_opp_helper'
    int dev_pm_opp_register_set_opp_helper(struct device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:24:
   include/linux/pm_opp.h:220:19: note: previous definition of 'dev_pm_opp_register_set_opp_helper' was here
    static inline int dev_pm_opp_register_set_opp_helper(struct device *dev,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/base/power/opp/core.c:1651:6: error: redefinition of 'dev_pm_opp_register_put_opp_helper'
    void dev_pm_opp_register_put_opp_helper(struct device *dev)
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/base/power/opp/opp.h:21:0,
                    from drivers/base/power/opp/core.c:24:
   include/linux/pm_opp.h:226:20: note: previous definition of 'dev_pm_opp_register_put_opp_helper' was here
    static inline void dev_pm_opp_register_put_opp_helper(struct device *dev) {}
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/power/opp/core.c:1707: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:24:
   include/linux/pm_opp.h:185: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:1814: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:24:
   include/linux/pm_opp.h:195: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:1840: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:24:
   include/linux/pm_opp.h:200: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:1860: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:24:
   include/linux/pm_opp.h:205: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:1924: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:24:
   include/linux/pm_opp.h:257:20: note: previous definition of 'dev_pm_opp_remove_table' was here
    static inline void dev_pm_opp_remove_table(struct device *dev)
                       ^~~~~~~~~~~~~~~~~~~~~~~

vim +/dev_pm_opp_register_set_opp_helper +1597 drivers/base/power/opp/core.c

  1544	 * Locking: The internal opp_table and opp structures are RCU protected.
  1545	 * Hence this function internally uses RCU updater strategy with mutex locks
  1546	 * to keep the integrity of the internal data structures. Callers should ensure
  1547	 * that this function is *NOT* called under RCU protection or in contexts where
  1548	 * mutex cannot be locked.
  1549	 */
> 1550	void dev_pm_opp_put_regulators(struct opp_table *opp_table)
  1551	{
  1552		int i;
  1553	
  1554		mutex_lock(&opp_table_lock);
  1555	
  1556		if (!opp_table->regulators) {
  1557			pr_err("%s: Doesn't have regulators set\n", __func__);
  1558			goto unlock;
  1559		}
  1560	
  1561		/* Make sure there are no concurrent readers while updating opp_table */
  1562		WARN_ON(!list_empty(&opp_table->opp_list));
  1563	
  1564		for (i = opp_table->regulator_count - 1; i >= 0; i--)
  1565			regulator_put(opp_table->regulators[i]);
  1566	
  1567		_free_set_opp_data(opp_table);
  1568	
  1569		kfree(opp_table->regulators);
  1570		opp_table->regulators = NULL;
  1571		opp_table->regulator_count = 0;
  1572	
  1573		/* Try freeing opp_table if this was the last blocking resource */
  1574		_remove_opp_table(opp_table);
  1575	
  1576	unlock:
  1577		mutex_unlock(&opp_table_lock);
  1578	}
  1579	EXPORT_SYMBOL_GPL(dev_pm_opp_put_regulators);
  1580	
  1581	/**
  1582	 * dev_pm_opp_register_set_opp_helper() - Register custom set OPP helper
  1583	 * @dev: Device for which the helper is getting registered.
  1584	 * @set_opp: Custom set OPP helper.
  1585	 *
  1586	 * This is useful to support complex platforms (like platforms with multiple
  1587	 * regulators per device), instead of the generic OPP set rate helper.
  1588	 *
  1589	 * This must be called before any OPPs are initialized for the device.
  1590	 *
  1591	 * Locking: The internal opp_table and opp structures are RCU protected.
  1592	 * Hence this function internally uses RCU updater strategy with mutex locks
  1593	 * to keep the integrity of the internal data structures. Callers should ensure
  1594	 * that this function is *NOT* called under RCU protection or in contexts where
  1595	 * mutex cannot be locked.
  1596	 */
> 1597	int dev_pm_opp_register_set_opp_helper(struct device *dev,
  1598				int (*set_opp)(struct dev_pm_set_opp_data *data))
  1599	{
  1600		struct opp_table *opp_table;
  1601		int ret;
  1602	
  1603		if (!set_opp)
  1604			return -EINVAL;
  1605	
  1606		mutex_lock(&opp_table_lock);
  1607	
  1608		opp_table = _add_opp_table(dev);
  1609		if (!opp_table) {
  1610			ret = -ENOMEM;
  1611			goto unlock;
  1612		}
  1613	
  1614		/* This should be called before OPPs are initialized */
  1615		if (WARN_ON(!list_empty(&opp_table->opp_list))) {
  1616			ret = -EBUSY;
  1617			goto err;
  1618		}
  1619	
  1620		/* Already have custom set_opp helper */
  1621		if (WARN_ON(opp_table->set_opp)) {
  1622			ret = -EBUSY;
  1623			goto err;
  1624		}
  1625	
  1626		opp_table->set_opp = set_opp;
  1627	
  1628		mutex_unlock(&opp_table_lock);
  1629		return 0;
  1630	
  1631	err:
  1632		_remove_opp_table(opp_table);
  1633	unlock:
  1634		mutex_unlock(&opp_table_lock);
  1635	
  1636		return ret;
  1637	}
  1638	EXPORT_SYMBOL_GPL(dev_pm_opp_register_set_opp_helper);
  1639	
  1640	/**
  1641	 * dev_pm_opp_register_put_opp_helper() - Releases resources blocked for
  1642	 *					   set_opp helper
  1643	 * @dev: Device for which custom set_opp helper has to be cleared.
  1644	 *
  1645	 * Locking: The internal opp_table and opp structures are RCU protected.
  1646	 * Hence this function internally uses RCU updater strategy with mutex locks
  1647	 * to keep the integrity of the internal data structures. Callers should ensure
  1648	 * that this function is *NOT* called under RCU protection or in contexts where
  1649	 * mutex cannot be locked.
  1650	 */
> 1651	void dev_pm_opp_register_put_opp_helper(struct device *dev)
  1652	{
  1653		struct opp_table *opp_table;
  1654	

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

Download attachment ".config.gz" of type "application/gzip" (30835 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ