[nbd168-wireless:mt76 73/113] drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1347:21: warning: variable 'dev' set but not used
by kernel test robot
tree: https://github.com/nbd168/wireless mt76
head: 39e333d657f49619c65b9f5b59aa6405f13abf35
commit: 6fab4ab4b0c10198055f44b4c6ac2c97a6b5d24e [73/113] mt76: mt7921: report tx rate directly from tx status
config: x86_64-randconfig-a004-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6069a6a5049497a32a50a49661c2f4169078bdba)
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
# https://github.com/nbd168/wireless/commit/6fab4ab4b0c10198055f44b4c6ac2c9...
git remote add nbd168-wireless https://github.com/nbd168/wireless
git fetch --no-tags nbd168-wireless mt76
git checkout 6fab4ab4b0c10198055f44b4c6ac2c97a6b5d24e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1347:21: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
struct mt7921_dev *dev;
^
1 warning generated.
vim +/dev +1347 drivers/net/wireless/mediatek/mt76/mt7921/mac.c
a7742ef4cd9166 Lorenzo Bianconi 2021-08-16 1344
163f4d22c118d4 Sean Wang 2021-01-28 1345 void mt7921_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue_entry *e)
163f4d22c118d4 Sean Wang 2021-01-28 1346 {
163f4d22c118d4 Sean Wang 2021-01-28 @1347 struct mt7921_dev *dev;
163f4d22c118d4 Sean Wang 2021-01-28 1348
163f4d22c118d4 Sean Wang 2021-01-28 1349 if (!e->txwi) {
163f4d22c118d4 Sean Wang 2021-01-28 1350 dev_kfree_skb_any(e->skb);
163f4d22c118d4 Sean Wang 2021-01-28 1351 return;
163f4d22c118d4 Sean Wang 2021-01-28 1352 }
163f4d22c118d4 Sean Wang 2021-01-28 1353
163f4d22c118d4 Sean Wang 2021-01-28 1354 dev = container_of(mdev, struct mt7921_dev, mt76);
163f4d22c118d4 Sean Wang 2021-01-28 1355
163f4d22c118d4 Sean Wang 2021-01-28 1356 /* error path */
163f4d22c118d4 Sean Wang 2021-01-28 1357 if (e->skb == DMA_DUMMY_DATA) {
163f4d22c118d4 Sean Wang 2021-01-28 1358 struct mt76_txwi_cache *t;
163f4d22c118d4 Sean Wang 2021-01-28 1359 struct mt7921_txp_common *txp;
163f4d22c118d4 Sean Wang 2021-01-28 1360 u16 token;
163f4d22c118d4 Sean Wang 2021-01-28 1361
163f4d22c118d4 Sean Wang 2021-01-28 1362 txp = mt7921_txwi_to_txp(mdev, e->txwi);
163f4d22c118d4 Sean Wang 2021-01-28 1363 token = le16_to_cpu(txp->hw.msdu_id[0]) & ~MT_MSDU_ID_VALID;
d089692bc7938a Lorenzo Bianconi 2021-04-20 1364 t = mt76_token_put(mdev, token);
163f4d22c118d4 Sean Wang 2021-01-28 1365 e->skb = t ? t->skb : NULL;
163f4d22c118d4 Sean Wang 2021-01-28 1366 }
163f4d22c118d4 Sean Wang 2021-01-28 1367
6fab4ab4b0c101 Lorenzo Bianconi 2021-09-04 1368 if (e->skb)
6fab4ab4b0c101 Lorenzo Bianconi 2021-09-04 1369 mt76_tx_complete_skb(mdev, e->wcid, e->skb);
163f4d22c118d4 Sean Wang 2021-01-28 1370 }
163f4d22c118d4 Sean Wang 2021-01-28 1371
:::::: The code at line 1347 was first introduced by commit
:::::: 163f4d22c118d4eb9e275bf9ee1577c0d14b3208 mt76: mt7921: add MAC support
:::::: TO: Sean Wang <sean.wang(a)mediatek.com>
:::::: CC: Felix Fietkau <nbd(a)nbd.name>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH v1 2/3] ACPI: PM: Fix sharing of wakeup power resources
by kernel test robot
Hi "Rafael,
I love your patch! Perhaps something to improve:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on linux/master linus/master v5.15-rc5 next-20211015]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Rafael-J-Wysocki/ACPI-PM-Address...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-r035-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6069a6a5049497a32a50a49661c2f4169078bdba)
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
# https://github.com/0day-ci/linux/commit/5e93f177b80cbc9b9ee6ffc15ff9ad0ad...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rafael-J-Wysocki/ACPI-PM-Address-issues-related-to-managing-wakeup-power-resources/20211016-010527
git checkout 5e93f177b80cbc9b9ee6ffc15ff9ad0ad23f2a7a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/acpi/power.c:719:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (dev->wakeup.prepare_count++)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:739:9: note: uninitialized use occurs here
return err;
^~~
drivers/acpi/power.c:719:2: note: remove the 'if' if its condition is always false
if (dev->wakeup.prepare_count++)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:712:9: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
drivers/acpi/power.c:764:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!dev->wakeup.prepare_count)
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:789:9: note: uninitialized use occurs here
return err;
^~~
drivers/acpi/power.c:764:2: note: remove the 'if' if its condition is always false
if (!dev->wakeup.prepare_count)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:758:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (dev->wakeup.prepare_count > 1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:789:9: note: uninitialized use occurs here
return err;
^~~
drivers/acpi/power.c:758:2: note: remove the 'if' if its condition is always false
if (dev->wakeup.prepare_count > 1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:751:9: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
3 warnings generated.
vim +719 drivers/acpi/power.c
77e766099efc29 Rafael J. Wysocki 2008-07-07 703
^1da177e4c3f41 Linus Torvalds 2005-04-16 704 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 705 * Prepare a wakeup device, two steps (Ref ACPI 2.0:P229):
^1da177e4c3f41 Linus Torvalds 2005-04-16 706 * 1. Power on the power resources required for the wakeup device
77e766099efc29 Rafael J. Wysocki 2008-07-07 707 * 2. Execute _DSW (Device Sleep Wake) or (deprecated in ACPI 3.0) _PSW (Power
77e766099efc29 Rafael J. Wysocki 2008-07-07 708 * State Wake) for the device, if present
^1da177e4c3f41 Linus Torvalds 2005-04-16 709 */
77e766099efc29 Rafael J. Wysocki 2008-07-07 710 int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state)
^1da177e4c3f41 Linus Torvalds 2005-04-16 711 {
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 712 int err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 713
^1da177e4c3f41 Linus Torvalds 2005-04-16 714 if (!dev || !dev->wakeup.flags.valid)
77e766099efc29 Rafael J. Wysocki 2008-07-07 715 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 716
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 717 mutex_lock(&acpi_device_lock);
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 718
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 @719 if (dev->wakeup.prepare_count++)
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 720 goto out;
0af4b8c4fb3119 Rafael J. Wysocki 2008-07-07 721
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 722 err = acpi_power_on_list(&dev->wakeup.resources);
993cbe595dda73 Rafael J. Wysocki 2013-01-17 723 if (err) {
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 724 dev_err(&dev->dev, "Cannot turn on wakeup power resources\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 725 dev->wakeup.flags.valid = 0;
b5d667eb392ed9 Rafael J. Wysocki 2013-02-23 726 goto out;
b5d667eb392ed9 Rafael J. Wysocki 2013-02-23 727 }
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 728
77e766099efc29 Rafael J. Wysocki 2008-07-07 729 /*
993cbe595dda73 Rafael J. Wysocki 2013-01-17 730 * Passing 3 as the third argument below means the device may be
993cbe595dda73 Rafael J. Wysocki 2013-01-17 731 * put into arbitrary power state afterward.
77e766099efc29 Rafael J. Wysocki 2008-07-07 732 */
0af4b8c4fb3119 Rafael J. Wysocki 2008-07-07 733 err = acpi_device_sleep_wake(dev, 1, sleep_state, 3);
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 734 if (err)
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 735 dev->wakeup.prepare_count = 0;
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 736
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 737 out:
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 738 mutex_unlock(&acpi_device_lock);
0af4b8c4fb3119 Rafael J. Wysocki 2008-07-07 739 return err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 740 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 741
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH 2/2] watchdog: Add Realtek Otto watchdog timer
by kernel test robot
Hi Sander,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.15-rc5 next-20211013]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sander-Vanheule/Add-Realtek-Otto...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f4d0cc426f77df6890aa868f96c2de89686aae8a
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/32b957f54703ffbffecc825fb8df3106b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sander-Vanheule/Add-Realtek-Otto-WDT-support/20211013-213511
git checkout 32b957f54703ffbffecc825fb8df3106b2aab6b5
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/clk/clk.c:855:6: error: redefinition of 'clk_unprepare'
855 | void clk_unprepare(struct clk *clk)
| ^~~~~~~~~~~~~
In file included from drivers/clk/clk.c:9:
include/linux/clk.h:303:20: note: previous definition of 'clk_unprepare' with type 'void(struct clk *)'
303 | static inline void clk_unprepare(struct clk *clk)
| ^~~~~~~~~~~~~
>> drivers/clk/clk.c:936:5: error: redefinition of 'clk_prepare'
936 | int clk_prepare(struct clk *clk)
| ^~~~~~~~~~~
In file included from drivers/clk/clk.c:9:
include/linux/clk.h:271:19: note: previous definition of 'clk_prepare' with type 'int(struct clk *)'
271 | static inline int clk_prepare(struct clk *clk)
| ^~~~~~~~~~~
>> drivers/clk/clk.c:1182:6: error: redefinition of 'clk_is_enabled_when_prepared'
1182 | bool clk_is_enabled_when_prepared(struct clk *clk)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/clk/clk.c:9:
include/linux/clk.h:284:20: note: previous definition of 'clk_is_enabled_when_prepared' with type 'bool(struct clk *)' {aka '_Bool(struct clk *)'}
284 | static inline bool clk_is_enabled_when_prepared(struct clk *clk)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for COMMON_CLK
Depends on !HAVE_LEGACY_CLK
Selected by
- REALTEK_OTTO_WDT && WATCHDOG && (MACH_REALTEK_RTL || COMPILE_TEST
vim +/clk_unprepare +855 drivers/clk/clk.c
a6adc30ba7bef8 Dong Aisheng 2016-06-30 843
4dff95dc9477a3 Stephen Boyd 2015-04-30 844 /**
4dff95dc9477a3 Stephen Boyd 2015-04-30 845 * clk_unprepare - undo preparation of a clock source
4dff95dc9477a3 Stephen Boyd 2015-04-30 846 * @clk: the clk being unprepared
4dff95dc9477a3 Stephen Boyd 2015-04-30 847 *
4dff95dc9477a3 Stephen Boyd 2015-04-30 848 * clk_unprepare may sleep, which differentiates it from clk_disable. In a
4dff95dc9477a3 Stephen Boyd 2015-04-30 849 * simple case, clk_unprepare can be used instead of clk_disable to gate a clk
4dff95dc9477a3 Stephen Boyd 2015-04-30 850 * if the operation may sleep. One example is a clk which is accessed over
4dff95dc9477a3 Stephen Boyd 2015-04-30 851 * I2c. In the complex case a clk gate operation may require a fast and a slow
4dff95dc9477a3 Stephen Boyd 2015-04-30 852 * part. It is this reason that clk_unprepare and clk_disable are not mutually
4dff95dc9477a3 Stephen Boyd 2015-04-30 853 * exclusive. In fact clk_disable must be called before clk_unprepare.
4dff95dc9477a3 Stephen Boyd 2015-04-30 854 */
4dff95dc9477a3 Stephen Boyd 2015-04-30 @855 void clk_unprepare(struct clk *clk)
b2476490ef1113 Mike Turquette 2012-03-15 856 {
4dff95dc9477a3 Stephen Boyd 2015-04-30 857 if (IS_ERR_OR_NULL(clk))
4dff95dc9477a3 Stephen Boyd 2015-04-30 858 return;
b2476490ef1113 Mike Turquette 2012-03-15 859
a6adc30ba7bef8 Dong Aisheng 2016-06-30 860 clk_core_unprepare_lock(clk->core);
1e435256d625c2 Olof Johansson 2013-04-27 861 }
4dff95dc9477a3 Stephen Boyd 2015-04-30 862 EXPORT_SYMBOL_GPL(clk_unprepare);
1e435256d625c2 Olof Johansson 2013-04-27 863
4dff95dc9477a3 Stephen Boyd 2015-04-30 864 static int clk_core_prepare(struct clk_core *core)
4dff95dc9477a3 Stephen Boyd 2015-04-30 865 {
4dff95dc9477a3 Stephen Boyd 2015-04-30 866 int ret = 0;
b2476490ef1113 Mike Turquette 2012-03-15 867
a63347251907d7 Stephen Boyd 2015-05-06 868 lockdep_assert_held(&prepare_lock);
a63347251907d7 Stephen Boyd 2015-05-06 869
4dff95dc9477a3 Stephen Boyd 2015-04-30 870 if (!core)
4dff95dc9477a3 Stephen Boyd 2015-04-30 871 return 0;
b2476490ef1113 Mike Turquette 2012-03-15 872
4dff95dc9477a3 Stephen Boyd 2015-04-30 873 if (core->prepare_count == 0) {
9a34b45397e5a3 Marek Szyprowski 2017-08-21 874 ret = clk_pm_runtime_get(core);
4dff95dc9477a3 Stephen Boyd 2015-04-30 875 if (ret)
4dff95dc9477a3 Stephen Boyd 2015-04-30 876 return ret;
b2476490ef1113 Mike Turquette 2012-03-15 877
9a34b45397e5a3 Marek Szyprowski 2017-08-21 878 ret = clk_core_prepare(core->parent);
9a34b45397e5a3 Marek Szyprowski 2017-08-21 879 if (ret)
9a34b45397e5a3 Marek Szyprowski 2017-08-21 880 goto runtime_put;
9a34b45397e5a3 Marek Szyprowski 2017-08-21 881
4dff95dc9477a3 Stephen Boyd 2015-04-30 882 trace_clk_prepare(core);
1c155b3dfe0835 Ulf Hansson 2013-03-12 883
4dff95dc9477a3 Stephen Boyd 2015-04-30 884 if (core->ops->prepare)
4dff95dc9477a3 Stephen Boyd 2015-04-30 885 ret = core->ops->prepare(core->hw);
1c155b3dfe0835 Ulf Hansson 2013-03-12 886
4dff95dc9477a3 Stephen Boyd 2015-04-30 887 trace_clk_prepare_complete(core);
b2476490ef1113 Mike Turquette 2012-03-15 888
9a34b45397e5a3 Marek Szyprowski 2017-08-21 889 if (ret)
9a34b45397e5a3 Marek Szyprowski 2017-08-21 890 goto unprepare;
b2476490ef1113 Mike Turquette 2012-03-15 891 }
b2476490ef1113 Mike Turquette 2012-03-15 892
4dff95dc9477a3 Stephen Boyd 2015-04-30 893 core->prepare_count++;
b2476490ef1113 Mike Turquette 2012-03-15 894
9461f7b33d11cb Jerome Brunet 2018-06-19 895 /*
9461f7b33d11cb Jerome Brunet 2018-06-19 896 * CLK_SET_RATE_GATE is a special case of clock protection
9461f7b33d11cb Jerome Brunet 2018-06-19 897 * Instead of a consumer claiming exclusive rate control, it is
9461f7b33d11cb Jerome Brunet 2018-06-19 898 * actually the provider which prevents any consumer from making any
9461f7b33d11cb Jerome Brunet 2018-06-19 899 * operation which could result in a rate change or rate glitch while
9461f7b33d11cb Jerome Brunet 2018-06-19 900 * the clock is prepared.
9461f7b33d11cb Jerome Brunet 2018-06-19 901 */
9461f7b33d11cb Jerome Brunet 2018-06-19 902 if (core->flags & CLK_SET_RATE_GATE)
9461f7b33d11cb Jerome Brunet 2018-06-19 903 clk_core_rate_protect(core);
9461f7b33d11cb Jerome Brunet 2018-06-19 904
4dff95dc9477a3 Stephen Boyd 2015-04-30 905 return 0;
9a34b45397e5a3 Marek Szyprowski 2017-08-21 906 unprepare:
9a34b45397e5a3 Marek Szyprowski 2017-08-21 907 clk_core_unprepare(core->parent);
9a34b45397e5a3 Marek Szyprowski 2017-08-21 908 runtime_put:
9a34b45397e5a3 Marek Szyprowski 2017-08-21 909 clk_pm_runtime_put(core);
9a34b45397e5a3 Marek Szyprowski 2017-08-21 910 return ret;
b2476490ef1113 Mike Turquette 2012-03-15 911 }
b2476490ef1113 Mike Turquette 2012-03-15 912
a6adc30ba7bef8 Dong Aisheng 2016-06-30 913 static int clk_core_prepare_lock(struct clk_core *core)
a6adc30ba7bef8 Dong Aisheng 2016-06-30 914 {
a6adc30ba7bef8 Dong Aisheng 2016-06-30 915 int ret;
a6adc30ba7bef8 Dong Aisheng 2016-06-30 916
a6adc30ba7bef8 Dong Aisheng 2016-06-30 917 clk_prepare_lock();
a6adc30ba7bef8 Dong Aisheng 2016-06-30 918 ret = clk_core_prepare(core);
a6adc30ba7bef8 Dong Aisheng 2016-06-30 919 clk_prepare_unlock();
a6adc30ba7bef8 Dong Aisheng 2016-06-30 920
a6adc30ba7bef8 Dong Aisheng 2016-06-30 921 return ret;
a6adc30ba7bef8 Dong Aisheng 2016-06-30 922 }
a6adc30ba7bef8 Dong Aisheng 2016-06-30 923
4dff95dc9477a3 Stephen Boyd 2015-04-30 924 /**
4dff95dc9477a3 Stephen Boyd 2015-04-30 925 * clk_prepare - prepare a clock source
4dff95dc9477a3 Stephen Boyd 2015-04-30 926 * @clk: the clk being prepared
4dff95dc9477a3 Stephen Boyd 2015-04-30 927 *
4dff95dc9477a3 Stephen Boyd 2015-04-30 928 * clk_prepare may sleep, which differentiates it from clk_enable. In a simple
4dff95dc9477a3 Stephen Boyd 2015-04-30 929 * case, clk_prepare can be used instead of clk_enable to ungate a clk if the
4dff95dc9477a3 Stephen Boyd 2015-04-30 930 * operation may sleep. One example is a clk which is accessed over I2c. In
4dff95dc9477a3 Stephen Boyd 2015-04-30 931 * the complex case a clk ungate operation may require a fast and a slow part.
4dff95dc9477a3 Stephen Boyd 2015-04-30 932 * It is this reason that clk_prepare and clk_enable are not mutually
4dff95dc9477a3 Stephen Boyd 2015-04-30 933 * exclusive. In fact clk_prepare must be called before clk_enable.
4dff95dc9477a3 Stephen Boyd 2015-04-30 934 * Returns 0 on success, -EERROR otherwise.
4dff95dc9477a3 Stephen Boyd 2015-04-30 935 */
4dff95dc9477a3 Stephen Boyd 2015-04-30 @936 int clk_prepare(struct clk *clk)
b2476490ef1113 Mike Turquette 2012-03-15 937 {
035a61c314eb3d Tomeu Vizoso 2015-01-23 938 if (!clk)
4dff95dc9477a3 Stephen Boyd 2015-04-30 939 return 0;
035a61c314eb3d Tomeu Vizoso 2015-01-23 940
a6adc30ba7bef8 Dong Aisheng 2016-06-30 941 return clk_core_prepare_lock(clk->core);
7ef3dcc8145263 James Hogan 2013-07-29 942 }
4dff95dc9477a3 Stephen Boyd 2015-04-30 943 EXPORT_SYMBOL_GPL(clk_prepare);
035a61c314eb3d Tomeu Vizoso 2015-01-23 944
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[peterz-queue:locking/core 41/43] kernel/locking/rwsem.c:1023:26: error: unused variable 'owner_state'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
head: 44e63f63c47dfb202eb25cdd97d04ec7e47f51d8
commit: b08614038dba3f6982e1e7701f23784bb0aedba6 [41/43] locking/rwsem: disable preemption for spinning region
config: openrisc-buildonly-randconfig-r004-20211014 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/core
git checkout b08614038dba3f6982e1e7701f23784bb0aedba6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/locking/rwsem.c: In function 'rwsem_down_write_slowpath':
kernel/locking/rwsem.c:1023:26: error: storage size of 'owner_state' isn't known
1023 | enum owner_state owner_state;
| ^~~~~~~~~~~
>> kernel/locking/rwsem.c:1023:26: error: unused variable 'owner_state' [-Werror=unused-variable]
cc1: all warnings being treated as errors
vim +/owner_state +1023 kernel/locking/rwsem.c
1012
1013 /*
1014 * Wait until we successfully acquire the write lock
1015 */
1016 static struct rw_semaphore *
1017 rwsem_down_write_slowpath(struct rw_semaphore *sem, int state)
1018 {
1019 long count;
1020 enum writer_wait_state wstate;
1021 struct rwsem_waiter waiter;
1022 struct rw_semaphore *ret = sem;
> 1023 enum owner_state owner_state;
1024 DEFINE_WAKE_Q(wake_q);
1025
1026 /* do optimistic spinning and steal lock if possible */
1027 if (rwsem_can_spin_on_owner(sem) && rwsem_optimistic_spin(sem)) {
1028 /* rwsem_optimistic_spin() implies ACQUIRE on success */
1029 return sem;
1030 }
1031
1032 /*
1033 * Optimistic spinning failed, proceed to the slowpath
1034 * and block until we can acquire the sem.
1035 */
1036 waiter.task = current;
1037 waiter.type = RWSEM_WAITING_FOR_WRITE;
1038 waiter.timeout = jiffies + RWSEM_WAIT_TIMEOUT;
1039
1040 raw_spin_lock_irq(&sem->wait_lock);
1041
1042 /* account for this before adding a new element to the list */
1043 wstate = list_empty(&sem->wait_list) ? WRITER_FIRST : WRITER_NOT_FIRST;
1044
1045 list_add_tail(&waiter.list, &sem->wait_list);
1046
1047 /* we're now waiting on the lock */
1048 if (wstate == WRITER_NOT_FIRST) {
1049 count = atomic_long_read(&sem->count);
1050
1051 /*
1052 * If there were already threads queued before us and:
1053 * 1) there are no active locks, wake the front
1054 * queued process(es) as the handoff bit might be set.
1055 * 2) there are no active writers and some readers, the lock
1056 * must be read owned; so we try to wake any read lock
1057 * waiters that were queued ahead of us.
1058 */
1059 if (count & RWSEM_WRITER_MASK)
1060 goto wait;
1061
1062 rwsem_mark_wake(sem, (count & RWSEM_READER_MASK)
1063 ? RWSEM_WAKE_READERS
1064 : RWSEM_WAKE_ANY, &wake_q);
1065
1066 if (!wake_q_empty(&wake_q)) {
1067 /*
1068 * We want to minimize wait_lock hold time especially
1069 * when a large number of readers are to be woken up.
1070 */
1071 raw_spin_unlock_irq(&sem->wait_lock);
1072 wake_up_q(&wake_q);
1073 wake_q_init(&wake_q); /* Used again, reinit */
1074 raw_spin_lock_irq(&sem->wait_lock);
1075 }
1076 } else {
1077 atomic_long_or(RWSEM_FLAG_WAITERS, &sem->count);
1078 }
1079
1080 wait:
1081 /* wait until we successfully acquire the lock */
1082 set_current_state(state);
1083 for (;;) {
1084 if (rwsem_try_write_lock(sem, wstate)) {
1085 /* rwsem_try_write_lock() implies ACQUIRE on success */
1086 break;
1087 }
1088
1089 raw_spin_unlock_irq(&sem->wait_lock);
1090
1091 /*
1092 * After setting the handoff bit and failing to acquire
1093 * the lock, attempt to spin on owner to accelerate lock
1094 * transfer. If the previous owner is a on-cpu writer and it
1095 * has just released the lock, OWNER_NULL will be returned.
1096 * In this case, we attempt to acquire the lock again
1097 * without sleeping.
1098 */
1099 if (wstate == WRITER_HANDOFF) {
1100 preempt_disable();
1101 owner_state = rwsem_spin_on_owner(sem);
1102 preempt_enable();
1103 if (owner_state == OWNER_NULL)
1104 goto trylock_again;
1105 }
1106
1107 /* Block until there are no active lockers. */
1108 for (;;) {
1109 if (signal_pending_state(state, current))
1110 goto out_nolock;
1111
1112 schedule();
1113 lockevent_inc(rwsem_sleep_writer);
1114 set_current_state(state);
1115 /*
1116 * If HANDOFF bit is set, unconditionally do
1117 * a trylock.
1118 */
1119 if (wstate == WRITER_HANDOFF)
1120 break;
1121
1122 if ((wstate == WRITER_NOT_FIRST) &&
1123 (rwsem_first_waiter(sem) == &waiter))
1124 wstate = WRITER_FIRST;
1125
1126 count = atomic_long_read(&sem->count);
1127 if (!(count & RWSEM_LOCK_MASK))
1128 break;
1129
1130 /*
1131 * The setting of the handoff bit is deferred
1132 * until rwsem_try_write_lock() is called.
1133 */
1134 if ((wstate == WRITER_FIRST) && (rt_task(current) ||
1135 time_after(jiffies, waiter.timeout))) {
1136 wstate = WRITER_HANDOFF;
1137 lockevent_inc(rwsem_wlock_handoff);
1138 break;
1139 }
1140 }
1141 trylock_again:
1142 raw_spin_lock_irq(&sem->wait_lock);
1143 }
1144 __set_current_state(TASK_RUNNING);
1145 list_del(&waiter.list);
1146 raw_spin_unlock_irq(&sem->wait_lock);
1147 lockevent_inc(rwsem_wlock);
1148
1149 return ret;
1150
1151 out_nolock:
1152 __set_current_state(TASK_RUNNING);
1153 raw_spin_lock_irq(&sem->wait_lock);
1154 list_del(&waiter.list);
1155
1156 if (unlikely(wstate == WRITER_HANDOFF))
1157 atomic_long_add(-RWSEM_FLAG_HANDOFF, &sem->count);
1158
1159 if (list_empty(&sem->wait_list))
1160 atomic_long_andnot(RWSEM_FLAG_WAITERS, &sem->count);
1161 else
1162 rwsem_mark_wake(sem, RWSEM_WAKE_ANY, &wake_q);
1163 raw_spin_unlock_irq(&sem->wait_lock);
1164 wake_up_q(&wake_q);
1165 lockevent_inc(rwsem_wlock_fail);
1166
1167 return ERR_PTR(-EINTR);
1168 }
1169
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
include/sound/sof/dai-intel.h:1:0: warning: dual license is used, are you sure you want to do this.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ec681c53f8d2d0ee362ff67f5b98dd8263c15002
commit: e149ca29f3994ca79e9e77aa2f5b2e871e9f7c99 ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only
date: 1 year, 5 months ago
While copyright holders are free to license their software any
way they see fit, the kernel community prefers GPL-2.0-only or
GPL-2.0-or-later for kernel contributions.
If you are sure you want to submit with a dual license, please
ensure that your commit message calls out the practical reasons
for which you want to do this, including the specific other
projects you expect to make use of this code.
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
dualliccheck warnings: (new ones prefixed by >>)
>> include/sound/sof/dai-intel.h:1:0: warning: dual license is used, are you sure you want to do this.
vim +1 include/sound/sof/dai-intel.h
> 1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
2 /*
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
5 *
6 * Copyright(c) 2018 Intel Corporation. All rights reserved.
7 */
8
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [Intel-gfx] [PATCH 9/9] drm/i915: Introduce lpt_pch_disable()
by kernel test robot
Hi Ville,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip next-20211015]
[cannot apply to airlied/drm-next v5.15-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-i915-Move-PCH-...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a011-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project acb3b187c4c88650a6a717a1bcb234d27d0d7f54)
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
# https://github.com/0day-ci/linux/commit/7512167c38e587a77b2ea0f87e8c68fff...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ville-Syrjala/drm-i915-Move-PCH-modeset-code-into-its-own-file/20211015-151850
git checkout 7512167c38e587a77b2ea0f87e8c68fff112804e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/display/intel_pch_display.c:437:6: error: no previous prototype for function 'lpt_disable_pch_transcoder' [-Werror,-Wmissing-prototypes]
void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv)
^
drivers/gpu/drm/i915/display/intel_pch_display.c:437:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv)
^
static
1 error generated.
vim +/lpt_disable_pch_transcoder +437 drivers/gpu/drm/i915/display/intel_pch_display.c
da423910ea902380 Ville Syrjälä 2021-10-15 436
da423910ea902380 Ville Syrjälä 2021-10-15 @437 void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv)
da423910ea902380 Ville Syrjälä 2021-10-15 438 {
da423910ea902380 Ville Syrjälä 2021-10-15 439 u32 val;
da423910ea902380 Ville Syrjälä 2021-10-15 440
da423910ea902380 Ville Syrjälä 2021-10-15 441 val = intel_de_read(dev_priv, LPT_TRANSCONF);
da423910ea902380 Ville Syrjälä 2021-10-15 442 val &= ~TRANS_ENABLE;
da423910ea902380 Ville Syrjälä 2021-10-15 443 intel_de_write(dev_priv, LPT_TRANSCONF, val);
da423910ea902380 Ville Syrjälä 2021-10-15 444 /* wait for PCH transcoder off, transcoder state */
da423910ea902380 Ville Syrjälä 2021-10-15 445 if (intel_de_wait_for_clear(dev_priv, LPT_TRANSCONF,
da423910ea902380 Ville Syrjälä 2021-10-15 446 TRANS_STATE_ENABLE, 50))
da423910ea902380 Ville Syrjälä 2021-10-15 447 drm_err(&dev_priv->drm, "Failed to disable PCH transcoder\n");
da423910ea902380 Ville Syrjälä 2021-10-15 448
da423910ea902380 Ville Syrjälä 2021-10-15 449 /* Workaround: clear timing override bit. */
da423910ea902380 Ville Syrjälä 2021-10-15 450 val = intel_de_read(dev_priv, TRANS_CHICKEN2(PIPE_A));
da423910ea902380 Ville Syrjälä 2021-10-15 451 val &= ~TRANS_CHICKEN2_TIMING_OVERRIDE;
da423910ea902380 Ville Syrjälä 2021-10-15 452 intel_de_write(dev_priv, TRANS_CHICKEN2(PIPE_A), val);
da423910ea902380 Ville Syrjälä 2021-10-15 453 }
da423910ea902380 Ville Syrjälä 2021-10-15 454
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[intel-lts:5.4/yocto 10288/18525] drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5760:5: sparse: sparse: symbol 'stmmac_all_queue_pairs_enable' was not declared. Should it be static?
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 0275e7ab8cedcdc9eea8f6f9b7ecf10e9d40ddab
commit: fabf035bcf07c8de58a4194b9440b566033892bb [10288/18525] net: stmmac: add stmmac_all_queue_pairs_enable|disable() for XDP setup
config: i386-randconfig-s002-20211014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/intel/linux-intel-lts/commit/fabf035bcf07c8de58a4194b9...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout fabf035bcf07c8de58a4194b9440b566033892bb
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/ethernet/stmicro/stmmac/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1462:6: sparse: sparse: symbol 'stmmac_alloc_rx_buffers' was not declared. Should it be static?
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2820:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] etdes4 @@ got unsigned long @@
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2820:27: sparse: expected restricted __le32 [usertype] etdes4
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2820:27: sparse: got unsigned long
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2821:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] etdes5 @@ got unsigned long @@
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2821:27: sparse: expected restricted __le32 [usertype] etdes5
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2821:27: sparse: got unsigned long
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2822:27: sparse: sparse: invalid assignment: |=
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2822:27: sparse: left side has type restricted __le32
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2822:27: sparse: right side has type unsigned long
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5760:5: sparse: sparse: symbol 'stmmac_all_queue_pairs_enable' was not declared. Should it be static?
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5814:5: sparse: sparse: symbol 'stmmac_all_queue_pairs_disable' was not declared. Should it be static?
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5837:5: sparse: sparse: symbol 'stmmac_xdp_xmit' was not declared. Should it be static?
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6552:6: sparse: sparse: symbol 'stmmac_clean_all_tx_rings' was not declared. Should it be static?
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2394:57: sparse: sparse: context imbalance in 'stmmac_tx_clean' - unexpected unlock
vim +/stmmac_all_queue_pairs_enable +5760 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
5759
> 5760 int stmmac_all_queue_pairs_enable(struct stmmac_priv *priv)
5761 {
5762 int i;
5763
5764 mutex_lock(&priv->lock);
5765
5766 if (stmmac_enabled_xdp(priv))
5767 priv->plat->normal_tx_queue_count = priv->plat->num_queue_pairs;
5768 else
5769 priv->plat->normal_tx_queue_count =
5770 priv->plat->tx_queues_to_use;
5771
5772 for (i = 0; i < priv->plat->num_queue_pairs; i++) {
5773 int err = stmmac_queue_pair_enable(priv, i);
5774
5775 if (err)
5776 return err;
5777 }
5778
5779 mutex_unlock(&priv->lock);
5780
5781 return 0;
5782 }
5783
5784 /**
5785 * stmmac_queue_pair_disable - Disables a queue pair
5786 * @priv: driver private structure
5787 * @queue_pair: queue pair
5788 *
5789 * Returns 0 on success, <0 on failure.
5790 **/
5791 int stmmac_queue_pair_disable(struct stmmac_priv *priv, u16 qid)
5792 {
5793 u16 qp_num = priv->plat->num_queue_pairs;
5794 int ret;
5795
5796 if (qid >= qp_num) {
5797 netdev_err(priv->dev,
5798 "%s: qid (%d) > number of queue pairs (%d)\n",
5799 __func__, qid, qp_num);
5800
5801 return -EINVAL;
5802 }
5803
5804 stmmac_napi_control(priv, qid, false);
5805 ret = stmmac_txrx_irq_control(priv, qid, false);
5806 if (ret)
5807 return ret;
5808 stmmac_txrx_dma_control(priv, qid, false);
5809 stmmac_txrx_desc_control(priv, qid, false);
5810
5811 return ret;
5812 }
5813
> 5814 int stmmac_all_queue_pairs_disable(struct stmmac_priv *priv)
5815 {
5816 int i;
5817
5818 mutex_lock(&priv->lock);
5819
5820 for (i = 0; i < priv->plat->num_queue_pairs; i++) {
5821 int err = stmmac_queue_pair_disable(priv, i);
5822
5823 if (err)
5824 return err;
5825 }
5826
5827 mutex_unlock(&priv->lock);
5828
5829 return 0;
5830 }
5831
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week