[linux-next:master 2466/4685] drivers/gpu/drm/i915/intel_uncore.c:2009 __intel_wait_for_register_fw() error: uninitialized symbol 'reg_value'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Kees Cook <keescook(a)chromium.org>
CC: Chao Yu <yuchao0(a)huawei.com>, Chao Yu <chao(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aab2003999e78bbf2058dae1e661c44ede1d9766
commit: 80b89ab785a48bc06be50dd9cf859175318ff99a [2466/4685] treewide: Remove uninitialized_var() usage
:::::: branch date: 26 hours ago
:::::: commit date: 9 days ago
config: i386-randconfig-m021-20200701 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/gpu/drm/i915/intel_uncore.c:2009 __intel_wait_for_register_fw() error: uninitialized symbol 'reg_value'.
drivers/gpu/drm/i915/gt/intel_lrc.c:1134 __unwind_incomplete_requests() error: uninitialized symbol 'pl'.
Old smatch warnings:
drivers/gpu/drm/i915/gt/intel_lrc.c:5630 intel_execlists_create_virtual() warn: assigning (-2) to unsigned variable 've->base.instance'
drivers/gpu/drm/i915/gt/intel_lrc.c:5631 intel_execlists_create_virtual() warn: assigning (-2) to unsigned variable 've->base.uabi_instance'
drivers/gpu/drm/i915/gem/i915_gem_context.h:205 i915_gem_context_get_engine() warn: inconsistent indenting
drivers/gpu/drm/i915/gem/i915_gem_context.h:207 i915_gem_context_get_engine() warn: inconsistent indenting
drivers/gpu/drm/i915/gt/selftest_lrc.c:2741 live_preempt_gang() warn: impossible condition '(prio > (((~0 >> 1)) >> 0)) => (s32min-s32max > s32max)'
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 80b89ab785a48bc06be50dd9cf859175318ff99a
vim +/reg_value +2009 drivers/gpu/drm/i915/intel_uncore.c
907b28c56ea4062 Chris Wilson 2013-07-19 1959
1758b90e38f53b9 Chris Wilson 2016-06-30 1960 /**
1d1a9774e404141 Michal Wajdeczko 2017-04-07 1961 * __intel_wait_for_register_fw - wait until register matches expected state
d2d551c06f81775 Daniele Ceraolo Spurio 2019-03-25 1962 * @uncore: the struct intel_uncore
1758b90e38f53b9 Chris Wilson 2016-06-30 1963 * @reg: the register to read
1758b90e38f53b9 Chris Wilson 2016-06-30 1964 * @mask: mask to apply to register value
1758b90e38f53b9 Chris Wilson 2016-06-30 1965 * @value: expected value
1d1a9774e404141 Michal Wajdeczko 2017-04-07 1966 * @fast_timeout_us: fast timeout in microsecond for atomic/tight wait
1d1a9774e404141 Michal Wajdeczko 2017-04-07 1967 * @slow_timeout_ms: slow timeout in millisecond
1d1a9774e404141 Michal Wajdeczko 2017-04-07 1968 * @out_value: optional placeholder to hold registry value
1758b90e38f53b9 Chris Wilson 2016-06-30 1969 *
1758b90e38f53b9 Chris Wilson 2016-06-30 1970 * This routine waits until the target register @reg contains the expected
3d466cd67e85fe1 Daniel Vetter 2016-07-15 1971 * @value after applying the @mask, i.e. it waits until ::
3d466cd67e85fe1 Daniel Vetter 2016-07-15 1972 *
3d466cd67e85fe1 Daniel Vetter 2016-07-15 1973 * (I915_READ_FW(reg) & mask) == value
3d466cd67e85fe1 Daniel Vetter 2016-07-15 1974 *
1d1a9774e404141 Michal Wajdeczko 2017-04-07 1975 * Otherwise, the wait will timeout after @slow_timeout_ms milliseconds.
6976e74b5fa1243 Michal Wajdeczko 2017-04-10 1976 * For atomic context @slow_timeout_ms must be zero and @fast_timeout_us
84d84cb7e20d3d2 Chris Wilson 2017-04-11 1977 * must be not larger than 20,0000 microseconds.
1758b90e38f53b9 Chris Wilson 2016-06-30 1978 *
1758b90e38f53b9 Chris Wilson 2016-06-30 1979 * Note that this routine assumes the caller holds forcewake asserted, it is
1758b90e38f53b9 Chris Wilson 2016-06-30 1980 * not suitable for very long waits. See intel_wait_for_register() if you
1758b90e38f53b9 Chris Wilson 2016-06-30 1981 * wish to wait without holding forcewake for the duration (i.e. you expect
1758b90e38f53b9 Chris Wilson 2016-06-30 1982 * the wait to be slow).
1758b90e38f53b9 Chris Wilson 2016-06-30 1983 *
e4661f144497f58 Michal Wajdeczko 2019-08-02 1984 * Return: 0 if the register matches the desired condition, or -ETIMEDOUT.
1758b90e38f53b9 Chris Wilson 2016-06-30 1985 */
d2d551c06f81775 Daniele Ceraolo Spurio 2019-03-25 1986 int __intel_wait_for_register_fw(struct intel_uncore *uncore,
1758b90e38f53b9 Chris Wilson 2016-06-30 1987 i915_reg_t reg,
3fc7d86b3268af9 Michal Wajdeczko 2017-04-10 1988 u32 mask,
3fc7d86b3268af9 Michal Wajdeczko 2017-04-10 1989 u32 value,
3fc7d86b3268af9 Michal Wajdeczko 2017-04-10 1990 unsigned int fast_timeout_us,
3fc7d86b3268af9 Michal Wajdeczko 2017-04-10 1991 unsigned int slow_timeout_ms,
1d1a9774e404141 Michal Wajdeczko 2017-04-07 1992 u32 *out_value)
1758b90e38f53b9 Chris Wilson 2016-06-30 1993 {
80b89ab785a48bc Kees Cook 2020-06-03 1994 u32 reg_value;
d2d551c06f81775 Daniele Ceraolo Spurio 2019-03-25 1995 #define done (((reg_value = intel_uncore_read_fw(uncore, reg)) & mask) == value)
1d1a9774e404141 Michal Wajdeczko 2017-04-07 1996 int ret;
1d1a9774e404141 Michal Wajdeczko 2017-04-07 1997
6976e74b5fa1243 Michal Wajdeczko 2017-04-10 1998 /* Catch any overuse of this function */
84d84cb7e20d3d2 Chris Wilson 2017-04-11 1999 might_sleep_if(slow_timeout_ms);
84d84cb7e20d3d2 Chris Wilson 2017-04-11 2000 GEM_BUG_ON(fast_timeout_us > 20000);
6976e74b5fa1243 Michal Wajdeczko 2017-04-10 2001
84d84cb7e20d3d2 Chris Wilson 2017-04-11 2002 ret = -ETIMEDOUT;
84d84cb7e20d3d2 Chris Wilson 2017-04-11 2003 if (fast_timeout_us && fast_timeout_us <= 20000)
1d1a9774e404141 Michal Wajdeczko 2017-04-07 2004 ret = _wait_for_atomic(done, fast_timeout_us, 0);
ff26ffa8ee267dc Daniel Vetter 2017-05-10 2005 if (ret && slow_timeout_ms)
1d1a9774e404141 Michal Wajdeczko 2017-04-07 2006 ret = wait_for(done, slow_timeout_ms);
84d84cb7e20d3d2 Chris Wilson 2017-04-11 2007
1d1a9774e404141 Michal Wajdeczko 2017-04-07 2008 if (out_value)
1d1a9774e404141 Michal Wajdeczko 2017-04-07 @2009 *out_value = reg_value;
84d84cb7e20d3d2 Chris Wilson 2017-04-11 2010
1758b90e38f53b9 Chris Wilson 2016-06-30 2011 return ret;
1758b90e38f53b9 Chris Wilson 2016-06-30 2012 #undef done
1758b90e38f53b9 Chris Wilson 2016-06-30 2013 }
1758b90e38f53b9 Chris Wilson 2016-06-30 2014
:::::: The code at line 2009 was first introduced by commit
:::::: 1d1a9774e40414148ecebbdb713746bfb6f9a561 drm/i915: Extend intel_wait_for_register_fw() with fast timeout
:::::: TO: Michal Wajdeczko <michal.wajdeczko(a)intel.com>
:::::: CC: Chris Wilson <chris(a)chris-wilson.co.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v15 3/3] Input: new da7280 haptic driver
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <c7b8cb993abe7bb771108bb94e5d9edbeb4f7103.1593435662.git.Roy.Im(a)diasemi.com>
References: <c7b8cb993abe7bb771108bb94e5d9edbeb4f7103.1593435662.git.Roy.Im(a)diasemi.com>
TO: Roy Im <roy.im.opensource(a)diasemi.com>
TO: "Uwe Kleine-Koenig" <u.kleine-koenig(a)pengutronix.de>
TO: Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
TO: Brian Masney <masneyb(a)onstation.org>
TO: Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
TO: Greg KH <greg(a)kroah.com>
TO: Lee Jones <lee.jones(a)linaro.org>
TO: Luca Weiss <luca(a)z3ntu.xyz>
TO: Maximilian Luz <luzmaximilian(a)gmail.com>
TO: "Pascal PAILLET-LME" <p.paillet(a)st.com>
TO: Rob Herring <robh(a)kernel.org>
Hi Roy,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on sparc-next/master]
[also build test WARNING on linus/master v5.8-rc3 next-20200701]
[cannot apply to input/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Roy-Im/da7280-haptic-driver-subm...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next.git master
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
# https://github.com/0day-ci/linux/commit/9e38d67bfa309d25bd6b4e415782db070...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 9e38d67bfa309d25bd6b4e415782db070db80d7f
vim +1295 drivers/input/misc/da7280.c
9e38d67bfa309d Roy Im 2020-06-29 1278
9e38d67bfa309d Roy Im 2020-06-29 1279 static ssize_t ps_seq_id_show(struct device *dev,
9e38d67bfa309d Roy Im 2020-06-29 1280 struct device_attribute *attr,
9e38d67bfa309d Roy Im 2020-06-29 1281 char *buf)
9e38d67bfa309d Roy Im 2020-06-29 1282 {
9e38d67bfa309d Roy Im 2020-06-29 1283 struct da7280_haptic *haptics = dev_get_drvdata(dev);
9e38d67bfa309d Roy Im 2020-06-29 1284 unsigned int val;
9e38d67bfa309d Roy Im 2020-06-29 1285 int error;
9e38d67bfa309d Roy Im 2020-06-29 1286
9e38d67bfa309d Roy Im 2020-06-29 1287 error = regmap_read(haptics->regmap, DA7280_SEQ_CTL2, &val);
9e38d67bfa309d Roy Im 2020-06-29 1288 if (error) {
9e38d67bfa309d Roy Im 2020-06-29 1289 dev_err(haptics->dev,
9e38d67bfa309d Roy Im 2020-06-29 1290 "failed to read register: %pE\n", ERR_PTR(error));
9e38d67bfa309d Roy Im 2020-06-29 1291 return error;
9e38d67bfa309d Roy Im 2020-06-29 1292 }
9e38d67bfa309d Roy Im 2020-06-29 1293 val = FIELD_GET(DA7280_PS_SEQ_ID_MASK, val);
9e38d67bfa309d Roy Im 2020-06-29 1294
9e38d67bfa309d Roy Im 2020-06-29 @1295 return sprintf(buf, "ps_seq_id is %d\n", val);
9e38d67bfa309d Roy Im 2020-06-29 1296 }
9e38d67bfa309d Roy Im 2020-06-29 1297
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[android-goldfish:android-3.18 9371/9999] drivers/net/ethernet/intel/i40e/i40e_main.c:1097:17: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Lee Jones <lee.jones(a)linaro.org>
tree: https://android.googlesource.com/kernel/goldfish android-3.18
head: 3ed25d092507b3be51b5adfcda11b259407cf4ef
commit: 05560caa2c0d8a1cdf02080cf0779f0ecf6a2a80 [9371/9999] i40e: Workaround fix for mss < 256 issue
:::::: branch date: 32 hours ago
:::::: commit date: 8 weeks ago
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
^
drivers/net/ethernet/intel/i40e/i40e_main.c:6516:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = i40e_set_num_rings_in_vsi(vsi);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:7826:6: warning: Variable 'ret' is reassigned a value before the old one has been used. 'break;' missing? [redundantAssignInSwitch]
ret = i40e_vsi_get_bw_info(vsi);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:7641:0: note: Variable 'ret' is reassigned a value before the old one has been used. 'break;' missing?
int ret = -ENODEV;
^
drivers/net/ethernet/intel/i40e/i40e_main.c:7826:6: note: Variable 'ret' is reassigned a value before the old one has been used. 'break;' missing?
ret = i40e_vsi_get_bw_info(vsi);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:7826:6: warning: Variable 'ret' is reassigned a value before the old one has been used. 'break;' missing? [redundantAssignInSwitch]
ret = i40e_vsi_get_bw_info(vsi);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:7705:9: note: Variable 'ret' is reassigned a value before the old one has been used. 'break;' missing?
ret = -ENOENT;
^
drivers/net/ethernet/intel/i40e/i40e_main.c:7826:6: note: Variable 'ret' is reassigned a value before the old one has been used. 'break;' missing?
ret = i40e_vsi_get_bw_info(vsi);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:7951:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = i40e_vsi_alloc_q_vectors(vsi);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:7936:0: note: Variable 'ret' is reassigned a value before the old one has been used.
int ret = -ENOENT;
^
drivers/net/ethernet/intel/i40e/i40e_main.c:7951:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = i40e_vsi_alloc_q_vectors(vsi);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:8293:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = i;
^
drivers/net/ethernet/intel/i40e/i40e_main.c:8262:0: note: Variable 'ret' is reassigned a value before the old one has been used.
int ret = -ENOENT;
^
drivers/net/ethernet/intel/i40e/i40e_main.c:8293:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = i;
^
>> drivers/net/ethernet/intel/i40e/i40e_main.c:1097:17: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
(val & I40E_PRTPM_EEE_STAT_TX_LPI_STATUS_MASK) >>
^
drivers/net/ethernet/intel/i40e/i40e_main.c:2823:2: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
wr32(hw, I40E_PFINT_DYN_CTL0, I40E_PFINT_DYN_CTL0_SW_ITR_INDX_MASK |
^
drivers/net/ethernet/intel/i40e/i40e_main.c:3104:14: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
(icr0 & I40E_PFINT_ICR0_SWINT_MASK))
^
drivers/net/ethernet/intel/i40e/i40e_main.c:3672:7: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
I40E_QINT_RQCTL_INTEVENT_MASK);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:3687:7: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
I40E_QINT_TQCTL_INTEVENT_MASK);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:3710:5: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
I40E_QINT_RQCTL_INTEVENT_MASK);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:3722:5: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
I40E_QINT_TQCTL_INTEVENT_MASK);
^
drivers/net/ethernet/intel/i40e/i40e_main.c:6180:12: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
if (reg & I40E_GL_MDET_TX_VALID_MASK) {
^
drivers/net/ethernet/intel/i40e/i40e_main.c:6196:12: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
if (reg & I40E_GL_MDET_RX_VALID_MASK) {
^
>> drivers/net/ethernet/intel/i40e/i40e_main.c:6297:29: warning: Same expression in both branches of ternary operator. [duplicateExpressionTernary]
ntohs(port), port ? i : i);
^
>> drivers/net/ethernet/intel/i40e/i40e_main.c:9229:7: warning: Local variable val shadows outer variable [shadowVar]
u32 val;
^
drivers/net/ethernet/intel/i40e/i40e_main.c:8958:6: note: Shadowed declaration
u32 val;
^
drivers/net/ethernet/intel/i40e/i40e_main.c:9229:7: note: Shadow variable
u32 val;
^
git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
git remote update android-goldfish
git checkout 05560caa2c0d8a1cdf02080cf0779f0ecf6a2a80
vim +1097 drivers/net/ethernet/intel/i40e/i40e_main.c
7812fddc9cfbbdb Shannon Nelson 2014-04-23 897
7812fddc9cfbbdb Shannon Nelson 2014-04-23 898 /**
7812fddc9cfbbdb Shannon Nelson 2014-04-23 899 * i40e_update_pf_stats - Update the pf statistics counters.
7812fddc9cfbbdb Shannon Nelson 2014-04-23 900 * @pf: the PF to be updated
7812fddc9cfbbdb Shannon Nelson 2014-04-23 901 **/
7812fddc9cfbbdb Shannon Nelson 2014-04-23 902 static void i40e_update_pf_stats(struct i40e_pf *pf)
7812fddc9cfbbdb Shannon Nelson 2014-04-23 903 {
41c445ff0f482bb Jesse Brandeburg 2013-09-11 904 struct i40e_hw_port_stats *osd = &pf->stats_offsets;
7812fddc9cfbbdb Shannon Nelson 2014-04-23 905 struct i40e_hw_port_stats *nsd = &pf->stats;
7812fddc9cfbbdb Shannon Nelson 2014-04-23 906 struct i40e_hw *hw = &pf->hw;
7812fddc9cfbbdb Shannon Nelson 2014-04-23 907 u32 val;
7812fddc9cfbbdb Shannon Nelson 2014-04-23 908 int i;
41c445ff0f482bb Jesse Brandeburg 2013-09-11 909
41c445ff0f482bb Jesse Brandeburg 2013-09-11 910 i40e_stat_update48(hw, I40E_GLPRT_GORCH(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 911 I40E_GLPRT_GORCL(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 912 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 913 &osd->eth.rx_bytes, &nsd->eth.rx_bytes);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 914 i40e_stat_update48(hw, I40E_GLPRT_GOTCH(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 915 I40E_GLPRT_GOTCL(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 916 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 917 &osd->eth.tx_bytes, &nsd->eth.tx_bytes);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 918 i40e_stat_update32(hw, I40E_GLPRT_RDPC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 919 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 920 &osd->eth.rx_discards,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 921 &nsd->eth.rx_discards);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 922 i40e_stat_update32(hw, I40E_GLPRT_TDPC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 923 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 924 &osd->eth.tx_discards,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 925 &nsd->eth.tx_discards);
532d283d590d6c0 Shannon Nelson 2014-04-23 926
532d283d590d6c0 Shannon Nelson 2014-04-23 927 i40e_stat_update48(hw, I40E_GLPRT_UPRCH(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 928 I40E_GLPRT_UPRCL(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 929 pf->stat_offsets_loaded,
532d283d590d6c0 Shannon Nelson 2014-04-23 930 &osd->eth.rx_unicast,
532d283d590d6c0 Shannon Nelson 2014-04-23 931 &nsd->eth.rx_unicast);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 932 i40e_stat_update48(hw, I40E_GLPRT_MPRCH(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 933 I40E_GLPRT_MPRCL(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 934 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 935 &osd->eth.rx_multicast,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 936 &nsd->eth.rx_multicast);
532d283d590d6c0 Shannon Nelson 2014-04-23 937 i40e_stat_update48(hw, I40E_GLPRT_BPRCH(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 938 I40E_GLPRT_BPRCL(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 939 pf->stat_offsets_loaded,
532d283d590d6c0 Shannon Nelson 2014-04-23 940 &osd->eth.rx_broadcast,
532d283d590d6c0 Shannon Nelson 2014-04-23 941 &nsd->eth.rx_broadcast);
532d283d590d6c0 Shannon Nelson 2014-04-23 942 i40e_stat_update48(hw, I40E_GLPRT_UPTCH(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 943 I40E_GLPRT_UPTCL(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 944 pf->stat_offsets_loaded,
532d283d590d6c0 Shannon Nelson 2014-04-23 945 &osd->eth.tx_unicast,
532d283d590d6c0 Shannon Nelson 2014-04-23 946 &nsd->eth.tx_unicast);
532d283d590d6c0 Shannon Nelson 2014-04-23 947 i40e_stat_update48(hw, I40E_GLPRT_MPTCH(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 948 I40E_GLPRT_MPTCL(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 949 pf->stat_offsets_loaded,
532d283d590d6c0 Shannon Nelson 2014-04-23 950 &osd->eth.tx_multicast,
532d283d590d6c0 Shannon Nelson 2014-04-23 951 &nsd->eth.tx_multicast);
532d283d590d6c0 Shannon Nelson 2014-04-23 952 i40e_stat_update48(hw, I40E_GLPRT_BPTCH(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 953 I40E_GLPRT_BPTCL(hw->port),
532d283d590d6c0 Shannon Nelson 2014-04-23 954 pf->stat_offsets_loaded,
532d283d590d6c0 Shannon Nelson 2014-04-23 955 &osd->eth.tx_broadcast,
532d283d590d6c0 Shannon Nelson 2014-04-23 956 &nsd->eth.tx_broadcast);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 957
41c445ff0f482bb Jesse Brandeburg 2013-09-11 958 i40e_stat_update32(hw, I40E_GLPRT_TDOLD(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 959 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 960 &osd->tx_dropped_link_down,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 961 &nsd->tx_dropped_link_down);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 962
41c445ff0f482bb Jesse Brandeburg 2013-09-11 963 i40e_stat_update32(hw, I40E_GLPRT_CRCERRS(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 964 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 965 &osd->crc_errors, &nsd->crc_errors);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 966
41c445ff0f482bb Jesse Brandeburg 2013-09-11 967 i40e_stat_update32(hw, I40E_GLPRT_ILLERRC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 968 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 969 &osd->illegal_bytes, &nsd->illegal_bytes);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 970
41c445ff0f482bb Jesse Brandeburg 2013-09-11 971 i40e_stat_update32(hw, I40E_GLPRT_MLFC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 972 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 973 &osd->mac_local_faults,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 974 &nsd->mac_local_faults);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 975 i40e_stat_update32(hw, I40E_GLPRT_MRFC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 976 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 977 &osd->mac_remote_faults,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 978 &nsd->mac_remote_faults);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 979
41c445ff0f482bb Jesse Brandeburg 2013-09-11 980 i40e_stat_update32(hw, I40E_GLPRT_RLEC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 981 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 982 &osd->rx_length_errors,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 983 &nsd->rx_length_errors);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 984
41c445ff0f482bb Jesse Brandeburg 2013-09-11 985 i40e_stat_update32(hw, I40E_GLPRT_LXONRXC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 986 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 987 &osd->link_xon_rx, &nsd->link_xon_rx);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 988 i40e_stat_update32(hw, I40E_GLPRT_LXONTXC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 989 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 990 &osd->link_xon_tx, &nsd->link_xon_tx);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 991 i40e_update_prio_xoff_rx(pf); /* handles I40E_GLPRT_LXOFFRXC */
41c445ff0f482bb Jesse Brandeburg 2013-09-11 992 i40e_stat_update32(hw, I40E_GLPRT_LXOFFTXC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 993 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 994 &osd->link_xoff_tx, &nsd->link_xoff_tx);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 995
41c445ff0f482bb Jesse Brandeburg 2013-09-11 996 for (i = 0; i < 8; i++) {
41c445ff0f482bb Jesse Brandeburg 2013-09-11 997 i40e_stat_update32(hw, I40E_GLPRT_PXONRXC(hw->port, i),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 998 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 999 &osd->priority_xon_rx[i],
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1000 &nsd->priority_xon_rx[i]);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1001 i40e_stat_update32(hw, I40E_GLPRT_PXONTXC(hw->port, i),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1002 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1003 &osd->priority_xon_tx[i],
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1004 &nsd->priority_xon_tx[i]);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1005 i40e_stat_update32(hw, I40E_GLPRT_PXOFFTXC(hw->port, i),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1006 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1007 &osd->priority_xoff_tx[i],
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1008 &nsd->priority_xoff_tx[i]);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1009 i40e_stat_update32(hw,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1010 I40E_GLPRT_RXON2OFFCNT(hw->port, i),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1011 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1012 &osd->priority_xon_2_xoff[i],
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1013 &nsd->priority_xon_2_xoff[i]);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1014 }
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1015
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1016 i40e_stat_update48(hw, I40E_GLPRT_PRC64H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1017 I40E_GLPRT_PRC64L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1018 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1019 &osd->rx_size_64, &nsd->rx_size_64);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1020 i40e_stat_update48(hw, I40E_GLPRT_PRC127H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1021 I40E_GLPRT_PRC127L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1022 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1023 &osd->rx_size_127, &nsd->rx_size_127);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1024 i40e_stat_update48(hw, I40E_GLPRT_PRC255H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1025 I40E_GLPRT_PRC255L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1026 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1027 &osd->rx_size_255, &nsd->rx_size_255);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1028 i40e_stat_update48(hw, I40E_GLPRT_PRC511H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1029 I40E_GLPRT_PRC511L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1030 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1031 &osd->rx_size_511, &nsd->rx_size_511);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1032 i40e_stat_update48(hw, I40E_GLPRT_PRC1023H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1033 I40E_GLPRT_PRC1023L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1034 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1035 &osd->rx_size_1023, &nsd->rx_size_1023);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1036 i40e_stat_update48(hw, I40E_GLPRT_PRC1522H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1037 I40E_GLPRT_PRC1522L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1038 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1039 &osd->rx_size_1522, &nsd->rx_size_1522);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1040 i40e_stat_update48(hw, I40E_GLPRT_PRC9522H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1041 I40E_GLPRT_PRC9522L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1042 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1043 &osd->rx_size_big, &nsd->rx_size_big);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1044
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1045 i40e_stat_update48(hw, I40E_GLPRT_PTC64H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1046 I40E_GLPRT_PTC64L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1047 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1048 &osd->tx_size_64, &nsd->tx_size_64);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1049 i40e_stat_update48(hw, I40E_GLPRT_PTC127H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1050 I40E_GLPRT_PTC127L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1051 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1052 &osd->tx_size_127, &nsd->tx_size_127);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1053 i40e_stat_update48(hw, I40E_GLPRT_PTC255H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1054 I40E_GLPRT_PTC255L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1055 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1056 &osd->tx_size_255, &nsd->tx_size_255);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1057 i40e_stat_update48(hw, I40E_GLPRT_PTC511H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1058 I40E_GLPRT_PTC511L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1059 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1060 &osd->tx_size_511, &nsd->tx_size_511);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1061 i40e_stat_update48(hw, I40E_GLPRT_PTC1023H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1062 I40E_GLPRT_PTC1023L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1063 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1064 &osd->tx_size_1023, &nsd->tx_size_1023);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1065 i40e_stat_update48(hw, I40E_GLPRT_PTC1522H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1066 I40E_GLPRT_PTC1522L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1067 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1068 &osd->tx_size_1522, &nsd->tx_size_1522);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1069 i40e_stat_update48(hw, I40E_GLPRT_PTC9522H(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1070 I40E_GLPRT_PTC9522L(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1071 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1072 &osd->tx_size_big, &nsd->tx_size_big);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1073
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1074 i40e_stat_update32(hw, I40E_GLPRT_RUC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1075 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1076 &osd->rx_undersize, &nsd->rx_undersize);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1077 i40e_stat_update32(hw, I40E_GLPRT_RFC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1078 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1079 &osd->rx_fragments, &nsd->rx_fragments);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1080 i40e_stat_update32(hw, I40E_GLPRT_ROC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1081 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1082 &osd->rx_oversize, &nsd->rx_oversize);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1083 i40e_stat_update32(hw, I40E_GLPRT_RJC(hw->port),
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1084 pf->stat_offsets_loaded,
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1085 &osd->rx_jabber, &nsd->rx_jabber);
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1086
433c47de1368cf0 Anjali Singhai Jain 2014-05-22 1087 /* FDIR stats */
433c47de1368cf0 Anjali Singhai Jain 2014-05-22 1088 i40e_stat_update32(hw, I40E_GLQF_PCNT(pf->fd_atr_cnt_idx),
433c47de1368cf0 Anjali Singhai Jain 2014-05-22 1089 pf->stat_offsets_loaded,
433c47de1368cf0 Anjali Singhai Jain 2014-05-22 1090 &osd->fd_atr_match, &nsd->fd_atr_match);
433c47de1368cf0 Anjali Singhai Jain 2014-05-22 1091 i40e_stat_update32(hw, I40E_GLQF_PCNT(pf->fd_sb_cnt_idx),
433c47de1368cf0 Anjali Singhai Jain 2014-05-22 1092 pf->stat_offsets_loaded,
433c47de1368cf0 Anjali Singhai Jain 2014-05-22 1093 &osd->fd_sb_match, &nsd->fd_sb_match);
433c47de1368cf0 Anjali Singhai Jain 2014-05-22 1094
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1095 val = rd32(hw, I40E_PRTPM_EEE_STAT);
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1096 nsd->tx_lpi_status =
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 @1097 (val & I40E_PRTPM_EEE_STAT_TX_LPI_STATUS_MASK) >>
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1098 I40E_PRTPM_EEE_STAT_TX_LPI_STATUS_SHIFT;
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1099 nsd->rx_lpi_status =
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1100 (val & I40E_PRTPM_EEE_STAT_RX_LPI_STATUS_MASK) >>
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1101 I40E_PRTPM_EEE_STAT_RX_LPI_STATUS_SHIFT;
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1102 i40e_stat_update32(hw, I40E_PRTPM_TLPIC,
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1103 pf->stat_offsets_loaded,
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1104 &osd->tx_lpi_count, &nsd->tx_lpi_count);
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1105 i40e_stat_update32(hw, I40E_PRTPM_RLPIC,
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1106 pf->stat_offsets_loaded,
bee5af7e21939c5 Anjali Singhai Jain 2014-03-06 1107 &osd->rx_lpi_count, &nsd->rx_lpi_count);
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1108
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1109 pf->stat_offsets_loaded = true;
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1110 }
41c445ff0f482bb Jesse Brandeburg 2013-09-11 1111
:::::: The code at line 1097 was first introduced by commit
:::::: bee5af7e21939c54538b8d1555b4c568e9fbd235 i40e/i40evf: Add EEE LPI stats
:::::: TO: Anjali Singhai Jain <anjali.singhai(a)intel.com>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v2] ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <1593596211-28344-1-git-send-email-brent.lu(a)intel.com>
References: <1593596211-28344-1-git-send-email-brent.lu(a)intel.com>
TO: Brent Lu <brent.lu(a)intel.com>
TO: alsa-devel(a)alsa-project.org
CC: Cezary Rojewski <cezary.rojewski(a)intel.com>
CC: "Pierre-Louis Bossart" <pierre-louis.bossart(a)linux.intel.com>
CC: Liam Girdwood <liam.r.girdwood(a)linux.intel.com>
CC: Jie Yang <yang.jie(a)linux.intel.com>
CC: Mark Brown <broonie(a)kernel.org>
CC: Jaroslav Kysela <perex(a)perex.cz>
CC: Takashi Iwai <tiwai(a)suse.com>
CC: Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
CC: Guennadi Liakhovetski <guennadi.liakhovetski(a)linux.intel.com>
Hi Brent,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on sound/for-next v5.8-rc3 next-20200701]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Brent-Lu/ASoC-Intel-bxt-da7219-m...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
config: i386-randconfig-m021-20200701 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
sound/soc/intel/boards/bxt_da7219_max98357a.c:683 bxt_card_late_probe() error: uninitialized symbol 'widgets'.
sound/soc/intel/boards/bxt_da7219_max98357a.c:683 bxt_card_late_probe() error: uninitialized symbol 'num_widgets'.
sound/soc/intel/boards/bxt_da7219_max98357a.c:689 bxt_card_late_probe() error: uninitialized symbol 'controls'.
sound/soc/intel/boards/bxt_da7219_max98357a.c:689 bxt_card_late_probe() error: uninitialized symbol 'num_controls'.
sound/soc/intel/boards/bxt_da7219_max98357a.c:695 bxt_card_late_probe() error: uninitialized symbol 'routes'.
sound/soc/intel/boards/bxt_da7219_max98357a.c:695 bxt_card_late_probe() error: uninitialized symbol 'num_routes'.
# https://github.com/0day-ci/linux/commit/27dccaf17142fa2cfe38b279782b1d72a...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 27dccaf17142fa2cfe38b279782b1d72aa6dd041
vim +/widgets +683 sound/soc/intel/boards/bxt_da7219_max98357a.c
27dccaf17142fa Brent Lu 2020-07-01 648
625de2bf2ed163 Jeeja KP 2017-02-07 649 #define NAME_SIZE 32
ba210346779464 Jeeja KP 2017-01-24 650 static int bxt_card_late_probe(struct snd_soc_card *card)
ba210346779464 Jeeja KP 2017-01-24 651 {
ba210346779464 Jeeja KP 2017-01-24 652 struct bxt_card_private *ctx = snd_soc_card_get_drvdata(card);
ba210346779464 Jeeja KP 2017-01-24 653 struct bxt_hdmi_pcm *pcm;
4510112217116d Kuninori Morimoto 2018-01-29 654 struct snd_soc_component *component = NULL;
27dccaf17142fa Brent Lu 2020-07-01 655 const struct snd_kcontrol_new *controls;
27dccaf17142fa Brent Lu 2020-07-01 656 const struct snd_soc_dapm_widget *widgets;
27dccaf17142fa Brent Lu 2020-07-01 657 const struct snd_soc_dapm_route *routes;
27dccaf17142fa Brent Lu 2020-07-01 658 int num_controls, num_widgets, num_routes, err, i = 0;
625de2bf2ed163 Jeeja KP 2017-02-07 659 char jack_name[NAME_SIZE];
ba210346779464 Jeeja KP 2017-01-24 660
27dccaf17142fa Brent Lu 2020-07-01 661 switch (ctx->spkamp) {
27dccaf17142fa Brent Lu 2020-07-01 662 case SPKAMP_MAX98357A:
27dccaf17142fa Brent Lu 2020-07-01 663 controls = max98357a_controls;
27dccaf17142fa Brent Lu 2020-07-01 664 num_controls = ARRAY_SIZE(max98357a_controls);
27dccaf17142fa Brent Lu 2020-07-01 665 widgets = max98357a_widgets;
27dccaf17142fa Brent Lu 2020-07-01 666 num_widgets = ARRAY_SIZE(max98357a_widgets);
27dccaf17142fa Brent Lu 2020-07-01 667 routes = max98357a_routes;
27dccaf17142fa Brent Lu 2020-07-01 668 num_routes = ARRAY_SIZE(max98357a_routes);
27dccaf17142fa Brent Lu 2020-07-01 669 break;
27dccaf17142fa Brent Lu 2020-07-01 670 case SPKAMP_MAX98390:
27dccaf17142fa Brent Lu 2020-07-01 671 controls = max98390_controls;
27dccaf17142fa Brent Lu 2020-07-01 672 num_controls = ARRAY_SIZE(max98390_controls);
27dccaf17142fa Brent Lu 2020-07-01 673 widgets = max98390_widgets;
27dccaf17142fa Brent Lu 2020-07-01 674 num_widgets = ARRAY_SIZE(max98390_widgets);
27dccaf17142fa Brent Lu 2020-07-01 675 routes = max98390_routes;
27dccaf17142fa Brent Lu 2020-07-01 676 num_routes = ARRAY_SIZE(max98390_routes);
27dccaf17142fa Brent Lu 2020-07-01 677 break;
27dccaf17142fa Brent Lu 2020-07-01 678 default:
27dccaf17142fa Brent Lu 2020-07-01 679 dev_err(card->dev, "Invalid speaker amplifier %d\n", ctx->spkamp);
27dccaf17142fa Brent Lu 2020-07-01 680 break;
27dccaf17142fa Brent Lu 2020-07-01 681 }
27dccaf17142fa Brent Lu 2020-07-01 682
27dccaf17142fa Brent Lu 2020-07-01 @683 err = snd_soc_dapm_new_controls(&card->dapm, widgets, num_widgets);
27dccaf17142fa Brent Lu 2020-07-01 684 if (err) {
27dccaf17142fa Brent Lu 2020-07-01 685 dev_err(card->dev, "Fail to new widgets\n");
27dccaf17142fa Brent Lu 2020-07-01 686 return err;
27dccaf17142fa Brent Lu 2020-07-01 687 }
27dccaf17142fa Brent Lu 2020-07-01 688
27dccaf17142fa Brent Lu 2020-07-01 @689 err = snd_soc_add_card_controls(card, controls, num_controls);
27dccaf17142fa Brent Lu 2020-07-01 690 if (err) {
27dccaf17142fa Brent Lu 2020-07-01 691 dev_err(card->dev, "Fail to add controls\n");
27dccaf17142fa Brent Lu 2020-07-01 692 return err;
27dccaf17142fa Brent Lu 2020-07-01 693 }
27dccaf17142fa Brent Lu 2020-07-01 694
27dccaf17142fa Brent Lu 2020-07-01 @695 err = snd_soc_dapm_add_routes(&card->dapm, routes, num_routes);
27dccaf17142fa Brent Lu 2020-07-01 696 if (err) {
27dccaf17142fa Brent Lu 2020-07-01 697 dev_err(card->dev, "Fail to add routes\n");
27dccaf17142fa Brent Lu 2020-07-01 698 return err;
27dccaf17142fa Brent Lu 2020-07-01 699 }
27dccaf17142fa Brent Lu 2020-07-01 700
536cfd2f375d36 Pierre-Louis Bossart 2019-05-30 701 if (soc_intel_is_glk())
c011245a197017 Yong Zhi 2019-02-13 702 snd_soc_dapm_add_routes(&card->dapm, gemini_map,
c011245a197017 Yong Zhi 2019-02-13 703 ARRAY_SIZE(gemini_map));
c011245a197017 Yong Zhi 2019-02-13 704 else
c011245a197017 Yong Zhi 2019-02-13 705 snd_soc_dapm_add_routes(&card->dapm, broxton_map,
c011245a197017 Yong Zhi 2019-02-13 706 ARRAY_SIZE(broxton_map));
c011245a197017 Yong Zhi 2019-02-13 707
98ff5c262f27aa Guennadi Liakhovetski 2020-01-24 708 if (list_empty(&ctx->hdmi_pcm_list))
98ff5c262f27aa Guennadi Liakhovetski 2020-01-24 709 return -EINVAL;
98ff5c262f27aa Guennadi Liakhovetski 2020-01-24 710
98ff5c262f27aa Guennadi Liakhovetski 2020-01-24 711 if (ctx->common_hdmi_codec_drv) {
57ad18906f2427 Kai Vehmanen 2019-10-29 712 pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_hdmi_pcm,
57ad18906f2427 Kai Vehmanen 2019-10-29 713 head);
57ad18906f2427 Kai Vehmanen 2019-10-29 714 component = pcm->codec_dai->component;
57ad18906f2427 Kai Vehmanen 2019-10-29 715 return hda_dsp_hdmi_build_controls(card, component);
98ff5c262f27aa Guennadi Liakhovetski 2020-01-24 716 }
57ad18906f2427 Kai Vehmanen 2019-10-29 717
ba210346779464 Jeeja KP 2017-01-24 718 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
4510112217116d Kuninori Morimoto 2018-01-29 719 component = pcm->codec_dai->component;
625de2bf2ed163 Jeeja KP 2017-02-07 720 snprintf(jack_name, sizeof(jack_name),
625de2bf2ed163 Jeeja KP 2017-02-07 721 "HDMI/DP, pcm=%d Jack", pcm->device);
625de2bf2ed163 Jeeja KP 2017-02-07 722 err = snd_soc_card_jack_new(card, jack_name,
625de2bf2ed163 Jeeja KP 2017-02-07 723 SND_JACK_AVOUT, &broxton_hdmi[i],
625de2bf2ed163 Jeeja KP 2017-02-07 724 NULL, 0);
625de2bf2ed163 Jeeja KP 2017-02-07 725
625de2bf2ed163 Jeeja KP 2017-02-07 726 if (err)
625de2bf2ed163 Jeeja KP 2017-02-07 727 return err;
625de2bf2ed163 Jeeja KP 2017-02-07 728
625de2bf2ed163 Jeeja KP 2017-02-07 729 err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device,
625de2bf2ed163 Jeeja KP 2017-02-07 730 &broxton_hdmi[i]);
ba210346779464 Jeeja KP 2017-01-24 731 if (err < 0)
ba210346779464 Jeeja KP 2017-01-24 732 return err;
625de2bf2ed163 Jeeja KP 2017-02-07 733
625de2bf2ed163 Jeeja KP 2017-02-07 734 i++;
ba210346779464 Jeeja KP 2017-01-24 735 }
ba210346779464 Jeeja KP 2017-01-24 736
4510112217116d Kuninori Morimoto 2018-01-29 737 return hdac_hdmi_jack_port_init(component, &card->dapm);
ba210346779464 Jeeja KP 2017-01-24 738 }
ba210346779464 Jeeja KP 2017-01-24 739
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[linux-next:master 4349/4685] kernel/bpf/ringbuf.c:185 ringbuf_map_alloc() warn: passing a valid pointer to 'PTR_ERR'
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Andrii Nakryiko <andriin(a)fb.com>
CC: Daniel Borkmann <daniel(a)iogearbox.net>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aab2003999e78bbf2058dae1e661c44ede1d9766
commit: 517bbe1994a3cee29a35c730662277bb5daff582 [4349/4685] bpf: Enforce BPF ringbuf size to be the power of 2
:::::: branch date: 11 hours ago
:::::: commit date: 26 hours ago
config: i386-randconfig-m021-20200701 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
kernel/bpf/ringbuf.c:185 ringbuf_map_alloc() warn: passing a valid pointer to 'PTR_ERR'
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 517bbe1994a3cee29a35c730662277bb5daff582
vim +/PTR_ERR +185 kernel/bpf/ringbuf.c
517bbe1994a3ce Andrii Nakryiko 2020-06-29 169
457f44363a8894 Andrii Nakryiko 2020-05-29 170 rb_map = kzalloc(sizeof(*rb_map), GFP_USER);
457f44363a8894 Andrii Nakryiko 2020-05-29 171 if (!rb_map)
457f44363a8894 Andrii Nakryiko 2020-05-29 172 return ERR_PTR(-ENOMEM);
457f44363a8894 Andrii Nakryiko 2020-05-29 173
457f44363a8894 Andrii Nakryiko 2020-05-29 174 bpf_map_init_from_attr(&rb_map->map, attr);
457f44363a8894 Andrii Nakryiko 2020-05-29 175
457f44363a8894 Andrii Nakryiko 2020-05-29 176 cost = sizeof(struct bpf_ringbuf_map) +
457f44363a8894 Andrii Nakryiko 2020-05-29 177 sizeof(struct bpf_ringbuf) +
457f44363a8894 Andrii Nakryiko 2020-05-29 178 attr->max_entries;
457f44363a8894 Andrii Nakryiko 2020-05-29 179 err = bpf_map_charge_init(&rb_map->map.memory, cost);
457f44363a8894 Andrii Nakryiko 2020-05-29 180 if (err)
457f44363a8894 Andrii Nakryiko 2020-05-29 181 goto err_free_map;
457f44363a8894 Andrii Nakryiko 2020-05-29 182
457f44363a8894 Andrii Nakryiko 2020-05-29 183 rb_map->rb = bpf_ringbuf_alloc(attr->max_entries, rb_map->map.numa_node);
457f44363a8894 Andrii Nakryiko 2020-05-29 184 if (IS_ERR(rb_map->rb)) {
457f44363a8894 Andrii Nakryiko 2020-05-29 @185 err = PTR_ERR(rb_map->rb);
457f44363a8894 Andrii Nakryiko 2020-05-29 186 goto err_uncharge;
457f44363a8894 Andrii Nakryiko 2020-05-29 187 }
457f44363a8894 Andrii Nakryiko 2020-05-29 188
457f44363a8894 Andrii Nakryiko 2020-05-29 189 return &rb_map->map;
457f44363a8894 Andrii Nakryiko 2020-05-29 190
457f44363a8894 Andrii Nakryiko 2020-05-29 191 err_uncharge:
457f44363a8894 Andrii Nakryiko 2020-05-29 192 bpf_map_charge_finish(&rb_map->map.memory);
457f44363a8894 Andrii Nakryiko 2020-05-29 193 err_free_map:
457f44363a8894 Andrii Nakryiko 2020-05-29 194 kfree(rb_map);
457f44363a8894 Andrii Nakryiko 2020-05-29 195 return ERR_PTR(err);
457f44363a8894 Andrii Nakryiko 2020-05-29 196 }
457f44363a8894 Andrii Nakryiko 2020-05-29 197
:::::: The code at line 185 was first introduced by commit
:::::: 457f44363a8894135c85b7a9afd2bd8196db24ab bpf: Implement BPF ring buffer and verifier support for it
:::::: TO: Andrii Nakryiko <andriin(a)fb.com>
:::::: CC: Alexei Starovoitov <ast(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[linux-next:master 4349/4685] kernel/bpf/ringbuf.c:166 ringbuf_map_alloc() warn: impossible condition '(attr->max_entries > (((1 << 24) - 2 - ($expr_0x7f1c48643810(30) >> 12)) COPYING CREDITS Documentation Kbuild Kconfig LICENSES MAINTAINERS Makefile README arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound tools usr virt ((1) << 12))) => (0-u32max > 68719464448)'
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Andrii Nakryiko <andriin(a)fb.com>
CC: Daniel Borkmann <daniel(a)iogearbox.net>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aab2003999e78bbf2058dae1e661c44ede1d9766
commit: 517bbe1994a3cee29a35c730662277bb5daff582 [4349/4685] bpf: Enforce BPF ringbuf size to be the power of 2
:::::: branch date: 11 hours ago
:::::: commit date: 26 hours ago
config: x86_64-randconfig-m001-20200701 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
kernel/bpf/ringbuf.c:166 ringbuf_map_alloc() warn: impossible condition '(attr->max_entries > (((1 << 24) - 2 - ($expr_0x7f1c48643810(30) >> 12)) * ((1) << 12))) => (0-u32max > 68719464448)'
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 517bbe1994a3cee29a35c730662277bb5daff582
vim +166 kernel/bpf/ringbuf.c
457f44363a8894 Andrii Nakryiko 2020-05-29 149
457f44363a8894 Andrii Nakryiko 2020-05-29 150 static struct bpf_map *ringbuf_map_alloc(union bpf_attr *attr)
457f44363a8894 Andrii Nakryiko 2020-05-29 151 {
457f44363a8894 Andrii Nakryiko 2020-05-29 152 struct bpf_ringbuf_map *rb_map;
457f44363a8894 Andrii Nakryiko 2020-05-29 153 u64 cost;
457f44363a8894 Andrii Nakryiko 2020-05-29 154 int err;
457f44363a8894 Andrii Nakryiko 2020-05-29 155
457f44363a8894 Andrii Nakryiko 2020-05-29 156 if (attr->map_flags & ~RINGBUF_CREATE_FLAG_MASK)
457f44363a8894 Andrii Nakryiko 2020-05-29 157 return ERR_PTR(-EINVAL);
457f44363a8894 Andrii Nakryiko 2020-05-29 158
457f44363a8894 Andrii Nakryiko 2020-05-29 159 if (attr->key_size || attr->value_size ||
517bbe1994a3ce Andrii Nakryiko 2020-06-29 160 !is_power_of_2(attr->max_entries) ||
517bbe1994a3ce Andrii Nakryiko 2020-06-29 161 !PAGE_ALIGNED(attr->max_entries))
457f44363a8894 Andrii Nakryiko 2020-05-29 162 return ERR_PTR(-EINVAL);
457f44363a8894 Andrii Nakryiko 2020-05-29 163
517bbe1994a3ce Andrii Nakryiko 2020-06-29 164 #ifdef CONFIG_64BIT
517bbe1994a3ce Andrii Nakryiko 2020-06-29 165 /* on 32-bit arch, it's impossible to overflow record's hdr->pgoff */
517bbe1994a3ce Andrii Nakryiko 2020-06-29 @166 if (attr->max_entries > RINGBUF_MAX_DATA_SZ)
517bbe1994a3ce Andrii Nakryiko 2020-06-29 167 return ERR_PTR(-E2BIG);
517bbe1994a3ce Andrii Nakryiko 2020-06-29 168 #endif
517bbe1994a3ce Andrii Nakryiko 2020-06-29 169
457f44363a8894 Andrii Nakryiko 2020-05-29 170 rb_map = kzalloc(sizeof(*rb_map), GFP_USER);
457f44363a8894 Andrii Nakryiko 2020-05-29 171 if (!rb_map)
457f44363a8894 Andrii Nakryiko 2020-05-29 172 return ERR_PTR(-ENOMEM);
457f44363a8894 Andrii Nakryiko 2020-05-29 173
457f44363a8894 Andrii Nakryiko 2020-05-29 174 bpf_map_init_from_attr(&rb_map->map, attr);
457f44363a8894 Andrii Nakryiko 2020-05-29 175
457f44363a8894 Andrii Nakryiko 2020-05-29 176 cost = sizeof(struct bpf_ringbuf_map) +
457f44363a8894 Andrii Nakryiko 2020-05-29 177 sizeof(struct bpf_ringbuf) +
457f44363a8894 Andrii Nakryiko 2020-05-29 178 attr->max_entries;
457f44363a8894 Andrii Nakryiko 2020-05-29 179 err = bpf_map_charge_init(&rb_map->map.memory, cost);
457f44363a8894 Andrii Nakryiko 2020-05-29 180 if (err)
457f44363a8894 Andrii Nakryiko 2020-05-29 181 goto err_free_map;
457f44363a8894 Andrii Nakryiko 2020-05-29 182
457f44363a8894 Andrii Nakryiko 2020-05-29 183 rb_map->rb = bpf_ringbuf_alloc(attr->max_entries, rb_map->map.numa_node);
457f44363a8894 Andrii Nakryiko 2020-05-29 184 if (IS_ERR(rb_map->rb)) {
457f44363a8894 Andrii Nakryiko 2020-05-29 185 err = PTR_ERR(rb_map->rb);
457f44363a8894 Andrii Nakryiko 2020-05-29 186 goto err_uncharge;
457f44363a8894 Andrii Nakryiko 2020-05-29 187 }
457f44363a8894 Andrii Nakryiko 2020-05-29 188
457f44363a8894 Andrii Nakryiko 2020-05-29 189 return &rb_map->map;
457f44363a8894 Andrii Nakryiko 2020-05-29 190
457f44363a8894 Andrii Nakryiko 2020-05-29 191 err_uncharge:
457f44363a8894 Andrii Nakryiko 2020-05-29 192 bpf_map_charge_finish(&rb_map->map.memory);
457f44363a8894 Andrii Nakryiko 2020-05-29 193 err_free_map:
457f44363a8894 Andrii Nakryiko 2020-05-29 194 kfree(rb_map);
457f44363a8894 Andrii Nakryiko 2020-05-29 195 return ERR_PTR(err);
457f44363a8894 Andrii Nakryiko 2020-05-29 196 }
457f44363a8894 Andrii Nakryiko 2020-05-29 197
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[linux-next:master 2534/4685] drivers/clk/clk-versaclock5.c:736 vc5_probe() warn: passing freed memory 'init.name'
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Adam Ford <aford173(a)gmail.com>
CC: Stephen Boyd <sboyd(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aab2003999e78bbf2058dae1e661c44ede1d9766
commit: f491276a5168598758ea7fc381195e4ba9af39f8 [2534/4685] clk: vc5: Allow Versaclock driver to support multiple instances
:::::: branch date: 6 hours ago
:::::: commit date: 8 days ago
config: i386-randconfig-m021-20200701 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/clk/clk-versaclock5.c:736 vc5_probe() warn: passing freed memory 'init.name'
Old smatch warnings:
drivers/clk/clk-versaclock5.c:754 vc5_probe() warn: passing freed memory 'init.name'
drivers/clk/clk-versaclock5.c:775 vc5_probe() warn: passing freed memory 'init.name'
drivers/clk/clk-versaclock5.c:793 vc5_probe() warn: passing freed memory 'init.name'
drivers/clk/clk-versaclock5.c:814 vc5_probe() warn: passing freed memory 'init.name'
drivers/clk/clk-versaclock5.c:835 vc5_probe() warn: passing freed memory 'init.name'
drivers/clk/clk-versaclock5.c:862 vc5_probe() warn: passing freed memory 'init.name'
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout f491276a5168598758ea7fc381195e4ba9af39f8
vim +736 drivers/clk/clk-versaclock5.c
3e1aec4e2c4153 Marek Vasut 2017-01-12 670
f491276a516859 Adam Ford 2020-06-03 671 static int vc5_probe(struct i2c_client *client, const struct i2c_device_id *id)
3e1aec4e2c4153 Marek Vasut 2017-01-12 672 {
3e1aec4e2c4153 Marek Vasut 2017-01-12 673 struct vc5_driver_data *vc5;
3e1aec4e2c4153 Marek Vasut 2017-01-12 674 struct clk_init_data init;
3e1aec4e2c4153 Marek Vasut 2017-01-12 675 const char *parent_names[2];
9adddb01ce5f71 Alexey Firago 2017-04-07 676 unsigned int n, idx = 0;
3e1aec4e2c4153 Marek Vasut 2017-01-12 677 int ret;
3e1aec4e2c4153 Marek Vasut 2017-01-12 678
3e1aec4e2c4153 Marek Vasut 2017-01-12 679 vc5 = devm_kzalloc(&client->dev, sizeof(*vc5), GFP_KERNEL);
3e1aec4e2c4153 Marek Vasut 2017-01-12 680 if (vc5 == NULL)
3e1aec4e2c4153 Marek Vasut 2017-01-12 681 return -ENOMEM;
3e1aec4e2c4153 Marek Vasut 2017-01-12 682
3e1aec4e2c4153 Marek Vasut 2017-01-12 683 i2c_set_clientdata(client, vc5);
3e1aec4e2c4153 Marek Vasut 2017-01-12 684 vc5->client = client;
9adddb01ce5f71 Alexey Firago 2017-04-07 685 vc5->chip_info = of_device_get_match_data(&client->dev);
3e1aec4e2c4153 Marek Vasut 2017-01-12 686
3e1aec4e2c4153 Marek Vasut 2017-01-12 687 vc5->pin_xin = devm_clk_get(&client->dev, "xin");
3e1aec4e2c4153 Marek Vasut 2017-01-12 688 if (PTR_ERR(vc5->pin_xin) == -EPROBE_DEFER)
3e1aec4e2c4153 Marek Vasut 2017-01-12 689 return -EPROBE_DEFER;
3e1aec4e2c4153 Marek Vasut 2017-01-12 690
3e1aec4e2c4153 Marek Vasut 2017-01-12 691 vc5->pin_clkin = devm_clk_get(&client->dev, "clkin");
3e1aec4e2c4153 Marek Vasut 2017-01-12 692 if (PTR_ERR(vc5->pin_clkin) == -EPROBE_DEFER)
3e1aec4e2c4153 Marek Vasut 2017-01-12 693 return -EPROBE_DEFER;
3e1aec4e2c4153 Marek Vasut 2017-01-12 694
3e1aec4e2c4153 Marek Vasut 2017-01-12 695 vc5->regmap = devm_regmap_init_i2c(client, &vc5_regmap_config);
3e1aec4e2c4153 Marek Vasut 2017-01-12 696 if (IS_ERR(vc5->regmap)) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 697 dev_err(&client->dev, "failed to allocate register map\n");
3e1aec4e2c4153 Marek Vasut 2017-01-12 698 return PTR_ERR(vc5->regmap);
3e1aec4e2c4153 Marek Vasut 2017-01-12 699 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 700
3e1aec4e2c4153 Marek Vasut 2017-01-12 701 /* Register clock input mux */
3e1aec4e2c4153 Marek Vasut 2017-01-12 702 memset(&init, 0, sizeof(init));
3e1aec4e2c4153 Marek Vasut 2017-01-12 703
3e1aec4e2c4153 Marek Vasut 2017-01-12 704 if (!IS_ERR(vc5->pin_xin)) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 705 vc5->clk_mux_ins |= VC5_MUX_IN_XIN;
3e1aec4e2c4153 Marek Vasut 2017-01-12 706 parent_names[init.num_parents++] = __clk_get_name(vc5->pin_xin);
9adddb01ce5f71 Alexey Firago 2017-04-07 707 } else if (vc5->chip_info->flags & VC5_HAS_INTERNAL_XTAL) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 708 vc5->pin_xin = clk_register_fixed_rate(&client->dev,
3e1aec4e2c4153 Marek Vasut 2017-01-12 709 "internal-xtal", NULL,
3e1aec4e2c4153 Marek Vasut 2017-01-12 710 0, 25000000);
3e1aec4e2c4153 Marek Vasut 2017-01-12 711 if (IS_ERR(vc5->pin_xin))
3e1aec4e2c4153 Marek Vasut 2017-01-12 712 return PTR_ERR(vc5->pin_xin);
3e1aec4e2c4153 Marek Vasut 2017-01-12 713 vc5->clk_mux_ins |= VC5_MUX_IN_XIN;
3e1aec4e2c4153 Marek Vasut 2017-01-12 714 parent_names[init.num_parents++] = __clk_get_name(vc5->pin_xin);
3e1aec4e2c4153 Marek Vasut 2017-01-12 715 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 716
3e1aec4e2c4153 Marek Vasut 2017-01-12 717 if (!IS_ERR(vc5->pin_clkin)) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 718 vc5->clk_mux_ins |= VC5_MUX_IN_CLKIN;
3e1aec4e2c4153 Marek Vasut 2017-01-12 719 parent_names[init.num_parents++] =
3e1aec4e2c4153 Marek Vasut 2017-01-12 720 __clk_get_name(vc5->pin_clkin);
3e1aec4e2c4153 Marek Vasut 2017-01-12 721 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 722
3e1aec4e2c4153 Marek Vasut 2017-01-12 723 if (!init.num_parents) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 724 dev_err(&client->dev, "no input clock specified!\n");
3e1aec4e2c4153 Marek Vasut 2017-01-12 725 return -EINVAL;
3e1aec4e2c4153 Marek Vasut 2017-01-12 726 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 727
f491276a516859 Adam Ford 2020-06-03 728 init.name = kasprintf(GFP_KERNEL, "%pOFn.mux", client->dev.of_node);
3e1aec4e2c4153 Marek Vasut 2017-01-12 729 init.ops = &vc5_mux_ops;
3e1aec4e2c4153 Marek Vasut 2017-01-12 730 init.flags = 0;
3e1aec4e2c4153 Marek Vasut 2017-01-12 731 init.parent_names = parent_names;
3e1aec4e2c4153 Marek Vasut 2017-01-12 732 vc5->clk_mux.init = &init;
3e1aec4e2c4153 Marek Vasut 2017-01-12 733 ret = devm_clk_hw_register(&client->dev, &vc5->clk_mux);
f491276a516859 Adam Ford 2020-06-03 734 kfree(init.name); /* clock framework made a copy of the name */
3e1aec4e2c4153 Marek Vasut 2017-01-12 735 if (ret) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 @736 dev_err(&client->dev, "unable to register %s\n", init.name);
3e1aec4e2c4153 Marek Vasut 2017-01-12 737 goto err_clk;
3e1aec4e2c4153 Marek Vasut 2017-01-12 738 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 739
8c1ebe97626701 Marek Vasut 2017-07-09 740 if (vc5->chip_info->flags & VC5_HAS_PFD_FREQ_DBL) {
8c1ebe97626701 Marek Vasut 2017-07-09 741 /* Register frequency doubler */
8c1ebe97626701 Marek Vasut 2017-07-09 742 memset(&init, 0, sizeof(init));
f491276a516859 Adam Ford 2020-06-03 743 init.name = kasprintf(GFP_KERNEL, "%pOFn.dbl",
f491276a516859 Adam Ford 2020-06-03 744 client->dev.of_node);
8c1ebe97626701 Marek Vasut 2017-07-09 745 init.ops = &vc5_dbl_ops;
8c1ebe97626701 Marek Vasut 2017-07-09 746 init.flags = CLK_SET_RATE_PARENT;
f491276a516859 Adam Ford 2020-06-03 747 init.parent_names = parent_names;
f491276a516859 Adam Ford 2020-06-03 748 parent_names[0] = clk_hw_get_name(&vc5->clk_mux);
8c1ebe97626701 Marek Vasut 2017-07-09 749 init.num_parents = 1;
8c1ebe97626701 Marek Vasut 2017-07-09 750 vc5->clk_mul.init = &init;
8c1ebe97626701 Marek Vasut 2017-07-09 751 ret = devm_clk_hw_register(&client->dev, &vc5->clk_mul);
f491276a516859 Adam Ford 2020-06-03 752 kfree(init.name); /* clock framework made a copy of the name */
8c1ebe97626701 Marek Vasut 2017-07-09 753 if (ret) {
8c1ebe97626701 Marek Vasut 2017-07-09 754 dev_err(&client->dev, "unable to register %s\n",
8c1ebe97626701 Marek Vasut 2017-07-09 755 init.name);
8c1ebe97626701 Marek Vasut 2017-07-09 756 goto err_clk;
8c1ebe97626701 Marek Vasut 2017-07-09 757 }
8c1ebe97626701 Marek Vasut 2017-07-09 758 }
8c1ebe97626701 Marek Vasut 2017-07-09 759
55997db52e997e Marek Vasut 2017-07-09 760 /* Register PFD */
55997db52e997e Marek Vasut 2017-07-09 761 memset(&init, 0, sizeof(init));
f491276a516859 Adam Ford 2020-06-03 762 init.name = kasprintf(GFP_KERNEL, "%pOFn.pfd", client->dev.of_node);
55997db52e997e Marek Vasut 2017-07-09 763 init.ops = &vc5_pfd_ops;
55997db52e997e Marek Vasut 2017-07-09 764 init.flags = CLK_SET_RATE_PARENT;
f491276a516859 Adam Ford 2020-06-03 765 init.parent_names = parent_names;
8c1ebe97626701 Marek Vasut 2017-07-09 766 if (vc5->chip_info->flags & VC5_HAS_PFD_FREQ_DBL)
f491276a516859 Adam Ford 2020-06-03 767 parent_names[0] = clk_hw_get_name(&vc5->clk_mul);
8c1ebe97626701 Marek Vasut 2017-07-09 768 else
f491276a516859 Adam Ford 2020-06-03 769 parent_names[0] = clk_hw_get_name(&vc5->clk_mux);
55997db52e997e Marek Vasut 2017-07-09 770 init.num_parents = 1;
55997db52e997e Marek Vasut 2017-07-09 771 vc5->clk_pfd.init = &init;
55997db52e997e Marek Vasut 2017-07-09 772 ret = devm_clk_hw_register(&client->dev, &vc5->clk_pfd);
f491276a516859 Adam Ford 2020-06-03 773 kfree(init.name); /* clock framework made a copy of the name */
55997db52e997e Marek Vasut 2017-07-09 774 if (ret) {
55997db52e997e Marek Vasut 2017-07-09 775 dev_err(&client->dev, "unable to register %s\n", init.name);
55997db52e997e Marek Vasut 2017-07-09 776 goto err_clk;
55997db52e997e Marek Vasut 2017-07-09 777 }
55997db52e997e Marek Vasut 2017-07-09 778
3e1aec4e2c4153 Marek Vasut 2017-01-12 779 /* Register PLL */
3e1aec4e2c4153 Marek Vasut 2017-01-12 780 memset(&init, 0, sizeof(init));
f491276a516859 Adam Ford 2020-06-03 781 init.name = kasprintf(GFP_KERNEL, "%pOFn.pll", client->dev.of_node);
3e1aec4e2c4153 Marek Vasut 2017-01-12 782 init.ops = &vc5_pll_ops;
3e1aec4e2c4153 Marek Vasut 2017-01-12 783 init.flags = CLK_SET_RATE_PARENT;
f491276a516859 Adam Ford 2020-06-03 784 init.parent_names = parent_names;
f491276a516859 Adam Ford 2020-06-03 785 parent_names[0] = clk_hw_get_name(&vc5->clk_pfd);
3e1aec4e2c4153 Marek Vasut 2017-01-12 786 init.num_parents = 1;
3e1aec4e2c4153 Marek Vasut 2017-01-12 787 vc5->clk_pll.num = 0;
3e1aec4e2c4153 Marek Vasut 2017-01-12 788 vc5->clk_pll.vc5 = vc5;
3e1aec4e2c4153 Marek Vasut 2017-01-12 789 vc5->clk_pll.hw.init = &init;
3e1aec4e2c4153 Marek Vasut 2017-01-12 790 ret = devm_clk_hw_register(&client->dev, &vc5->clk_pll.hw);
f491276a516859 Adam Ford 2020-06-03 791 kfree(init.name); /* clock framework made a copy of the name */
3e1aec4e2c4153 Marek Vasut 2017-01-12 792 if (ret) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 793 dev_err(&client->dev, "unable to register %s\n", init.name);
3e1aec4e2c4153 Marek Vasut 2017-01-12 794 goto err_clk;
3e1aec4e2c4153 Marek Vasut 2017-01-12 795 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 796
3e1aec4e2c4153 Marek Vasut 2017-01-12 797 /* Register FODs */
9adddb01ce5f71 Alexey Firago 2017-04-07 798 for (n = 0; n < vc5->chip_info->clk_fod_cnt; n++) {
9adddb01ce5f71 Alexey Firago 2017-04-07 799 idx = vc5_map_index_to_output(vc5->chip_info->model, n);
3e1aec4e2c4153 Marek Vasut 2017-01-12 800 memset(&init, 0, sizeof(init));
f491276a516859 Adam Ford 2020-06-03 801 init.name = kasprintf(GFP_KERNEL, "%pOFn.fod%d",
f491276a516859 Adam Ford 2020-06-03 802 client->dev.of_node, idx);
3e1aec4e2c4153 Marek Vasut 2017-01-12 803 init.ops = &vc5_fod_ops;
3e1aec4e2c4153 Marek Vasut 2017-01-12 804 init.flags = CLK_SET_RATE_PARENT;
f491276a516859 Adam Ford 2020-06-03 805 init.parent_names = parent_names;
f491276a516859 Adam Ford 2020-06-03 806 parent_names[0] = clk_hw_get_name(&vc5->clk_pll.hw);
3e1aec4e2c4153 Marek Vasut 2017-01-12 807 init.num_parents = 1;
3e1aec4e2c4153 Marek Vasut 2017-01-12 808 vc5->clk_fod[n].num = idx;
3e1aec4e2c4153 Marek Vasut 2017-01-12 809 vc5->clk_fod[n].vc5 = vc5;
3e1aec4e2c4153 Marek Vasut 2017-01-12 810 vc5->clk_fod[n].hw.init = &init;
3e1aec4e2c4153 Marek Vasut 2017-01-12 811 ret = devm_clk_hw_register(&client->dev, &vc5->clk_fod[n].hw);
f491276a516859 Adam Ford 2020-06-03 812 kfree(init.name); /* clock framework made a copy of the name */
3e1aec4e2c4153 Marek Vasut 2017-01-12 813 if (ret) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 814 dev_err(&client->dev, "unable to register %s\n",
3e1aec4e2c4153 Marek Vasut 2017-01-12 815 init.name);
3e1aec4e2c4153 Marek Vasut 2017-01-12 816 goto err_clk;
3e1aec4e2c4153 Marek Vasut 2017-01-12 817 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 818 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 819
3e1aec4e2c4153 Marek Vasut 2017-01-12 820 /* Register MUX-connected OUT0_I2C_SELB output */
3e1aec4e2c4153 Marek Vasut 2017-01-12 821 memset(&init, 0, sizeof(init));
f491276a516859 Adam Ford 2020-06-03 822 init.name = kasprintf(GFP_KERNEL, "%pOFn.out0_sel_i2cb",
f491276a516859 Adam Ford 2020-06-03 823 client->dev.of_node);
3e1aec4e2c4153 Marek Vasut 2017-01-12 824 init.ops = &vc5_clk_out_ops;
3e1aec4e2c4153 Marek Vasut 2017-01-12 825 init.flags = CLK_SET_RATE_PARENT;
f491276a516859 Adam Ford 2020-06-03 826 init.parent_names = parent_names;
f491276a516859 Adam Ford 2020-06-03 827 parent_names[0] = clk_hw_get_name(&vc5->clk_mux);
3e1aec4e2c4153 Marek Vasut 2017-01-12 828 init.num_parents = 1;
3e1aec4e2c4153 Marek Vasut 2017-01-12 829 vc5->clk_out[0].num = idx;
3e1aec4e2c4153 Marek Vasut 2017-01-12 830 vc5->clk_out[0].vc5 = vc5;
3e1aec4e2c4153 Marek Vasut 2017-01-12 831 vc5->clk_out[0].hw.init = &init;
3e1aec4e2c4153 Marek Vasut 2017-01-12 832 ret = devm_clk_hw_register(&client->dev, &vc5->clk_out[0].hw);
f491276a516859 Adam Ford 2020-06-03 833 kfree(init.name); /* clock framework made a copy of the name */
3e1aec4e2c4153 Marek Vasut 2017-01-12 834 if (ret) {
f491276a516859 Adam Ford 2020-06-03 835 dev_err(&client->dev, "unable to register %s\n", init.name);
3e1aec4e2c4153 Marek Vasut 2017-01-12 836 goto err_clk;
3e1aec4e2c4153 Marek Vasut 2017-01-12 837 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 838
3e1aec4e2c4153 Marek Vasut 2017-01-12 839 /* Register FOD-connected OUTx outputs */
9adddb01ce5f71 Alexey Firago 2017-04-07 840 for (n = 1; n < vc5->chip_info->clk_out_cnt; n++) {
9adddb01ce5f71 Alexey Firago 2017-04-07 841 idx = vc5_map_index_to_output(vc5->chip_info->model, n - 1);
f491276a516859 Adam Ford 2020-06-03 842 parent_names[0] = clk_hw_get_name(&vc5->clk_fod[idx].hw);
3e1aec4e2c4153 Marek Vasut 2017-01-12 843 if (n == 1)
f491276a516859 Adam Ford 2020-06-03 844 parent_names[1] = clk_hw_get_name(&vc5->clk_mux);
3e1aec4e2c4153 Marek Vasut 2017-01-12 845 else
f491276a516859 Adam Ford 2020-06-03 846 parent_names[1] =
f491276a516859 Adam Ford 2020-06-03 847 clk_hw_get_name(&vc5->clk_out[n - 1].hw);
3e1aec4e2c4153 Marek Vasut 2017-01-12 848
3e1aec4e2c4153 Marek Vasut 2017-01-12 849 memset(&init, 0, sizeof(init));
f491276a516859 Adam Ford 2020-06-03 850 init.name = kasprintf(GFP_KERNEL, "%pOFn.out%d",
f491276a516859 Adam Ford 2020-06-03 851 client->dev.of_node, idx + 1);
3e1aec4e2c4153 Marek Vasut 2017-01-12 852 init.ops = &vc5_clk_out_ops;
3e1aec4e2c4153 Marek Vasut 2017-01-12 853 init.flags = CLK_SET_RATE_PARENT;
3e1aec4e2c4153 Marek Vasut 2017-01-12 854 init.parent_names = parent_names;
3e1aec4e2c4153 Marek Vasut 2017-01-12 855 init.num_parents = 2;
3e1aec4e2c4153 Marek Vasut 2017-01-12 856 vc5->clk_out[n].num = idx;
3e1aec4e2c4153 Marek Vasut 2017-01-12 857 vc5->clk_out[n].vc5 = vc5;
3e1aec4e2c4153 Marek Vasut 2017-01-12 858 vc5->clk_out[n].hw.init = &init;
f491276a516859 Adam Ford 2020-06-03 859 ret = devm_clk_hw_register(&client->dev, &vc5->clk_out[n].hw);
f491276a516859 Adam Ford 2020-06-03 860 kfree(init.name); /* clock framework made a copy of the name */
3e1aec4e2c4153 Marek Vasut 2017-01-12 861 if (ret) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 862 dev_err(&client->dev, "unable to register %s\n",
3e1aec4e2c4153 Marek Vasut 2017-01-12 863 init.name);
3e1aec4e2c4153 Marek Vasut 2017-01-12 864 goto err_clk;
3e1aec4e2c4153 Marek Vasut 2017-01-12 865 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 866 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 867
3e1aec4e2c4153 Marek Vasut 2017-01-12 868 ret = of_clk_add_hw_provider(client->dev.of_node, vc5_of_clk_get, vc5);
3e1aec4e2c4153 Marek Vasut 2017-01-12 869 if (ret) {
3e1aec4e2c4153 Marek Vasut 2017-01-12 870 dev_err(&client->dev, "unable to add clk provider\n");
3e1aec4e2c4153 Marek Vasut 2017-01-12 871 goto err_clk;
3e1aec4e2c4153 Marek Vasut 2017-01-12 872 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 873
3e1aec4e2c4153 Marek Vasut 2017-01-12 874 return 0;
3e1aec4e2c4153 Marek Vasut 2017-01-12 875
3e1aec4e2c4153 Marek Vasut 2017-01-12 876 err_clk:
9adddb01ce5f71 Alexey Firago 2017-04-07 877 if (vc5->chip_info->flags & VC5_HAS_INTERNAL_XTAL)
3e1aec4e2c4153 Marek Vasut 2017-01-12 878 clk_unregister_fixed_rate(vc5->pin_xin);
3e1aec4e2c4153 Marek Vasut 2017-01-12 879 return ret;
3e1aec4e2c4153 Marek Vasut 2017-01-12 880 }
3e1aec4e2c4153 Marek Vasut 2017-01-12 881
:::::: The code at line 736 was first introduced by commit
:::::: 3e1aec4e2c415346df7d5429f7413837ddaaedd7 clk: vc5: Add support for IDT VersaClock 5P49V5923 and 5P49V5933
:::::: TO: Marek Vasut <marek.vasut(a)gmail.com>
:::::: CC: Stephen Boyd <sboyd(a)codeaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[djwong-xfs:repair-xattrs 115/133] fs/xfs/xfs_swapext_item.c:56:5-24: atomic_dec_and_test variation before object free at line 57.
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: "Darrick J. Wong" <darrick.wong(a)oracle.com>
TO: "Darrick J. Wong" <darrick.wong(a)oracle.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-xattrs
head: d5d149783d8dcc57cbe92d25e2773c56ae75b2ef
commit: 3f892b61199a8a5b447bc3f1cab0e5fcc2a949f9 [115/133] xfs: introduce a swap-extent log intent item
:::::: branch date: 16 hours ago
:::::: commit date: 16 hours ago
config: x86_64-randconfig-c002-20200701 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> fs/xfs/xfs_swapext_item.c:56:5-24: atomic_dec_and_test variation before object free at line 57.
# https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git remote update djwong-xfs
git checkout 3f892b61199a8a5b447bc3f1cab0e5fcc2a949f9
vim +56 fs/xfs/xfs_swapext_item.c
3f892b61199a8a Darrick J. Wong 2020-06-25 43
3f892b61199a8a Darrick J. Wong 2020-06-25 44 /*
3f892b61199a8a Darrick J. Wong 2020-06-25 45 * Freeing the SXI requires that we remove it from the AIL if it has already
3f892b61199a8a Darrick J. Wong 2020-06-25 46 * been placed there. However, the SXI may not yet have been placed in the AIL
3f892b61199a8a Darrick J. Wong 2020-06-25 47 * when called by xfs_sxi_release() from SXD processing due to the ordering of
3f892b61199a8a Darrick J. Wong 2020-06-25 48 * committed vs unpin operations in bulk insert operations. Hence the reference
3f892b61199a8a Darrick J. Wong 2020-06-25 49 * count to ensure only the last caller frees the SXI.
3f892b61199a8a Darrick J. Wong 2020-06-25 50 */
3f892b61199a8a Darrick J. Wong 2020-06-25 51 STATIC void
3f892b61199a8a Darrick J. Wong 2020-06-25 52 xfs_sxi_release(
3f892b61199a8a Darrick J. Wong 2020-06-25 53 struct xfs_sxi_log_item *sxi_lip)
3f892b61199a8a Darrick J. Wong 2020-06-25 54 {
3f892b61199a8a Darrick J. Wong 2020-06-25 55 ASSERT(atomic_read(&sxi_lip->sxi_refcount) > 0);
3f892b61199a8a Darrick J. Wong 2020-06-25 @56 if (atomic_dec_and_test(&sxi_lip->sxi_refcount)) {
3f892b61199a8a Darrick J. Wong 2020-06-25 @57 xfs_trans_ail_delete(&sxi_lip->sxi_item, SHUTDOWN_LOG_IO_ERROR);
3f892b61199a8a Darrick J. Wong 2020-06-25 58 xfs_sxi_item_free(sxi_lip);
3f892b61199a8a Darrick J. Wong 2020-06-25 59 }
3f892b61199a8a Darrick J. Wong 2020-06-25 60 }
3f892b61199a8a Darrick J. Wong 2020-06-25 61
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month