Re: [PATCH v2 1/4] ALSA: hda/cirrus: Add error handling into CS8409 I2C functions
by kernel test robot
Hi Vitaly,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on sound/for-next]
[also build test WARNING on next-20210315]
[cannot apply to v5.12-rc3]
[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/Vitaly-Rodionov/ALSA-hda-cirrus-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: i386-randconfig-s002-20210315 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
# https://github.com/0day-ci/linux/commit/649ba4016100c8793c314c9dd5213ea91...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vitaly-Rodionov/ALSA-hda-cirrus-Make-CS8409-driver-more-generic-by-using-fixups/20210316-010109
git checkout 649ba4016100c8793c314c9dd5213ea910a70ffd
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' 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 >>):
>> sound/pci/hda/patch_cirrus.c:1600: warning: expecting prototype for cs8409_i2c_read(). Prototype was for cs8409_i2c_write() instead
vim +1600 sound/pci/hda/patch_cirrus.c
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1584
649ba4016100c8 Stefan Binding 2021-03-15 1585 /**
649ba4016100c8 Stefan Binding 2021-03-15 1586 * cs8409_i2c_read - CS8409 I2C Write.
649ba4016100c8 Stefan Binding 2021-03-15 1587 * @codec: the codec instance
649ba4016100c8 Stefan Binding 2021-03-15 1588 * @i2c_address: I2C Address
649ba4016100c8 Stefan Binding 2021-03-15 1589 * @i2c_reg: Register to write to
649ba4016100c8 Stefan Binding 2021-03-15 1590 * @i2c_data: Data to write
649ba4016100c8 Stefan Binding 2021-03-15 1591 * @paged: Is a paged transaction
649ba4016100c8 Stefan Binding 2021-03-15 1592 *
649ba4016100c8 Stefan Binding 2021-03-15 1593 * CS8409 I2C Write.
649ba4016100c8 Stefan Binding 2021-03-15 1594 * Returns negative on error, otherwise returns 0.
649ba4016100c8 Stefan Binding 2021-03-15 1595 */
649ba4016100c8 Stefan Binding 2021-03-15 1596 static int cs8409_i2c_write(struct hda_codec *codec,
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1597 unsigned int i2c_address, unsigned int i2c_reg,
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1598 unsigned int i2c_data,
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1599 unsigned int paged)
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 @1600 {
649ba4016100c8 Stefan Binding 2021-03-15 1601 unsigned int i2c_reg_data;
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1602
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1603 cs8409_enable_i2c_clock(codec, 1);
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1604 cs_vendor_coef_set(codec, CIR_I2C_ADDR, i2c_address);
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1605
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1606 if (paged) {
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1607 cs_vendor_coef_set(codec, CIR_I2C_QWRITE, i2c_reg >> 8);
649ba4016100c8 Stefan Binding 2021-03-15 1608 if (cs8409_i2c_wait_complete(codec) < 0) {
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1609 codec_err(codec,
649ba4016100c8 Stefan Binding 2021-03-15 1610 "%s() Paged Transaction Failed 0x%02x : 0x%04x\n",
649ba4016100c8 Stefan Binding 2021-03-15 1611 __func__, i2c_address, i2c_reg);
649ba4016100c8 Stefan Binding 2021-03-15 1612 return -EIO;
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1613 }
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1614 }
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1615
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1616 i2c_reg_data = ((i2c_reg << 8) & 0x0ff00) | (i2c_data & 0x0ff);
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1617 cs_vendor_coef_set(codec, CIR_I2C_QWRITE, i2c_reg_data);
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1618
649ba4016100c8 Stefan Binding 2021-03-15 1619 if (cs8409_i2c_wait_complete(codec) < 0) {
649ba4016100c8 Stefan Binding 2021-03-15 1620 codec_err(codec, "%s() Transaction Failed 0x%02x : 0x%04x\n",
649ba4016100c8 Stefan Binding 2021-03-15 1621 __func__, i2c_address, i2c_reg);
649ba4016100c8 Stefan Binding 2021-03-15 1622 return -EIO;
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1623 }
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1624
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1625 cs8409_enable_i2c_clock(codec, 0);
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1626
649ba4016100c8 Stefan Binding 2021-03-15 1627 return 0;
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1628 }
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 1629
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hch-misc:vgaarb-cleanups 3/4] drivers/gpu/drm/i915/display/intel_vga.c:159:2: error: too few arguments to function 'vga_client_register'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git vgaarb-cleanups
head: 06ce75527991e82573f5127a13dd1550c3045c35
commit: c6dc15a5e8f729a599d8becc7b44e55908b9753e [3/4] vgaarb: provide a vga_client_unregister wrapper
config: x86_64-rhel-7.6-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc vgaarb-cleanups
git checkout c6dc15a5e8f729a599d8becc7b44e55908b9753e
# save the attached .config to linux build tree
make 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_vga.c: In function 'intel_vga_unregister':
>> drivers/gpu/drm/i915/display/intel_vga.c:159:2: error: too few arguments to function 'vga_client_register'
159 | vga_client_register(i915->drm.pdev);
| ^~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/display/intel_vga.c:7:
include/linux/vgaarb.h:124:5: note: declared here
124 | int vga_client_register(struct pci_dev *pdev, void *cookie,
| ^~~~~~~~~~~~~~~~~~~
vim +/vga_client_register +159 drivers/gpu/drm/i915/display/intel_vga.c
156
157 void intel_vga_unregister(struct drm_i915_private *i915)
158 {
> 159 vga_client_register(i915->drm.pdev);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[brauner:2021-03-15/xfstests 3/3] fs/xfs/xfs_inode.c:1010:33: error: implicit declaration of function 'fsuid_into_mnt'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git 2021-03-15/xfstests
head: 2bbe0fe85cd29ed30d81564c0b679d10563bb168
commit: 2bbe0fe85cd29ed30d81564c0b679d10563bb168 [3/3] Merge remote-tracking branch 'xfs/xfs-5.12-fixes' into 2021-03-15/xfstests
config: alpha-randconfig-r033-20210315 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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/brauner/linux.git/commit/...
git remote add brauner https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
git fetch --no-tags brauner 2021-03-15/xfstests
git checkout 2bbe0fe85cd29ed30d81564c0b679d10563bb168
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
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 >>):
fs/xfs/xfs_inode.c: In function 'xfs_create':
>> fs/xfs/xfs_inode.c:1010:33: error: implicit declaration of function 'fsuid_into_mnt'; did you mean 'i_uid_into_mnt'? [-Werror=implicit-function-declaration]
1010 | error = xfs_qm_vop_dqalloc(dp, fsuid_into_mnt(mnt_userns),
| ^~~~~~~~~~~~~~
| i_uid_into_mnt
>> fs/xfs/xfs_inode.c:1011:4: error: implicit declaration of function 'fsgid_into_mnt'; did you mean 'i_gid_into_mnt'? [-Werror=implicit-function-declaration]
1011 | fsgid_into_mnt(mnt_userns), prid,
| ^~~~~~~~~~~~~~
| i_gid_into_mnt
>> fs/xfs/xfs_inode.c:1010:33: error: incompatible type for argument 2 of 'xfs_qm_vop_dqalloc'
1010 | error = xfs_qm_vop_dqalloc(dp, fsuid_into_mnt(mnt_userns),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from fs/xfs/xfs_inode.c:29:
fs/xfs/xfs_quota.h:93:51: note: expected 'kuid_t' {aka 'struct <anonymous>'} but argument is of type 'int'
93 | extern int xfs_qm_vop_dqalloc(struct xfs_inode *, kuid_t, kgid_t,
| ^~~~~~
fs/xfs/xfs_inode.c:1011:4: error: incompatible type for argument 3 of 'xfs_qm_vop_dqalloc'
1011 | fsgid_into_mnt(mnt_userns), prid,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from fs/xfs/xfs_inode.c:29:
fs/xfs/xfs_quota.h:93:59: note: expected 'kgid_t' {aka 'struct <anonymous>'} but argument is of type 'int'
93 | extern int xfs_qm_vop_dqalloc(struct xfs_inode *, kuid_t, kgid_t,
| ^~~~~~
fs/xfs/xfs_inode.c: In function 'xfs_create_tmpfile':
fs/xfs/xfs_inode.c:1161:33: error: incompatible type for argument 2 of 'xfs_qm_vop_dqalloc'
1161 | error = xfs_qm_vop_dqalloc(dp, fsuid_into_mnt(mnt_userns),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from fs/xfs/xfs_inode.c:29:
fs/xfs/xfs_quota.h:93:51: note: expected 'kuid_t' {aka 'struct <anonymous>'} but argument is of type 'int'
93 | extern int xfs_qm_vop_dqalloc(struct xfs_inode *, kuid_t, kgid_t,
| ^~~~~~
fs/xfs/xfs_inode.c:1162:4: error: incompatible type for argument 3 of 'xfs_qm_vop_dqalloc'
1162 | fsgid_into_mnt(mnt_userns), prid,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from fs/xfs/xfs_inode.c:29:
fs/xfs/xfs_quota.h:93:59: note: expected 'kgid_t' {aka 'struct <anonymous>'} but argument is of type 'int'
93 | extern int xfs_qm_vop_dqalloc(struct xfs_inode *, kuid_t, kgid_t,
| ^~~~~~
cc1: some warnings being treated as errors
--
fs/xfs/xfs_symlink.c: In function 'xfs_symlink':
>> fs/xfs/xfs_symlink.c:185:33: error: implicit declaration of function 'fsuid_into_mnt'; did you mean 'i_uid_into_mnt'? [-Werror=implicit-function-declaration]
185 | error = xfs_qm_vop_dqalloc(dp, fsuid_into_mnt(mnt_userns),
| ^~~~~~~~~~~~~~
| i_uid_into_mnt
>> fs/xfs/xfs_symlink.c:186:4: error: implicit declaration of function 'fsgid_into_mnt'; did you mean 'i_gid_into_mnt'? [-Werror=implicit-function-declaration]
186 | fsgid_into_mnt(mnt_userns), prid,
| ^~~~~~~~~~~~~~
| i_gid_into_mnt
>> fs/xfs/xfs_symlink.c:185:33: error: incompatible type for argument 2 of 'xfs_qm_vop_dqalloc'
185 | error = xfs_qm_vop_dqalloc(dp, fsuid_into_mnt(mnt_userns),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from fs/xfs/xfs_symlink.c:19:
fs/xfs/xfs_quota.h:93:51: note: expected 'kuid_t' {aka 'struct <anonymous>'} but argument is of type 'int'
93 | extern int xfs_qm_vop_dqalloc(struct xfs_inode *, kuid_t, kgid_t,
| ^~~~~~
fs/xfs/xfs_symlink.c:186:4: error: incompatible type for argument 3 of 'xfs_qm_vop_dqalloc'
186 | fsgid_into_mnt(mnt_userns), prid,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from fs/xfs/xfs_symlink.c:19:
fs/xfs/xfs_quota.h:93:59: note: expected 'kgid_t' {aka 'struct <anonymous>'} but argument is of type 'int'
93 | extern int xfs_qm_vop_dqalloc(struct xfs_inode *, kuid_t, kgid_t,
| ^~~~~~
cc1: some warnings being treated as errors
vim +1010 fs/xfs/xfs_inode.c
e546cb79ef7ebe Dave Chinner 2013-08-12 977
c24b5dfadc4a4f Dave Chinner 2013-08-12 978 int
c24b5dfadc4a4f Dave Chinner 2013-08-12 979 xfs_create(
f736d93d76d3e9 Christoph Hellwig 2021-01-21 980 struct user_namespace *mnt_userns,
c24b5dfadc4a4f Dave Chinner 2013-08-12 981 xfs_inode_t *dp,
c24b5dfadc4a4f Dave Chinner 2013-08-12 982 struct xfs_name *name,
c24b5dfadc4a4f Dave Chinner 2013-08-12 983 umode_t mode,
66f364649d870c Christoph Hellwig 2017-10-19 984 dev_t rdev,
c24b5dfadc4a4f Dave Chinner 2013-08-12 985 xfs_inode_t **ipp)
c24b5dfadc4a4f Dave Chinner 2013-08-12 986 {
c24b5dfadc4a4f Dave Chinner 2013-08-12 987 int is_dir = S_ISDIR(mode);
c24b5dfadc4a4f Dave Chinner 2013-08-12 988 struct xfs_mount *mp = dp->i_mount;
c24b5dfadc4a4f Dave Chinner 2013-08-12 989 struct xfs_inode *ip = NULL;
c24b5dfadc4a4f Dave Chinner 2013-08-12 990 struct xfs_trans *tp = NULL;
c24b5dfadc4a4f Dave Chinner 2013-08-12 991 int error;
c24b5dfadc4a4f Dave Chinner 2013-08-12 992 bool unlock_dp_on_error = false;
c24b5dfadc4a4f Dave Chinner 2013-08-12 993 prid_t prid;
c24b5dfadc4a4f Dave Chinner 2013-08-12 994 struct xfs_dquot *udqp = NULL;
c24b5dfadc4a4f Dave Chinner 2013-08-12 995 struct xfs_dquot *gdqp = NULL;
c24b5dfadc4a4f Dave Chinner 2013-08-12 996 struct xfs_dquot *pdqp = NULL;
062647a8b41928 Brian Foster 2014-11-28 997 struct xfs_trans_res *tres;
c24b5dfadc4a4f Dave Chinner 2013-08-12 998 uint resblks;
c24b5dfadc4a4f Dave Chinner 2013-08-12 999
c24b5dfadc4a4f Dave Chinner 2013-08-12 1000 trace_xfs_create(dp, name);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1001
c24b5dfadc4a4f Dave Chinner 2013-08-12 1002 if (XFS_FORCED_SHUTDOWN(mp))
2451337dd04390 Dave Chinner 2014-06-25 1003 return -EIO;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1004
163467d3753e77 Zhi Yong Wu 2013-12-18 1005 prid = xfs_get_initial_prid(dp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1006
c24b5dfadc4a4f Dave Chinner 2013-08-12 1007 /*
c24b5dfadc4a4f Dave Chinner 2013-08-12 1008 * Make sure that we have allocated dquot(s) on disk.
c24b5dfadc4a4f Dave Chinner 2013-08-12 1009 */
b5a08423da9da5 Darrick J. Wong 2021-03-02 @1010 error = xfs_qm_vop_dqalloc(dp, fsuid_into_mnt(mnt_userns),
b5a08423da9da5 Darrick J. Wong 2021-03-02 @1011 fsgid_into_mnt(mnt_userns), prid,
c24b5dfadc4a4f Dave Chinner 2013-08-12 1012 XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT,
c24b5dfadc4a4f Dave Chinner 2013-08-12 1013 &udqp, &gdqp, &pdqp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1014 if (error)
c24b5dfadc4a4f Dave Chinner 2013-08-12 1015 return error;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1016
c24b5dfadc4a4f Dave Chinner 2013-08-12 1017 if (is_dir) {
c24b5dfadc4a4f Dave Chinner 2013-08-12 1018 resblks = XFS_MKDIR_SPACE_RES(mp, name->len);
062647a8b41928 Brian Foster 2014-11-28 1019 tres = &M_RES(mp)->tr_mkdir;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1020 } else {
c24b5dfadc4a4f Dave Chinner 2013-08-12 1021 resblks = XFS_CREATE_SPACE_RES(mp, name->len);
062647a8b41928 Brian Foster 2014-11-28 1022 tres = &M_RES(mp)->tr_create;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1023 }
c24b5dfadc4a4f Dave Chinner 2013-08-12 1024
c24b5dfadc4a4f Dave Chinner 2013-08-12 1025 /*
c24b5dfadc4a4f Dave Chinner 2013-08-12 1026 * Initially assume that the file does not exist and
c24b5dfadc4a4f Dave Chinner 2013-08-12 1027 * reserve the resources for that case. If that is not
c24b5dfadc4a4f Dave Chinner 2013-08-12 1028 * the case we'll drop the one we have and get a more
c24b5dfadc4a4f Dave Chinner 2013-08-12 1029 * appropriate transaction later.
c24b5dfadc4a4f Dave Chinner 2013-08-12 1030 */
f2f7b9ff62a289 Darrick J. Wong 2021-01-27 1031 error = xfs_trans_alloc_icreate(mp, tres, udqp, gdqp, pdqp, resblks,
f2f7b9ff62a289 Darrick J. Wong 2021-01-27 1032 &tp);
2451337dd04390 Dave Chinner 2014-06-25 1033 if (error == -ENOSPC) {
c24b5dfadc4a4f Dave Chinner 2013-08-12 1034 /* flush outstanding delalloc blocks and retry */
c24b5dfadc4a4f Dave Chinner 2013-08-12 1035 xfs_flush_inodes(mp);
f2f7b9ff62a289 Darrick J. Wong 2021-01-27 1036 error = xfs_trans_alloc_icreate(mp, tres, udqp, gdqp, pdqp,
f2f7b9ff62a289 Darrick J. Wong 2021-01-27 1037 resblks, &tp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1038 }
4906e21545814e Christoph Hellwig 2015-06-04 1039 if (error)
f2f7b9ff62a289 Darrick J. Wong 2021-01-27 1040 goto out_release_dquots;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1041
6552321831dce8 Christoph Hellwig 2016-11-30 1042 xfs_ilock(dp, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1043 unlock_dp_on_error = true;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1044
f5d92749191402 Chandan Babu R 2021-01-22 1045 error = xfs_iext_count_may_overflow(dp, XFS_DATA_FORK,
f5d92749191402 Chandan Babu R 2021-01-22 1046 XFS_IEXT_DIR_MANIP_CNT(mp));
f5d92749191402 Chandan Babu R 2021-01-22 1047 if (error)
f5d92749191402 Chandan Babu R 2021-01-22 1048 goto out_trans_cancel;
f5d92749191402 Chandan Babu R 2021-01-22 1049
c24b5dfadc4a4f Dave Chinner 2013-08-12 1050 /*
c24b5dfadc4a4f Dave Chinner 2013-08-12 1051 * A newly created regular or special file just has one directory
c24b5dfadc4a4f Dave Chinner 2013-08-12 1052 * entry pointing to them, but a directory also the "." entry
c24b5dfadc4a4f Dave Chinner 2013-08-12 1053 * pointing to itself.
c24b5dfadc4a4f Dave Chinner 2013-08-12 1054 */
f736d93d76d3e9 Christoph Hellwig 2021-01-21 1055 error = xfs_dir_ialloc(mnt_userns, &tp, dp, mode, is_dir ? 2 : 1, rdev,
f736d93d76d3e9 Christoph Hellwig 2021-01-21 1056 prid, &ip);
d6077aa339d658 Jan Kara 2015-07-29 1057 if (error)
4906e21545814e Christoph Hellwig 2015-06-04 1058 goto out_trans_cancel;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1059
c24b5dfadc4a4f Dave Chinner 2013-08-12 1060 /*
c24b5dfadc4a4f Dave Chinner 2013-08-12 1061 * Now we join the directory inode to the transaction. We do not do it
c24b5dfadc4a4f Dave Chinner 2013-08-12 1062 * earlier because xfs_dir_ialloc might commit the previous transaction
c24b5dfadc4a4f Dave Chinner 2013-08-12 1063 * (and release all the locks). An error from here on will result in
c24b5dfadc4a4f Dave Chinner 2013-08-12 1064 * the transaction cancel unlocking dp so don't do it explicitly in the
c24b5dfadc4a4f Dave Chinner 2013-08-12 1065 * error path.
c24b5dfadc4a4f Dave Chinner 2013-08-12 1066 */
6552321831dce8 Christoph Hellwig 2016-11-30 1067 xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1068 unlock_dp_on_error = false;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1069
381eee69f862d3 Brian Foster 2018-07-11 1070 error = xfs_dir_createname(tp, dp, name, ip->i_ino,
63337b63e7dab6 Kaixu Xia 2020-03-27 1071 resblks - XFS_IALLOC_SPACE_RES(mp));
c24b5dfadc4a4f Dave Chinner 2013-08-12 1072 if (error) {
2451337dd04390 Dave Chinner 2014-06-25 1073 ASSERT(error != -ENOSPC);
4906e21545814e Christoph Hellwig 2015-06-04 1074 goto out_trans_cancel;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1075 }
c24b5dfadc4a4f Dave Chinner 2013-08-12 1076 xfs_trans_ichgtime(tp, dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1077 xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1078
c24b5dfadc4a4f Dave Chinner 2013-08-12 1079 if (is_dir) {
c24b5dfadc4a4f Dave Chinner 2013-08-12 1080 error = xfs_dir_init(tp, ip, dp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1081 if (error)
c8eac49ef798a7 Brian Foster 2018-07-24 1082 goto out_trans_cancel;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1083
910832697cf855 Eric Sandeen 2019-05-01 1084 xfs_bumplink(tp, dp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1085 }
c24b5dfadc4a4f Dave Chinner 2013-08-12 1086
c24b5dfadc4a4f Dave Chinner 2013-08-12 1087 /*
c24b5dfadc4a4f Dave Chinner 2013-08-12 1088 * If this is a synchronous mount, make sure that the
c24b5dfadc4a4f Dave Chinner 2013-08-12 1089 * create transaction goes to disk before returning to
c24b5dfadc4a4f Dave Chinner 2013-08-12 1090 * the user.
c24b5dfadc4a4f Dave Chinner 2013-08-12 1091 */
c24b5dfadc4a4f Dave Chinner 2013-08-12 1092 if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC))
c24b5dfadc4a4f Dave Chinner 2013-08-12 1093 xfs_trans_set_sync(tp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1094
c24b5dfadc4a4f Dave Chinner 2013-08-12 1095 /*
c24b5dfadc4a4f Dave Chinner 2013-08-12 1096 * Attach the dquot(s) to the inodes and modify them incore.
c24b5dfadc4a4f Dave Chinner 2013-08-12 1097 * These ids of the inode couldn't have changed since the new
c24b5dfadc4a4f Dave Chinner 2013-08-12 1098 * inode has been locked ever since it was created.
c24b5dfadc4a4f Dave Chinner 2013-08-12 1099 */
c24b5dfadc4a4f Dave Chinner 2013-08-12 1100 xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1101
70393313dd0b26 Christoph Hellwig 2015-06-04 1102 error = xfs_trans_commit(tp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1103 if (error)
c24b5dfadc4a4f Dave Chinner 2013-08-12 1104 goto out_release_inode;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1105
c24b5dfadc4a4f Dave Chinner 2013-08-12 1106 xfs_qm_dqrele(udqp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1107 xfs_qm_dqrele(gdqp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1108 xfs_qm_dqrele(pdqp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1109
c24b5dfadc4a4f Dave Chinner 2013-08-12 1110 *ipp = ip;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1111 return 0;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1112
c24b5dfadc4a4f Dave Chinner 2013-08-12 1113 out_trans_cancel:
4906e21545814e Christoph Hellwig 2015-06-04 1114 xfs_trans_cancel(tp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1115 out_release_inode:
c24b5dfadc4a4f Dave Chinner 2013-08-12 1116 /*
58c904734cd091 Dave Chinner 2015-02-23 1117 * Wait until after the current transaction is aborted to finish the
58c904734cd091 Dave Chinner 2015-02-23 1118 * setup of the inode and release the inode. This prevents recursive
58c904734cd091 Dave Chinner 2015-02-23 1119 * transactions and deadlocks from xfs_inactive.
c24b5dfadc4a4f Dave Chinner 2013-08-12 1120 */
58c904734cd091 Dave Chinner 2015-02-23 1121 if (ip) {
58c904734cd091 Dave Chinner 2015-02-23 1122 xfs_finish_inode_setup(ip);
44a8736bd20a08 Darrick J. Wong 2018-07-25 1123 xfs_irele(ip);
58c904734cd091 Dave Chinner 2015-02-23 1124 }
f2f7b9ff62a289 Darrick J. Wong 2021-01-27 1125 out_release_dquots:
c24b5dfadc4a4f Dave Chinner 2013-08-12 1126 xfs_qm_dqrele(udqp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1127 xfs_qm_dqrele(gdqp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1128 xfs_qm_dqrele(pdqp);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1129
c24b5dfadc4a4f Dave Chinner 2013-08-12 1130 if (unlock_dp_on_error)
6552321831dce8 Christoph Hellwig 2016-11-30 1131 xfs_iunlock(dp, XFS_ILOCK_EXCL);
c24b5dfadc4a4f Dave Chinner 2013-08-12 1132 return error;
c24b5dfadc4a4f Dave Chinner 2013-08-12 1133 }
c24b5dfadc4a4f Dave Chinner 2013-08-12 1134
:::::: The code at line 1010 was first introduced by commit
:::::: b5a08423da9da59c7f38ed8dbb6dd6cbbe9024a4 xfs: fix quota accounting when a mount is idmapped
:::::: TO: Darrick J. Wong <djwong(a)kernel.org>
:::::: CC: Darrick J. Wong <djwong(a)djwong.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[microchip-ung-linux-upstream:v5.12-rc2.net-next.sparx5_switchdev 25/41] drivers/uio/uio_fireant_irqmux.c:264:3: warning: 'strncpy' specified bound 16 equals destination size
by kernel test robot
tree: https://github.com/microchip-ung/linux-upstream.git v5.12-rc2.net-next.sparx5_switchdev
head: c647e473e6ff8532c02ea3bd816aa477df3687f2
commit: 5c575d7626ed53e4ccf148d834dde04b91c29b77 [25/41] sparx5: Add IRQ muxing UIO driver [LOCAL]
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.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/microchip-ung/linux-upstream/commit/5c575d7626ed53e4cc...
git remote add microchip-ung-linux-upstream https://github.com/microchip-ung/linux-upstream.git
git fetch --no-tags microchip-ung-linux-upstream v5.12-rc2.net-next.sparx5_switchdev
git checkout 5c575d7626ed53e4ccf148d834dde04b91c29b77
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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 >>):
In function 'uio_fireant_irqmux_request_irqs',
inlined from 'uio_fireant_irqmux_probe' at drivers/uio/uio_fireant_irqmux.c:304:8:
>> drivers/uio/uio_fireant_irqmux.c:264:3: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
264 | strncpy(priv->sirq[num].name, r->name, MAXNAMELEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +264 drivers/uio/uio_fireant_irqmux.c
241
242 static int uio_fireant_irqmux_request_irqs(struct irqmux_platdata *priv)
243 {
244 struct platform_device *pdev = priv->pdev;
245 int irq, num, max;
246
247 priv->n_sirq = platform_irq_count(pdev);
248 priv->sirq = devm_kzalloc(&pdev->dev,
249 sizeof(struct slave_irq)*priv->n_sirq,
250 GFP_KERNEL);
251 if (!priv->sirq)
252 return -ENOMEM;
253
254 for (num = 0, max = priv->n_sirq; num < max; num++) {
255 struct resource *r;
256
257 r = platform_get_resource(pdev, IORESOURCE_IRQ, num);
258 if (!r)
259 return -ENXIO;
260 irq = platform_get_irq(pdev, num);
261 priv->sirq[num].index = num;
262 priv->sirq[num].irq = irq;
263 priv->sirq[num].priv = priv;
> 264 strncpy(priv->sirq[num].name, r->name, MAXNAMELEN);
265 if (irq <= 0) {
266 dev_err(&pdev->dev, "failed to get IRQ %d\n", num);
267 return irq;
268 }
269 if (num == 0) {
270 priv->info.irq = irq;
271 if (strcmp(r->name, "master")) {
272 dev_err(&pdev->dev,
273 "First irq must be 'master'\n");
274 return -ENXIO;
275 }
276 } else {
277 int ret = request_irq(irq, slave_irq, 0, r->name,
278 (void *) &priv->sirq[num]);
279 if (ret < 0) {
280 dev_err(&pdev->dev, "can not get IRQ %d\n",
281 irq);
282 return -ENXIO;
283 }
284 }
285 }
286
287 return 0;
288 }
289
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v2 06/12] wcn36xx: Add ipv6 namespace offload in suspend
by kernel test robot
Hi Bryan,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master ath6kl/ath-next v5.12-rc3 next-20210315]
[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/Bryan-O-Donoghue/wcn36xx-Enable-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-ne... master
config: h8300-randconfig-r032-20210315 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.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/84a113e3918b369b7f17d291899f9eefb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Enable-downstream-consistent-Wake-on-Lan/20210315-201014
git checkout 84a113e3918b369b7f17d291899f9eefbbc60ca9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
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/net/wireless/ath/wcn36xx/smd.c: In function 'wcn36xx_smd_ipv6_ns_offload':
>> drivers/net/wireless/ath/wcn36xx/smd.c:2815:15: error: 'struct wcn36xx_vif' has no member named 'num_target_ipv6_addrs'
2815 | if (vif_priv->num_target_ipv6_addrs) {
| ^~
>> drivers/net/wireless/ath/wcn36xx/smd.c:2817:20: error: 'struct wcn36xx_vif' has no member named 'target_ipv6_addrs'
2817 | &vif_priv->target_ipv6_addrs[0].in6_u,
| ^~
drivers/net/wireless/ath/wcn36xx/smd.c:2820:20: error: 'struct wcn36xx_vif' has no member named 'target_ipv6_addrs'
2820 | &vif_priv->target_ipv6_addrs[0].in6_u,
| ^~
drivers/net/wireless/ath/wcn36xx/smd.c:2824:15: error: 'struct wcn36xx_vif' has no member named 'num_target_ipv6_addrs'
2824 | if (vif_priv->num_target_ipv6_addrs > 1) {
| ^~
drivers/net/wireless/ath/wcn36xx/smd.c:2826:20: error: 'struct wcn36xx_vif' has no member named 'target_ipv6_addrs'
2826 | &vif_priv->target_ipv6_addrs[1].in6_u,
| ^~
vim +2815 drivers/net/wireless/ath/wcn36xx/smd.c
2795
2796 int wcn36xx_smd_ipv6_ns_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif,
2797 bool enable)
2798 {
2799 struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
2800 struct wcn36xx_hal_host_offload_req_msg msg_body;
2801 struct wcn36xx_hal_ns_offload_params *ns_params;
2802 struct wcn36xx_hal_host_offload_req *ho_params;
2803 int ret;
2804
2805 mutex_lock(&wcn->hal_mutex);
2806
2807 INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_OFFLOAD_REQ);
2808 ho_params = &msg_body.host_offload_params;
2809 ns_params = &msg_body.ns_offload_params;
2810
2811 ho_params->offload_type = WCN36XX_HAL_IPV6_NS_OFFLOAD;
2812 if (enable) {
2813 ho_params->enable =
2814 WCN36XX_HAL_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE;
> 2815 if (vif_priv->num_target_ipv6_addrs) {
2816 memcpy(&ho_params->u,
> 2817 &vif_priv->target_ipv6_addrs[0].in6_u,
2818 sizeof(struct in6_addr));
2819 memcpy(&ns_params->target_ipv6_addr1,
2820 &vif_priv->target_ipv6_addrs[0].in6_u,
2821 sizeof(struct in6_addr));
2822 ns_params->target_ipv6_addr1_valid = 1;
2823 }
2824 if (vif_priv->num_target_ipv6_addrs > 1) {
2825 memcpy(&ns_params->target_ipv6_addr2,
2826 &vif_priv->target_ipv6_addrs[1].in6_u,
2827 sizeof(struct in6_addr));
2828 ns_params->target_ipv6_addr2_valid = 1;
2829 }
2830 }
2831 memcpy(&ns_params->self_addr, vif->addr, ETH_ALEN);
2832 ns_params->bss_index = vif_priv->bss_index;
2833
2834 PREPARE_HAL_BUF(wcn->hal_buf, msg_body);
2835
2836 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len);
2837 if (ret) {
2838 wcn36xx_err("Sending host_offload_arp failed\n");
2839 goto out;
2840 }
2841 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len);
2842 if (ret) {
2843 wcn36xx_err("host_offload_arp failed err=%d\n", ret);
2844 goto out;
2845 }
2846 out:
2847 mutex_unlock(&wcn->hal_mutex);
2848 return ret;
2849 }
2850
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
drivers/scsi/qedi/qedi_fw.c:1064:45: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1e28eed17697bcf343c6743f0028cc3b5dd88bf0
commit: 06e85c7e9a1c1356038936566fc23f7c0d363b96 asm-generic: fix unistd_32.h generation format
date: 11 months ago
config: xtensa-randconfig-s031-20210315 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 06e85c7e9a1c1356038936566fc23f7c0d363b96
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=xtensa
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/scsi/qedi/qedi_fw.c:284:35: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:287:37: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qedi/qedi_fw.c:324:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] idx @@ got restricted __le16 [usertype] rqe_opaque @@
drivers/scsi/qedi/qedi_fw.c:324:13: sparse: expected unsigned short [usertype] idx
drivers/scsi/qedi/qedi_fw.c:324:13: sparse: got restricted __le16 [usertype] rqe_opaque
drivers/scsi/qedi/qedi_fw.c:360:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] idx @@ got restricted __le16 [usertype] rqe_opaque @@
drivers/scsi/qedi/qedi_fw.c:360:13: sparse: expected unsigned short [usertype] idx
drivers/scsi/qedi/qedi_fw.c:360:13: sparse: got restricted __le16 [usertype] rqe_opaque
drivers/scsi/qedi/qedi_fw.c:378:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] opaque @@ got restricted __le32 [usertype] @@
drivers/scsi/qedi/qedi_fw.c:378:41: sparse: expected restricted __le16 [usertype] opaque
drivers/scsi/qedi/qedi_fw.c:378:41: sparse: got restricted __le32 [usertype]
drivers/scsi/qedi/qedi_fw.c:421:29: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qedi/qedi_fw.c:428:26: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:429:26: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:430:23: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:431:20: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:447:28: sparse: sparse: restricted __le16 degrades to integer
drivers/scsi/qedi/qedi_fw.c:492:32: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qedi/qedi_fw.c:508:18: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:508:16: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/scsi/qedi/qedi_fw.c:508:16: sparse: expected unsigned int
drivers/scsi/qedi/qedi_fw.c:508:16: sparse: got restricted __be32 [usertype]
drivers/scsi/qedi/qedi_fw.c:509:18: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:509:16: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/scsi/qedi/qedi_fw.c:509:16: sparse: expected unsigned int
drivers/scsi/qedi/qedi_fw.c:509:16: sparse: got restricted __be32 [usertype]
drivers/scsi/qedi/qedi_fw.c:511:31: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:512:31: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:513:28: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:518:28: sparse: sparse: cast from restricted __le16
drivers/scsi/qedi/qedi_fw.c:519:28: sparse: sparse: cast from restricted __le16
drivers/scsi/qedi/qedi_fw.c:520:28: sparse: sparse: cast from restricted __le16
drivers/scsi/qedi/qedi_fw.c:543:29: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qedi/qedi_fw.c:558:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qedi/qedi_fw.c:558:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qedi/qedi_fw.c:558:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qedi/qedi_fw.c:560:26: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:561:26: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:562:23: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:585:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] iscsi_cid @@ got restricted __le16 [usertype] conn_id @@
drivers/scsi/qedi/qedi_fw.c:585:20: sparse: expected unsigned int [usertype] iscsi_cid
drivers/scsi/qedi/qedi_fw.c:585:20: sparse: got restricted __le16 [usertype] conn_id
drivers/scsi/qedi/qedi_fw.c:625:26: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:626:26: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:627:20: sparse: sparse: restricted __le16 degrades to integer
drivers/scsi/qedi/qedi_fw.c:631:31: sparse: sparse: cast from restricted __le32
drivers/scsi/qedi/qedi_fw.c:634:38: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qedi/qedi_fw.c:739:28: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] proto_itt @@ got restricted __le16 [usertype] itid @@
drivers/scsi/qedi/qedi_fw.c:739:28: sparse: expected unsigned int [usertype] proto_itt
drivers/scsi/qedi/qedi_fw.c:739:28: sparse: got restricted __le16 [usertype] itid
drivers/scsi/qedi/qedi_fw.c:751:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] iscsi_cid @@ got restricted __le16 [usertype] conn_id @@
drivers/scsi/qedi/qedi_fw.c:751:19: sparse: expected unsigned int [usertype] iscsi_cid
drivers/scsi/qedi/qedi_fw.c:751:19: sparse: got restricted __le16 [usertype] conn_id
drivers/scsi/qedi/qedi_fw.c:809:25: sparse: sparse: cast to restricted itt_t
drivers/scsi/qedi/qedi_fw.c:828:45: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] tid @@ got restricted __le16 [usertype] itid @@
drivers/scsi/qedi/qedi_fw.c:828:45: sparse: expected unsigned int [usertype] tid
drivers/scsi/qedi/qedi_fw.c:828:45: sparse: got restricted __le16 [usertype] itid
drivers/scsi/qedi/qedi_fw.c:849:57: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected int idx @@ got restricted __le16 [usertype] itid @@
drivers/scsi/qedi/qedi_fw.c:849:57: sparse: expected int idx
drivers/scsi/qedi/qedi_fw.c:849:57: sparse: got restricted __le16 [usertype] itid
drivers/scsi/qedi/qedi_fw.c:852:45: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] tid @@ got restricted __le16 [usertype] itid @@
drivers/scsi/qedi/qedi_fw.c:852:45: sparse: expected unsigned int [usertype] tid
drivers/scsi/qedi/qedi_fw.c:852:45: sparse: got restricted __le16 [usertype] itid
drivers/scsi/qedi/qedi_fw.c:890:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] iscsi_cid @@ got restricted __le16 [usertype] conn_id @@
drivers/scsi/qedi/qedi_fw.c:890:20: sparse: expected unsigned int [usertype] iscsi_cid
drivers/scsi/qedi/qedi_fw.c:890:20: sparse: got restricted __le16 [usertype] conn_id
drivers/scsi/qedi/qedi_fw.c:921:50: sparse: sparse: cast from restricted itt_t
drivers/scsi/qedi/qedi_fw.c:921:40: sparse: sparse: restricted __le16 degrades to integer
drivers/scsi/qedi/qedi_fw.c:926:48: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qedi/qedi_fw.c:925:49: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] itid @@ got unsigned int @@
drivers/scsi/qedi/qedi_fw.c:925:49: sparse: expected restricted __le16 [usertype] itid
drivers/scsi/qedi/qedi_fw.c:925:49: sparse: got unsigned int
drivers/scsi/qedi/qedi_fw.c:975:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [assigned] [usertype] sq_prod @@ got unsigned short [usertype] fw_sq_prod_idx @@
drivers/scsi/qedi/qedi_fw.c:975:23: sparse: expected restricted __le16 [assigned] [usertype] sq_prod
drivers/scsi/qedi/qedi_fw.c:975:23: sparse: got unsigned short [usertype] fw_sq_prod_idx
drivers/scsi/qedi/qedi_fw.c:1048:40: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [addressable] [assigned] [usertype] isid_tabc @@ got unsigned int @@
drivers/scsi/qedi/qedi_fw.c:1048:40: sparse: expected restricted __le32 [addressable] [assigned] [usertype] isid_tabc
drivers/scsi/qedi/qedi_fw.c:1048:40: sparse: got unsigned int
drivers/scsi/qedi/qedi_fw.c:1049:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [addressable] [assigned] [usertype] isid_d @@ got unsigned short @@
drivers/scsi/qedi/qedi_fw.c:1049:37: sparse: expected restricted __le16 [addressable] [assigned] [usertype] isid_d
drivers/scsi/qedi/qedi_fw.c:1049:37: sparse: got unsigned short
drivers/scsi/qedi/qedi_fw.c:1051:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [addressable] [assigned] [usertype] tsih @@ got restricted __be16 [usertype] tsih @@
drivers/scsi/qedi/qedi_fw.c:1051:35: sparse: expected restricted __le16 [addressable] [assigned] [usertype] tsih
drivers/scsi/qedi/qedi_fw.c:1051:35: sparse: got restricted __be16 [usertype] tsih
drivers/scsi/qedi/qedi_fw.c:1052:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [addressable] [assigned] [usertype] hdr_second_dword @@ got int @@
drivers/scsi/qedi/qedi_fw.c:1052:47: sparse: expected restricted __le32 [addressable] [assigned] [usertype] hdr_second_dword
drivers/scsi/qedi/qedi_fw.c:1052:47: sparse: got int
drivers/scsi/qedi/qedi_fw.c:1055:36: sparse: sparse: cast to restricted itt_t
drivers/scsi/qedi/qedi_fw.c:1055:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [addressable] [assigned] [usertype] itt @@ got unsigned int [usertype] @@
drivers/scsi/qedi/qedi_fw.c:1055:34: sparse: expected restricted __le32 [addressable] [assigned] [usertype] itt
drivers/scsi/qedi/qedi_fw.c:1055:34: sparse: got unsigned int [usertype]
drivers/scsi/qedi/qedi_fw.c:1056:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [addressable] [assigned] [usertype] cid @@ got unsigned int [usertype] iscsi_conn_id @@
drivers/scsi/qedi/qedi_fw.c:1056:34: sparse: expected restricted __le16 [addressable] [assigned] [usertype] cid
drivers/scsi/qedi/qedi_fw.c:1056:34: sparse: got unsigned int [usertype] iscsi_conn_id
drivers/scsi/qedi/qedi_fw.c:1057:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [addressable] [assigned] [usertype] cmd_sn @@ got unsigned int [usertype] @@
drivers/scsi/qedi/qedi_fw.c:1057:37: sparse: expected restricted __le32 [addressable] [assigned] [usertype] cmd_sn
drivers/scsi/qedi/qedi_fw.c:1057:37: sparse: got unsigned int [usertype]
drivers/scsi/qedi/qedi_fw.c:1058:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [addressable] [assigned] [usertype] exp_stat_sn @@ got unsigned int [usertype] @@
drivers/scsi/qedi/qedi_fw.c:1058:42: sparse: expected restricted __le32 [addressable] [assigned] [usertype] exp_stat_sn
drivers/scsi/qedi/qedi_fw.c:1058:42: sparse: got unsigned int [usertype]
>> drivers/scsi/qedi/qedi_fw.c:1064:45: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [addressable] [assigned] [usertype] lo @@ got unsigned int [usertype] @@
drivers/scsi/qedi/qedi_fw.c:1064:45: sparse: expected restricted __le32 [addressable] [assigned] [usertype] lo
drivers/scsi/qedi/qedi_fw.c:1064:45: sparse: got unsigned int [usertype]
drivers/scsi/qedi/qedi_fw.c:1066:45: sparse: sparse: too many warnings
vim +1064 drivers/scsi/qedi/qedi_fw.c
be086e7c53f1fa Mintz, Yuval 2017-03-11 1005
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1006 int qedi_send_iscsi_login(struct qedi_conn *qedi_conn,
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1007 struct iscsi_task *task)
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1008 {
be086e7c53f1fa Mintz, Yuval 2017-03-11 1009 struct iscsi_login_req_hdr login_req_pdu_header;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1010 struct scsi_sgl_task_params tx_sgl_task_params;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1011 struct scsi_sgl_task_params rx_sgl_task_params;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1012 struct iscsi_task_params task_params;
21dd79e82f00b2 Tomer Tayar 2017-12-27 1013 struct e4_iscsi_task_context *fw_task_ctx;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1014 struct qedi_ctx *qedi = qedi_conn->qedi;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1015 struct iscsi_login_req *login_hdr;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1016 struct scsi_sge *resp_sge = NULL;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1017 struct qedi_cmd *qedi_cmd;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1018 struct qedi_endpoint *ep;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1019 s16 tid = 0;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1020 u16 sq_idx = 0;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1021 int rval = 0;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1022
be086e7c53f1fa Mintz, Yuval 2017-03-11 1023 resp_sge = (struct scsi_sge *)qedi_conn->gen_pdu.resp_bd_tbl;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1024 qedi_cmd = (struct qedi_cmd *)task->dd_data;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1025 ep = qedi_conn->ep;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1026 login_hdr = (struct iscsi_login_req *)task->hdr;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1027
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1028 tid = qedi_get_task_idx(qedi);
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1029 if (tid == -1)
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1030 return -ENOMEM;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1031
be086e7c53f1fa Mintz, Yuval 2017-03-11 1032 fw_task_ctx =
21dd79e82f00b2 Tomer Tayar 2017-12-27 1033 (struct e4_iscsi_task_context *)qedi_get_task_mem(&qedi->tasks,
21dd79e82f00b2 Tomer Tayar 2017-12-27 1034 tid);
21dd79e82f00b2 Tomer Tayar 2017-12-27 1035 memset(fw_task_ctx, 0, sizeof(struct e4_iscsi_task_context));
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1036
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1037 qedi_cmd->task_id = tid;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1038
be086e7c53f1fa Mintz, Yuval 2017-03-11 1039 memset(&task_params, 0, sizeof(task_params));
be086e7c53f1fa Mintz, Yuval 2017-03-11 1040 memset(&login_req_pdu_header, 0, sizeof(login_req_pdu_header));
be086e7c53f1fa Mintz, Yuval 2017-03-11 1041 memset(&tx_sgl_task_params, 0, sizeof(tx_sgl_task_params));
be086e7c53f1fa Mintz, Yuval 2017-03-11 1042 memset(&rx_sgl_task_params, 0, sizeof(rx_sgl_task_params));
be086e7c53f1fa Mintz, Yuval 2017-03-11 1043 /* Update header info */
be086e7c53f1fa Mintz, Yuval 2017-03-11 1044 login_req_pdu_header.opcode = login_hdr->opcode;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1045 login_req_pdu_header.version_min = login_hdr->min_version;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1046 login_req_pdu_header.version_max = login_hdr->max_version;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1047 login_req_pdu_header.flags_attr = login_hdr->flags;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1048 login_req_pdu_header.isid_tabc = swab32p((u32 *)login_hdr->isid);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1049 login_req_pdu_header.isid_d = swab16p((u16 *)&login_hdr->isid[4]);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1050
be086e7c53f1fa Mintz, Yuval 2017-03-11 1051 login_req_pdu_header.tsih = login_hdr->tsih;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1052 login_req_pdu_header.hdr_second_dword = ntoh24(login_hdr->dlength);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1053
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1054 qedi_update_itt_map(qedi, tid, task->itt, qedi_cmd);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1055 login_req_pdu_header.itt = qedi_set_itt(tid, get_itt(task->itt));
be086e7c53f1fa Mintz, Yuval 2017-03-11 1056 login_req_pdu_header.cid = qedi_conn->iscsi_conn_id;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1057 login_req_pdu_header.cmd_sn = be32_to_cpu(login_hdr->cmdsn);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1058 login_req_pdu_header.exp_stat_sn = be32_to_cpu(login_hdr->exp_statsn);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1059 login_req_pdu_header.exp_stat_sn = 0;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1060
be086e7c53f1fa Mintz, Yuval 2017-03-11 1061 /* Fill tx AHS and rx buffer */
be086e7c53f1fa Mintz, Yuval 2017-03-11 1062 tx_sgl_task_params.sgl =
be086e7c53f1fa Mintz, Yuval 2017-03-11 1063 (struct scsi_sge *)qedi_conn->gen_pdu.req_bd_tbl;
be086e7c53f1fa Mintz, Yuval 2017-03-11 @1064 tx_sgl_task_params.sgl_phys_addr.lo =
be086e7c53f1fa Mintz, Yuval 2017-03-11 1065 (u32)(qedi_conn->gen_pdu.req_dma_addr);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1066 tx_sgl_task_params.sgl_phys_addr.hi =
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1067 (u32)((u64)qedi_conn->gen_pdu.req_dma_addr >> 32);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1068 tx_sgl_task_params.total_buffer_size = ntoh24(login_hdr->dlength);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1069 tx_sgl_task_params.num_sges = 1;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1070
be086e7c53f1fa Mintz, Yuval 2017-03-11 1071 rx_sgl_task_params.sgl =
be086e7c53f1fa Mintz, Yuval 2017-03-11 1072 (struct scsi_sge *)qedi_conn->gen_pdu.resp_bd_tbl;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1073 rx_sgl_task_params.sgl_phys_addr.lo =
be086e7c53f1fa Mintz, Yuval 2017-03-11 1074 (u32)(qedi_conn->gen_pdu.resp_dma_addr);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1075 rx_sgl_task_params.sgl_phys_addr.hi =
be086e7c53f1fa Mintz, Yuval 2017-03-11 1076 (u32)((u64)qedi_conn->gen_pdu.resp_dma_addr >> 32);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1077 rx_sgl_task_params.total_buffer_size = resp_sge->sge_len;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1078 rx_sgl_task_params.num_sges = 1;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1079
be086e7c53f1fa Mintz, Yuval 2017-03-11 1080 /* Fill fw input params */
be086e7c53f1fa Mintz, Yuval 2017-03-11 1081 task_params.context = fw_task_ctx;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1082 task_params.conn_icid = (u16)qedi_conn->iscsi_conn_id;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1083 task_params.itid = tid;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1084 task_params.cq_rss_number = 0;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1085 task_params.tx_io_size = ntoh24(login_hdr->dlength);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1086 task_params.rx_io_size = resp_sge->sge_len;
be086e7c53f1fa Mintz, Yuval 2017-03-11 1087
be086e7c53f1fa Mintz, Yuval 2017-03-11 1088 sq_idx = qedi_get_wqe_idx(qedi_conn);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1089 task_params.sqe = &ep->sq[sq_idx];
be086e7c53f1fa Mintz, Yuval 2017-03-11 1090
be086e7c53f1fa Mintz, Yuval 2017-03-11 1091 memset(task_params.sqe, 0, sizeof(struct iscsi_wqe));
be086e7c53f1fa Mintz, Yuval 2017-03-11 1092 rval = init_initiator_login_request_task(&task_params,
be086e7c53f1fa Mintz, Yuval 2017-03-11 1093 &login_req_pdu_header,
be086e7c53f1fa Mintz, Yuval 2017-03-11 1094 &tx_sgl_task_params,
be086e7c53f1fa Mintz, Yuval 2017-03-11 1095 &rx_sgl_task_params);
be086e7c53f1fa Mintz, Yuval 2017-03-11 1096 if (rval)
be086e7c53f1fa Mintz, Yuval 2017-03-11 1097 return -1;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1098
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1099 spin_lock(&qedi_conn->list_lock);
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1100 list_add_tail(&qedi_cmd->io_cmd, &qedi_conn->active_cmd_list);
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1101 qedi_cmd->io_cmd_in_list = true;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1102 qedi_conn->active_cmd_count++;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1103 spin_unlock(&qedi_conn->list_lock);
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1104
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1105 qedi_ring_doorbell(qedi_conn);
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1106 return 0;
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1107 }
ace7f46ba5fde7 Manish Rangankar 2016-12-01 1108
:::::: The code at line 1064 was first introduced by commit
:::::: be086e7c53f1fac51eed14523b28f2214b548dd2 qed*: Utilize Firmware 8.15.3.0
:::::: TO: Mintz, Yuval <Yuval.Mintz(a)cavium.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v2 4/4] platform/x86: pmc_atom: improve critclk_systems matching for Siemens PCs
by kernel test robot
Hi Henning,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on pavel-linux-leds/for-next]
[also build test WARNING on tip/master linux/master linus/master v5.12-rc3 next-20210315]
[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/Henning-Schild/add-device-driver...
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: x86_64-randconfig-s022-20210315 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
# https://github.com/0day-ci/linux/commit/7b3ce3514b5f314b15ab6e2898104fa3e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Henning-Schild/add-device-drivers-for-Siemens-Industrial-PCs/20210315-181441
git checkout 7b3ce3514b5f314b15ab6e2898104fa3e8e76d59
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/platform/x86/pmc_atom.c: note: in included file:
>> include/linux/platform_data/x86/simatic-ipc.h:50:30: sparse: sparse: cast to restricted __le32
vim +50 include/linux/platform_data/x86/simatic-ipc.h
051f5729fd6fb4 Henning Schild 2021-03-15 30
051f5729fd6fb4 Henning Schild 2021-03-15 31 static inline u32 simatic_ipc_get_station_id(u8 *data, int max_len)
051f5729fd6fb4 Henning Schild 2021-03-15 32 {
051f5729fd6fb4 Henning Schild 2021-03-15 33 u32 station_id = SIMATIC_IPC_INVALID_STATION_ID;
051f5729fd6fb4 Henning Schild 2021-03-15 34 int i;
051f5729fd6fb4 Henning Schild 2021-03-15 35 struct {
051f5729fd6fb4 Henning Schild 2021-03-15 36 u8 type; /* type (0xff = binary) */
051f5729fd6fb4 Henning Schild 2021-03-15 37 u8 len; /* len of data entry */
051f5729fd6fb4 Henning Schild 2021-03-15 38 u8 reserved[3];
051f5729fd6fb4 Henning Schild 2021-03-15 39 u32 station_id; /* station id (LE) */
051f5729fd6fb4 Henning Schild 2021-03-15 40 } __packed
051f5729fd6fb4 Henning Schild 2021-03-15 41 *data_entry = (void *)data + sizeof(struct dmi_header);
051f5729fd6fb4 Henning Schild 2021-03-15 42
051f5729fd6fb4 Henning Schild 2021-03-15 43 /* find 4th entry in OEM data */
051f5729fd6fb4 Henning Schild 2021-03-15 44 for (i = 0; i < 3; i++)
051f5729fd6fb4 Henning Schild 2021-03-15 45 data_entry = (void *)((u8 *)(data_entry) + data_entry->len);
051f5729fd6fb4 Henning Schild 2021-03-15 46
051f5729fd6fb4 Henning Schild 2021-03-15 47 /* decode station id */
051f5729fd6fb4 Henning Schild 2021-03-15 48 if (data_entry && (u8 *)data_entry < data + max_len &&
051f5729fd6fb4 Henning Schild 2021-03-15 49 data_entry->type == 0xff && data_entry->len == 9)
051f5729fd6fb4 Henning Schild 2021-03-15 @50 station_id = le32_to_cpu(data_entry->station_id);
051f5729fd6fb4 Henning Schild 2021-03-15 51
051f5729fd6fb4 Henning Schild 2021-03-15 52 return station_id;
051f5729fd6fb4 Henning Schild 2021-03-15 53 }
051f5729fd6fb4 Henning Schild 2021-03-15 54
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months