[drm-intel:topic/dp-hdmi-2.1-pcon 9/15] drivers/gpu/drm/i915/display/intel_dp.c:4053:10: warning: Suspicious condition (assignment + comparison); Clarify expression with parentheses.
by kernel test robot
tree: git://anongit.freedesktop.org/drm-intel topic/dp-hdmi-2.1-pcon
head: 522508b665df3bbfdf40381d4e61777844b1703f
commit: ced42f2df5fd8621c896faeafe7ecc0ea8b2ea81 [9/15] drm/i915: Add support for starting FRL training for HDMI2.1 via PCON
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <rong.a.chen(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/gpu/drm/i915/display/intel_dp.c:4053:10: warning: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition]
wait_for(is_active = drm_dp_pcon_is_frl_ready(&intel_dp->aux) == true, TIMEOUT_FRL_READY_MS);
^
drivers/gpu/drm/i915/display/intel_dp.c:4072:10: warning: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition]
wait_for(is_active = drm_dp_pcon_hdmi_link_active(&intel_dp->aux) == true, TIMEOUT_HDMI_LINK_ACTIVE_MS);
^
vim +4053 drivers/gpu/drm/i915/display/intel_dp.c
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4028
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4029 struct drm_i915_private *i915 = dp_to_i915(intel_dp);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4030 int max_frl_bw, max_pcon_frl_bw, max_edid_frl_bw, ret;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4031 u8 max_frl_bw_mask = 0, frl_trained_mask;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4032 bool is_active;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4033
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4034 ret = drm_dp_pcon_reset_frl_config(&intel_dp->aux);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4035 if (ret < 0)
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4036 return ret;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4037
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4038 max_pcon_frl_bw = intel_dp->dfp.pcon_max_frl_bw;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4039 drm_dbg(&i915->drm, "PCON max rate = %d Gbps\n", max_pcon_frl_bw);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4040
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4041 max_edid_frl_bw = intel_dp_hdmi_sink_max_frl(intel_dp);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4042 drm_dbg(&i915->drm, "Sink max rate from EDID = %d Gbps\n", max_edid_frl_bw);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4043
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4044 max_frl_bw = min(max_edid_frl_bw, max_pcon_frl_bw);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4045
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4046 if (max_frl_bw <= 0)
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4047 return -EINVAL;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4048
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4049 ret = drm_dp_pcon_frl_prepare(&intel_dp->aux, false);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4050 if (ret < 0)
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4051 return ret;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4052 /* Wait for PCON to be FRL Ready */
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 @4053 wait_for(is_active = drm_dp_pcon_is_frl_ready(&intel_dp->aux) == true, TIMEOUT_FRL_READY_MS);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4054
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4055 if (!is_active)
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4056 return -ETIMEDOUT;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4057
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4058 max_frl_bw_mask = intel_dp_pcon_set_frl_mask(max_frl_bw);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4059 ret = drm_dp_pcon_frl_configure_1(&intel_dp->aux, max_frl_bw, PCON_SEQUENTIAL_MODE);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4060 if (ret < 0)
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4061 return ret;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4062 ret = drm_dp_pcon_frl_configure_2(&intel_dp->aux, max_frl_bw_mask, PCON_NORMAL_TRAIN_MODE);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4063 if (ret < 0)
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4064 return ret;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4065 ret = drm_dp_pcon_frl_enable(&intel_dp->aux);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4066 if (ret < 0)
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4067 return ret;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4068 /*
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4069 * Wait for FRL to be completed
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4070 * Check if the HDMI Link is up and active.
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4071 */
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4072 wait_for(is_active = drm_dp_pcon_hdmi_link_active(&intel_dp->aux) == true, TIMEOUT_HDMI_LINK_ACTIVE_MS);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4073
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4074 if (!is_active)
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4075 return -ETIMEDOUT;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4076
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4077 /* Verify HDMI Link configuration shows FRL Mode */
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4078 if (drm_dp_pcon_hdmi_link_mode(&intel_dp->aux, &frl_trained_mask) !=
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4079 DP_PCON_HDMI_MODE_FRL) {
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4080 drm_dbg(&i915->drm, "HDMI couldn't be trained in FRL Mode\n");
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4081 return -EINVAL;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4082 }
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4083 drm_dbg(&i915->drm, "MAX_FRL_MASK = %u, FRL_TRAINED_MASK = %u\n", max_frl_bw_mask, frl_trained_mask);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4084
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4085 intel_dp->frl.trained_rate_gbps = intel_dp_pcon_get_frl_mask(frl_trained_mask);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4086 intel_dp->frl.is_trained = true;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4087 drm_dbg(&i915->drm, "FRL trained with : %d Gbps\n", intel_dp->frl.trained_rate_gbps);
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4088
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4089 return 0;
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4090 }
ced42f2df5fd8621 Ankit Nautiyal 2020-12-18 4091
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[android-goldfish:android-3.18 93/96] drivers/edac/edac_mc_sysfs.c:324:1: sparse: sparse: symbol 'dev_attr_legacy_ch6_dimm_label' was not declared. Should it be
by kernel test robot
tree: https://android.googlesource.com/kernel/goldfish android-3.18
head: 3e6efc4b219c9312d09eabafb5730f1ef5442a2b
commit: a788b724f44f6fef7e3d77966ee1559ed770c5fa [93/96] EDAC: Correct channel count limit
config: i386-randconfig-s002-20210101 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
git fetch --no-tags android-goldfish android-3.18
git checkout a788b724f44f6fef7e3d77966ee1559ed770c5fa
# 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>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/edac/edac_mc_sysfs.c:324:1: sparse: sparse: symbol 'dev_attr_legacy_ch6_dimm_label' was not declared. Should it be static?
>> drivers/edac/edac_mc_sysfs.c:326:1: sparse: sparse: symbol 'dev_attr_legacy_ch7_dimm_label' was not declared. Should it be static?
>> drivers/edac/edac_mc_sysfs.c:354:1: sparse: sparse: symbol 'dev_attr_legacy_ch6_ce_count' was not declared. Should it be static?
>> drivers/edac/edac_mc_sysfs.c:356:1: sparse: sparse: symbol 'dev_attr_legacy_ch7_ce_count' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
fs/cifs/inode.c:2882:1: warning: stack frame size of 2096 bytes in function 'cifs_setattr'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f6e1ea19649216156576aeafa784e3b4cee45549
commit: c6cc4c5a72505a0ecefc9b413f16bec512f38078 cifs: handle -EINTR in cifs_setattr
date: 3 months ago
config: powerpc-randconfig-r036-20210101 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6b316febb4388764789677f81f03aff373ec35b2)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# 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 c6cc4c5a72505a0ecefc9b413f16bec512f38078
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 file included from fs/cifs/inode.c:24:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:116:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/cifs/inode.c:24:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:118:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/cifs/inode.c:24:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:120:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/cifs/inode.c:24:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:122:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/cifs/inode.c:24:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:124:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> fs/cifs/inode.c:2882:1: warning: stack frame size of 2096 bytes in function 'cifs_setattr' [-Wframe-larger-than=]
cifs_setattr(struct dentry *direntry, struct iattr *attrs)
^
13 warnings generated.
vim +/cifs_setattr +2882 fs/cifs/inode.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 2880
0510eeb7367aca0 Jeff Layton 2008-08-02 2881 int
0510eeb7367aca0 Jeff Layton 2008-08-02 @2882 cifs_setattr(struct dentry *direntry, struct iattr *attrs)
0510eeb7367aca0 Jeff Layton 2008-08-02 2883 {
fc64005c93090c0 Al Viro 2016-04-10 2884 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
96daf2b09178d8e Steve French 2011-05-27 2885 struct cifs_tcon *pTcon = cifs_sb_master_tcon(cifs_sb);
c6cc4c5a72505a0 Ronnie Sahlberg 2020-10-09 2886 int rc, retries = 0;
0510eeb7367aca0 Jeff Layton 2008-08-02 2887
c6cc4c5a72505a0 Ronnie Sahlberg 2020-10-09 2888 do {
0510eeb7367aca0 Jeff Layton 2008-08-02 2889 if (pTcon->unix_ext)
c6cc4c5a72505a0 Ronnie Sahlberg 2020-10-09 2890 rc = cifs_setattr_unix(direntry, attrs);
c6cc4c5a72505a0 Ronnie Sahlberg 2020-10-09 2891 else
c6cc4c5a72505a0 Ronnie Sahlberg 2020-10-09 2892 rc = cifs_setattr_nounix(direntry, attrs);
c6cc4c5a72505a0 Ronnie Sahlberg 2020-10-09 2893 retries++;
c6cc4c5a72505a0 Ronnie Sahlberg 2020-10-09 2894 } while (is_retryable_error(rc) && retries < 2);
0510eeb7367aca0 Jeff Layton 2008-08-02 2895
0510eeb7367aca0 Jeff Layton 2008-08-02 2896 /* BB: add cifs_setattr_legacy for really old servers */
c6cc4c5a72505a0 Ronnie Sahlberg 2020-10-09 2897 return rc;
0510eeb7367aca0 Jeff Layton 2008-08-02 2898 }
0510eeb7367aca0 Jeff Layton 2008-08-02 2899
:::::: The code at line 2882 was first introduced by commit
:::::: 0510eeb7367aca017c6320d04cfd9cbc3b5dd992 turn cifs_setattr into a multiplexor that calls the correct function
:::::: TO: Jeff Layton <jlayton(a)redhat.com>
:::::: CC: Steve French <sfrench(a)us.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months