[ti:ti-rt-linux-5.10.y 7475/10054] net/core/sock.c:3179:28: error: use of undeclared identifier 'SCM_REDUNDANT'
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 890b86772cff397e32c66ea6528fe8702d7e44a5
commit: 89b354a68fd094a218c79af743e60299045f33b5 [7475/10054] net: socket: Pass on redundant net info to sock_recv_errqueue
config: mips-randconfig-r012-20211019 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout 89b354a68fd094a218c79af743e60299045f33b5
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash net/core/
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 >>):
In file included from net/core/sock.c:91:
In file included from include/linux/errqueue.h:6:
In file included from include/net/ip.h:28:
In file included from include/net/inet_sock.h:22:
include/net/sock.h:2525:29: error: use of undeclared identifier 'SCM_REDUNDANT'
put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
^
>> net/core/sock.c:3179:28: error: use of undeclared identifier 'SCM_REDUNDANT'
put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
^
2 errors generated.
vim +/SCM_REDUNDANT +3179 net/core/sock.c
3153
3154 int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
3155 int level, int type)
3156 {
3157 struct sock_exterr_skb *serr;
3158 struct sk_buff *skb;
3159 int copied, err;
3160 struct skb_redundant_info *sred;
3161
3162 err = -EAGAIN;
3163 skb = sock_dequeue_err_skb(sk);
3164 if (skb == NULL)
3165 goto out;
3166
3167 copied = skb->len;
3168 if (copied > len) {
3169 msg->msg_flags |= MSG_TRUNC;
3170 copied = len;
3171 }
3172 err = skb_copy_datagram_msg(skb, 0, msg, copied);
3173 if (err)
3174 goto out_free_skb;
3175
3176 sock_recv_timestamp(msg, sk, skb);
3177
3178 sred = skb_redinfo(skb);
> 3179 put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
3180
3181 serr = SKB_EXT_ERR(skb);
3182 put_cmsg(msg, level, type, sizeof(serr->ee), &serr->ee);
3183
3184 msg->msg_flags |= MSG_ERRQUEUE;
3185 err = copied;
3186
3187 out_free_skb:
3188 kfree_skb(skb);
3189 out:
3190 return err;
3191 }
3192 EXPORT_SYMBOL(sock_recv_errqueue);
3193
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
[ti:ti-rt-linux-5.10.y 7474/10054] net/socket.c:861:5: error: use of undeclared identifier 'SCM_RED_TIMESTAMPING'
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 890b86772cff397e32c66ea6528fe8702d7e44a5
commit: b98f7ec080e0de442e0be84994ec8d26bdc39eeb [7474/10054] net: socket: Forward extra timestamp of received skb to user space
config: mips-randconfig-r012-20211019 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout b98f7ec080e0de442e0be84994ec8d26bdc39eeb
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
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 >>):
In file included from net/socket.c:95:
In file included from include/net/cls_cgroup.h:14:
include/net/sock.h:2525:29: error: use of undeclared identifier 'SCM_REDUNDANT'
put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
^
>> net/socket.c:861:5: error: use of undeclared identifier 'SCM_RED_TIMESTAMPING'
SCM_RED_TIMESTAMPING, sizeof(tss), &tss);
^
net/socket.c:2174:6: warning: variable 'max_optlen' set but not used [-Wunused-but-set-variable]
int max_optlen;
^
1 warning and 2 errors generated.
vim +/SCM_RED_TIMESTAMPING +861 net/socket.c
845
846 void __sock_recv_redinfo_timestamp(struct msghdr *msg, struct sock *sk,
847 struct sk_buff *skb)
848 {
849 struct scm_timestamping_internal tss;
850 int empty = 1;
851 struct skb_shared_hwtstamps *red_shhwtstamps =
852 skb_redinfo_hwtstamps(skb);
853
854 if (red_shhwtstamps &&
855 (sk->sk_tsflags & SOF_TIMESTAMPING_RAW_HARDWARE) &&
856 ktime_to_timespec64_cond(red_shhwtstamps->hwtstamp, tss.ts + 2))
857 empty = 0;
858
859 if (!empty)
860 put_cmsg(msg, SOL_SOCKET,
> 861 SCM_RED_TIMESTAMPING, sizeof(tss), &tss);
862 }
863 EXPORT_SYMBOL_GPL(__sock_recv_redinfo_timestamp);
864
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
quality essay
by jstane961@gmail.com
Hello! I love mathematics very much, it is easy and simple for me to understand and solve tascs. But now I'm writing <a href="http://quality-essay.com">quality essay</a>and
I'm stuck in math. I'm so ashamed! In general, I need to draw a grid of rotated cubes in orthoprojection, so that my work was more diverse and interesting. I can't calculate the rotation of a cube so that it is perfectly isometric. Can anyone help? I will send a photo to the mail.
11 months
Re: [PATCH -next v3 4/5] ext4: simplify read_mmp_block fucntion
by kernel test robot
Hi Ye,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20211018]
url: https://github.com/0day-ci/linux/commits/Ye-Bin/Fix-some-issues-about-mmp...
base: 60e8840126bdcb60bccef74c3f962742183c681f
config: i386-randconfig-a001-20211019 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b37efed957ed0a0193d80020aefd55cb587dfc1f)
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/0f118633b71dacebbf7b01cd9ce4a2ed5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ye-Bin/Fix-some-issues-about-mmp/20211019-143859
git checkout 0f118633b71dacebbf7b01cd9ce4a2ed5d3aad0e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/ext4/mmp.c:124:15: warning: variable 'mmp_block' set but not used [-Wunused-but-set-variable]
ext4_fsblk_t mmp_block;
^
1 warning generated.
vim +/mmp_block +124 fs/ext4/mmp.c
c5e06d101aaf72 Johann Lombardi 2011-05-24 114
c5e06d101aaf72 Johann Lombardi 2011-05-24 115 /*
c5e06d101aaf72 Johann Lombardi 2011-05-24 116 * kmmpd will update the MMP sequence every s_mmp_update_interval seconds
c5e06d101aaf72 Johann Lombardi 2011-05-24 117 */
c5e06d101aaf72 Johann Lombardi 2011-05-24 118 static int kmmpd(void *data)
c5e06d101aaf72 Johann Lombardi 2011-05-24 119 {
618f003199c618 Pavel Skripkin 2021-04-30 120 struct super_block *sb = (struct super_block *) data;
c5e06d101aaf72 Johann Lombardi 2011-05-24 121 struct ext4_super_block *es = EXT4_SB(sb)->s_es;
618f003199c618 Pavel Skripkin 2021-04-30 122 struct buffer_head *bh = EXT4_SB(sb)->s_mmp_bh;
c5e06d101aaf72 Johann Lombardi 2011-05-24 123 struct mmp_struct *mmp;
c5e06d101aaf72 Johann Lombardi 2011-05-24 @124 ext4_fsblk_t mmp_block;
2b19579c262011 Ye Bin 2021-10-19 125 u32 seq;
c5e06d101aaf72 Johann Lombardi 2011-05-24 126 unsigned long failed_writes = 0;
c5e06d101aaf72 Johann Lombardi 2011-05-24 127 int mmp_update_interval = le16_to_cpu(es->s_mmp_update_interval);
c5e06d101aaf72 Johann Lombardi 2011-05-24 128 unsigned mmp_check_interval;
c5e06d101aaf72 Johann Lombardi 2011-05-24 129 unsigned long last_update_time;
c5e06d101aaf72 Johann Lombardi 2011-05-24 130 unsigned long diff;
70bae8f45abfe9 Ye Bin 2021-10-19 131 char nodename[EXT4_MMP_NODENAME_LEN];
b66541422824cf Ye Bin 2021-07-13 132 int retval = 0;
c5e06d101aaf72 Johann Lombardi 2011-05-24 133
c5e06d101aaf72 Johann Lombardi 2011-05-24 134 mmp_block = le64_to_cpu(es->s_mmp_block);
c5e06d101aaf72 Johann Lombardi 2011-05-24 135 mmp = (struct mmp_struct *)(bh->b_data);
af123b3718592a Arnd Bergmann 2018-07-29 136 mmp->mmp_time = cpu_to_le64(ktime_get_real_seconds());
2b19579c262011 Ye Bin 2021-10-19 137 seq = le32_to_cpu(mmp->mmp_seq);
c5e06d101aaf72 Johann Lombardi 2011-05-24 138 /*
c5e06d101aaf72 Johann Lombardi 2011-05-24 139 * Start with the higher mmp_check_interval and reduce it if
c5e06d101aaf72 Johann Lombardi 2011-05-24 140 * the MMP block is being updated on time.
c5e06d101aaf72 Johann Lombardi 2011-05-24 141 */
c5e06d101aaf72 Johann Lombardi 2011-05-24 142 mmp_check_interval = max(EXT4_MMP_CHECK_MULT * mmp_update_interval,
c5e06d101aaf72 Johann Lombardi 2011-05-24 143 EXT4_MMP_MIN_CHECK_INTERVAL);
c5e06d101aaf72 Johann Lombardi 2011-05-24 144 mmp->mmp_check_interval = cpu_to_le16(mmp_check_interval);
14c9ca0583eee8 Andreas Dilger 2020-01-26 145 BUILD_BUG_ON(sizeof(mmp->mmp_bdevname) < BDEVNAME_SIZE);
c5e06d101aaf72 Johann Lombardi 2011-05-24 146 bdevname(bh->b_bdev, mmp->mmp_bdevname);
c5e06d101aaf72 Johann Lombardi 2011-05-24 147
70bae8f45abfe9 Ye Bin 2021-10-19 148 memcpy(nodename, init_utsname()->nodename, sizeof(nodename));
70bae8f45abfe9 Ye Bin 2021-10-19 149 memcpy(mmp->mmp_nodename, nodename, sizeof(mmp->mmp_nodename));
c5e06d101aaf72 Johann Lombardi 2011-05-24 150
61bb4a1c417e5b Theodore Ts'o 2021-07-02 151 while (!kthread_should_stop() && !sb_rdonly(sb)) {
61bb4a1c417e5b Theodore Ts'o 2021-07-02 152 if (!ext4_has_feature_mmp(sb)) {
61bb4a1c417e5b Theodore Ts'o 2021-07-02 153 ext4_warning(sb, "kmmpd being stopped since MMP feature"
61bb4a1c417e5b Theodore Ts'o 2021-07-02 154 " has been disabled.");
61bb4a1c417e5b Theodore Ts'o 2021-07-02 155 goto wait_to_exit;
61bb4a1c417e5b Theodore Ts'o 2021-07-02 156 }
c5e06d101aaf72 Johann Lombardi 2011-05-24 157 if (++seq > EXT4_MMP_SEQ_MAX)
c5e06d101aaf72 Johann Lombardi 2011-05-24 158 seq = 1;
c5e06d101aaf72 Johann Lombardi 2011-05-24 159
c5e06d101aaf72 Johann Lombardi 2011-05-24 160 mmp->mmp_seq = cpu_to_le32(seq);
af123b3718592a Arnd Bergmann 2018-07-29 161 mmp->mmp_time = cpu_to_le64(ktime_get_real_seconds());
c5e06d101aaf72 Johann Lombardi 2011-05-24 162 last_update_time = jiffies;
c5e06d101aaf72 Johann Lombardi 2011-05-24 163
5c359a47e7d999 Darrick J. Wong 2012-04-29 164 retval = write_mmp_block(sb, bh);
c5e06d101aaf72 Johann Lombardi 2011-05-24 165 /*
c5e06d101aaf72 Johann Lombardi 2011-05-24 166 * Don't spew too many error messages. Print one every
c5e06d101aaf72 Johann Lombardi 2011-05-24 167 * (s_mmp_update_interval * 60) seconds.
c5e06d101aaf72 Johann Lombardi 2011-05-24 168 */
bdfc230f33a9da Nikitas Angelinas 2011-10-18 169 if (retval) {
878520ac45f9f6 Theodore Ts'o 2019-11-19 170 if ((failed_writes % 60) == 0) {
54d3adbc29f0c7 Theodore Ts'o 2020-03-28 171 ext4_error_err(sb, -retval,
54d3adbc29f0c7 Theodore Ts'o 2020-03-28 172 "Error writing to MMP block");
878520ac45f9f6 Theodore Ts'o 2019-11-19 173 }
c5e06d101aaf72 Johann Lombardi 2011-05-24 174 failed_writes++;
c5e06d101aaf72 Johann Lombardi 2011-05-24 175 }
c5e06d101aaf72 Johann Lombardi 2011-05-24 176
c5e06d101aaf72 Johann Lombardi 2011-05-24 177 diff = jiffies - last_update_time;
c5e06d101aaf72 Johann Lombardi 2011-05-24 178 if (diff < mmp_update_interval * HZ)
c5e06d101aaf72 Johann Lombardi 2011-05-24 179 schedule_timeout_interruptible(mmp_update_interval *
c5e06d101aaf72 Johann Lombardi 2011-05-24 180 HZ - diff);
c5e06d101aaf72 Johann Lombardi 2011-05-24 181
c5e06d101aaf72 Johann Lombardi 2011-05-24 182 /*
c5e06d101aaf72 Johann Lombardi 2011-05-24 183 * We need to make sure that more than mmp_check_interval
c5e06d101aaf72 Johann Lombardi 2011-05-24 184 * seconds have not passed since writing. If that has happened
c5e06d101aaf72 Johann Lombardi 2011-05-24 185 * we need to check if the MMP block is as we left it.
c5e06d101aaf72 Johann Lombardi 2011-05-24 186 */
c5e06d101aaf72 Johann Lombardi 2011-05-24 187 diff = jiffies - last_update_time;
c5e06d101aaf72 Johann Lombardi 2011-05-24 188 if (diff > mmp_check_interval * HZ) {
c5e06d101aaf72 Johann Lombardi 2011-05-24 189 struct buffer_head *bh_check = NULL;
c5e06d101aaf72 Johann Lombardi 2011-05-24 190 struct mmp_struct *mmp_check;
c5e06d101aaf72 Johann Lombardi 2011-05-24 191
0f118633b71dac Ye Bin 2021-10-19 192 retval = read_mmp_block(sb, bh_check);
c5e06d101aaf72 Johann Lombardi 2011-05-24 193 if (retval) {
54d3adbc29f0c7 Theodore Ts'o 2020-03-28 194 ext4_error_err(sb, -retval,
54d3adbc29f0c7 Theodore Ts'o 2020-03-28 195 "error reading MMP data: %d",
c5e06d101aaf72 Johann Lombardi 2011-05-24 196 retval);
61bb4a1c417e5b Theodore Ts'o 2021-07-02 197 goto wait_to_exit;
c5e06d101aaf72 Johann Lombardi 2011-05-24 198 }
c5e06d101aaf72 Johann Lombardi 2011-05-24 199
c5e06d101aaf72 Johann Lombardi 2011-05-24 200 mmp_check = (struct mmp_struct *)(bh_check->b_data);
70bae8f45abfe9 Ye Bin 2021-10-19 201 if (seq != mmp_check->mmp_seq ||
70bae8f45abfe9 Ye Bin 2021-10-19 202 memcmp(nodename, mmp_check->mmp_nodename,
c5e06d101aaf72 Johann Lombardi 2011-05-24 203 sizeof(mmp->mmp_nodename))) {
c5e06d101aaf72 Johann Lombardi 2011-05-24 204 dump_mmp_msg(sb, mmp_check,
c5e06d101aaf72 Johann Lombardi 2011-05-24 205 "Error while updating MMP info. "
c5e06d101aaf72 Johann Lombardi 2011-05-24 206 "The filesystem seems to have been"
c5e06d101aaf72 Johann Lombardi 2011-05-24 207 " multiply mounted.");
54d3adbc29f0c7 Theodore Ts'o 2020-03-28 208 ext4_error_err(sb, EBUSY, "abort");
0304688676bdfc vikram.jadhav07 2016-03-13 209 put_bh(bh_check);
0304688676bdfc vikram.jadhav07 2016-03-13 210 retval = -EBUSY;
61bb4a1c417e5b Theodore Ts'o 2021-07-02 211 goto wait_to_exit;
c5e06d101aaf72 Johann Lombardi 2011-05-24 212 }
c5e06d101aaf72 Johann Lombardi 2011-05-24 213 put_bh(bh_check);
c5e06d101aaf72 Johann Lombardi 2011-05-24 214 }
c5e06d101aaf72 Johann Lombardi 2011-05-24 215
c5e06d101aaf72 Johann Lombardi 2011-05-24 216 /*
c5e06d101aaf72 Johann Lombardi 2011-05-24 217 * Adjust the mmp_check_interval depending on how much time
c5e06d101aaf72 Johann Lombardi 2011-05-24 218 * it took for the MMP block to be written.
c5e06d101aaf72 Johann Lombardi 2011-05-24 219 */
c5e06d101aaf72 Johann Lombardi 2011-05-24 220 mmp_check_interval = max(min(EXT4_MMP_CHECK_MULT * diff / HZ,
c5e06d101aaf72 Johann Lombardi 2011-05-24 221 EXT4_MMP_MAX_CHECK_INTERVAL),
c5e06d101aaf72 Johann Lombardi 2011-05-24 222 EXT4_MMP_MIN_CHECK_INTERVAL);
c5e06d101aaf72 Johann Lombardi 2011-05-24 223 mmp->mmp_check_interval = cpu_to_le16(mmp_check_interval);
c5e06d101aaf72 Johann Lombardi 2011-05-24 224 }
c5e06d101aaf72 Johann Lombardi 2011-05-24 225
c5e06d101aaf72 Johann Lombardi 2011-05-24 226 /*
c5e06d101aaf72 Johann Lombardi 2011-05-24 227 * Unmount seems to be clean.
c5e06d101aaf72 Johann Lombardi 2011-05-24 228 */
c5e06d101aaf72 Johann Lombardi 2011-05-24 229 mmp->mmp_seq = cpu_to_le32(EXT4_MMP_SEQ_CLEAN);
af123b3718592a Arnd Bergmann 2018-07-29 230 mmp->mmp_time = cpu_to_le64(ktime_get_real_seconds());
c5e06d101aaf72 Johann Lombardi 2011-05-24 231
5c359a47e7d999 Darrick J. Wong 2012-04-29 232 retval = write_mmp_block(sb, bh);
c5e06d101aaf72 Johann Lombardi 2011-05-24 233
61bb4a1c417e5b Theodore Ts'o 2021-07-02 234 wait_to_exit:
61bb4a1c417e5b Theodore Ts'o 2021-07-02 235 while (!kthread_should_stop()) {
61bb4a1c417e5b Theodore Ts'o 2021-07-02 236 set_current_state(TASK_INTERRUPTIBLE);
61bb4a1c417e5b Theodore Ts'o 2021-07-02 237 if (!kthread_should_stop())
61bb4a1c417e5b Theodore Ts'o 2021-07-02 238 schedule();
61bb4a1c417e5b Theodore Ts'o 2021-07-02 239 }
61bb4a1c417e5b Theodore Ts'o 2021-07-02 240 set_current_state(TASK_RUNNING);
c5e06d101aaf72 Johann Lombardi 2011-05-24 241 return retval;
c5e06d101aaf72 Johann Lombardi 2011-05-24 242 }
c5e06d101aaf72 Johann Lombardi 2011-05-24 243
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
Re: [PATCH v3 2/2] firmware: arm_scmi: Add optee transport
by kernel test robot
Hi Etienne,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linux/master soc/for-next rockchip/for-next arm64/for-next/core shawnguo/for-next linus/master v5.15-rc6 next-20211018]
[cannot apply to arm/for-next keystone/next xilinx-xlnx/master]
[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/Etienne-Carriere/dt-bindings-arm...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-randconfig-r026-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/7dff6aa629cdf70e8001dcc7b565d134c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Etienne-Carriere/dt-bindings-arm-Add-OP-TEE-transport-for-SCMI/20211018-194259
git checkout 7dff6aa629cdf70e8001dcc7b565d134c61e6dab
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash
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/firmware/arm_scmi/optee.c:233:27: error: use of undeclared identifier 'scmi_optee_desc'; did you mean 'scmi_virtio_desc'?
const size_t msg_size = scmi_optee_desc.max_msg_size;
^~~~~~~~~~~~~~~
scmi_virtio_desc
drivers/firmware/arm_scmi/common.h:422:31: note: 'scmi_virtio_desc' declared here
extern const struct scmi_desc scmi_virtio_desc;
^
drivers/firmware/arm_scmi/optee.c:266:26: error: use of undeclared identifier 'scmi_optee_desc'; did you mean 'scmi_virtio_desc'?
const size_t msg_size = scmi_optee_desc.max_msg_size;
^~~~~~~~~~~~~~~
scmi_virtio_desc
drivers/firmware/arm_scmi/common.h:422:31: note: 'scmi_virtio_desc' declared here
extern const struct scmi_desc scmi_virtio_desc;
^
2 errors generated.
vim +233 drivers/firmware/arm_scmi/optee.c
221
222 static int invoke_process_smt_channel(struct optee_channel *channel)
223 {
224 struct tee_ioctl_invoke_arg arg = { };
225 struct tee_param param[2] = { };
226 int ret;
227
228 arg.session = channel->tee_session;
229 param[0].attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT;
230 param[0].u.value.a = channel->channel_id;
231
232 if (channel->tee_shm) {
> 233 const size_t msg_size = scmi_optee_desc.max_msg_size;
234
235 param[1].attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT;
236 param[1].u.memref.shm = channel->tee_shm;
237 param[1].u.memref.size = msg_size;
238 arg.num_params = 2;
239 arg.func = PTA_SCMI_CMD_PROCESS_SMT_CHANNEL_MESSAGE;
240 } else {
241 arg.num_params = 1;
242 arg.func = PTA_SCMI_CMD_PROCESS_SMT_CHANNEL;
243 }
244
245 ret = tee_client_invoke_func(optee_private->tee_ctx, &arg, param);
246 if (ret < 0 || arg.ret) {
247 dev_err(optee_private->dev, "Failed on channel %u: %d / %#x\n",
248 channel->channel_id, ret, arg.ret);
249
250 return -EIO;
251 }
252
253 return 0;
254 }
255
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
Re: [PATCH v4] spi: spi-geni-qcom: Add support for GPI dma
by kernel test robot
Hi Vinod,
I love your patch! Perhaps something to improve:
[auto build test WARNING on broonie-spi/for-next]
[also build test WARNING on v5.15-rc6 next-20211019]
[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/Vinod-Koul/spi-spi-geni-qcom-Add...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: i386-buildonly-randconfig-r005-20211019 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b37efed957ed0a0193d80020aefd55cb587dfc1f)
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/4328916194e339d055a1d4c02170602b7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vinod-Koul/spi-spi-geni-qcom-Add-support-for-GPI-dma/20211019-140206
git checkout 4328916194e339d055a1d4c02170602b775ce334
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/spi/spi-geni-qcom.c:401:41: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
peripheral.loopback_en = spi_slv->mode && SPI_LOOP;
^ ~~~~~~~~
drivers/spi/spi-geni-qcom.c:401:41: note: use '&' for a bitwise operation
peripheral.loopback_en = spi_slv->mode && SPI_LOOP;
^~
&
drivers/spi/spi-geni-qcom.c:401:41: note: remove constant to silence this warning
peripheral.loopback_en = spi_slv->mode && SPI_LOOP;
~^~~~~~~~~~~
drivers/spi/spi-geni-qcom.c:402:44: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
peripheral.clock_pol_high = spi_slv->mode && SPI_CPOL;
^ ~~~~~~~~
drivers/spi/spi-geni-qcom.c:402:44: note: use '&' for a bitwise operation
peripheral.clock_pol_high = spi_slv->mode && SPI_CPOL;
^~
&
drivers/spi/spi-geni-qcom.c:402:44: note: remove constant to silence this warning
peripheral.clock_pol_high = spi_slv->mode && SPI_CPOL;
~^~~~~~~~~~~
2 warnings generated.
vim +401 drivers/spi/spi-geni-qcom.c
365
366 static int setup_gsi_xfer(struct spi_transfer *xfer, struct spi_geni_master *mas,
367 struct spi_device *spi_slv, struct spi_master *spi)
368 {
369 unsigned long flags = DMA_PREP_INTERRUPT | DMA_CTRL_ACK;
370 struct dma_slave_config config = {};
371 struct gpi_spi_config peripheral = {};
372 struct dma_async_tx_descriptor *tx_desc, *rx_desc;
373 int ret;
374
375 config.peripheral_config = &peripheral;
376 config.peripheral_size = sizeof(peripheral);
377 peripheral.set_config = true;
378
379 if (xfer->bits_per_word != mas->cur_bits_per_word ||
380 xfer->speed_hz != mas->cur_speed_hz) {
381 mas->cur_bits_per_word = xfer->bits_per_word;
382 mas->cur_speed_hz = xfer->speed_hz;
383 }
384
385 if (xfer->tx_buf && xfer->rx_buf) {
386 peripheral.cmd = SPI_DUPLEX;
387 } else if (xfer->tx_buf) {
388 peripheral.cmd = SPI_TX;
389 peripheral.rx_len = 0;
390 } else if (xfer->rx_buf) {
391 peripheral.cmd = SPI_RX;
392 if (!(mas->cur_bits_per_word % MIN_WORD_LEN)) {
393 peripheral.rx_len = ((xfer->len << 3) / mas->cur_bits_per_word);
394 } else {
395 int bytes_per_word = (mas->cur_bits_per_word / BITS_PER_BYTE) + 1;
396
397 peripheral.rx_len = (xfer->len / bytes_per_word);
398 }
399 }
400
> 401 peripheral.loopback_en = spi_slv->mode && SPI_LOOP;
402 peripheral.clock_pol_high = spi_slv->mode && SPI_CPOL;
403 peripheral.data_pol_high = spi_slv->mode && SPI_CPHA;
404 peripheral.cs = spi_slv->chip_select;
405 peripheral.pack_en = true;
406 peripheral.word_len = xfer->bits_per_word - MIN_WORD_LEN;
407
408 ret = get_spi_clk_cfg(mas->cur_speed_hz, mas,
409 &peripheral.clk_src, &peripheral.clk_div);
410 if (ret) {
411 dev_err(mas->dev, "Err in get_spi_clk_cfg() :%d\n", ret);
412 return ret;
413 }
414
415 if (!xfer->cs_change) {
416 if (!list_is_last(&xfer->transfer_list, &spi->cur_msg->transfers))
417 peripheral.fragmentation = FRAGMENTATION;
418 }
419
420 if (peripheral.cmd & SPI_RX) {
421 dmaengine_slave_config(mas->rx, &config);
422 rx_desc = dmaengine_prep_slave_sg(mas->rx, xfer->rx_sg.sgl, xfer->rx_sg.nents,
423 DMA_DEV_TO_MEM, flags);
424 if (!rx_desc) {
425 dev_err(mas->dev, "Err setting up rx desc\n");
426 return -EIO;
427 }
428 }
429
430 /*
431 * Prepare the TX always, even for RX or tx_buf being null, we would
432 * need TX to be prepared per GSI spec
433 */
434 dmaengine_slave_config(mas->tx, &config);
435 tx_desc = dmaengine_prep_slave_sg(mas->tx, xfer->tx_sg.sgl, xfer->tx_sg.nents,
436 DMA_MEM_TO_DEV, flags);
437 if (!tx_desc) {
438 dev_err(mas->dev, "Err setting up tx desc\n");
439 return -EIO;
440 }
441
442 tx_desc->callback_result = spi_gsi_callback_result;
443 tx_desc->callback_param = spi;
444
445 if (peripheral.cmd & SPI_RX)
446 dmaengine_submit(rx_desc);
447 dmaengine_submit(tx_desc);
448
449 if (peripheral.cmd & SPI_RX)
450 dma_async_issue_pending(mas->rx);
451
452 dma_async_issue_pending(mas->tx);
453 return 1;
454 }
455
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
[linux-next:master 4131/8410] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7c832d2f9b959e3181370c8b0dacaf9efe13fc05
commit: 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75 [4131/8410] media: mtk-vcodec: vdec: support stateless API
config: riscv-randconfig-c006-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 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 fetch --no-tags linux-next master
git checkout 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct vdec_fb *pfb = &framebuf->frame_buffer;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~
vim +/pfb +133 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c
8cdc3794b2e34b Yunfei Dong 2021-08-06 127
8cdc3794b2e34b Yunfei Dong 2021-08-06 128 static struct vdec_fb *vdec_get_cap_buffer(struct mtk_vcodec_ctx *ctx,
8cdc3794b2e34b Yunfei Dong 2021-08-06 129 struct vb2_v4l2_buffer *vb2_v4l2)
8cdc3794b2e34b Yunfei Dong 2021-08-06 130 {
8cdc3794b2e34b Yunfei Dong 2021-08-06 131 struct mtk_video_dec_buf *framebuf =
8cdc3794b2e34b Yunfei Dong 2021-08-06 132 container_of(vb2_v4l2, struct mtk_video_dec_buf, m2m_buf.vb);
8cdc3794b2e34b Yunfei Dong 2021-08-06 @133 struct vdec_fb *pfb = &framebuf->frame_buffer;
8cdc3794b2e34b Yunfei Dong 2021-08-06 134 struct vb2_buffer *dst_buf = &vb2_v4l2->vb2_buf;
8cdc3794b2e34b Yunfei Dong 2021-08-06 135
8cdc3794b2e34b Yunfei Dong 2021-08-06 @136 pfb = &framebuf->frame_buffer;
8cdc3794b2e34b Yunfei Dong 2021-08-06 137 pfb->base_y.va = NULL;
8cdc3794b2e34b Yunfei Dong 2021-08-06 138 pfb->base_y.dma_addr = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
8cdc3794b2e34b Yunfei Dong 2021-08-06 139 pfb->base_y.size = ctx->q_data[MTK_Q_DATA_DST].sizeimage[0];
8cdc3794b2e34b Yunfei Dong 2021-08-06 140
8cdc3794b2e34b Yunfei Dong 2021-08-06 141 if (ctx->q_data[MTK_Q_DATA_DST].fmt->num_planes == 2) {
8cdc3794b2e34b Yunfei Dong 2021-08-06 142 pfb->base_c.va = NULL;
8cdc3794b2e34b Yunfei Dong 2021-08-06 143 pfb->base_c.dma_addr =
8cdc3794b2e34b Yunfei Dong 2021-08-06 144 vb2_dma_contig_plane_dma_addr(dst_buf, 1);
8cdc3794b2e34b Yunfei Dong 2021-08-06 145 pfb->base_c.size = ctx->q_data[MTK_Q_DATA_DST].sizeimage[1];
8cdc3794b2e34b Yunfei Dong 2021-08-06 146 }
8cdc3794b2e34b Yunfei Dong 2021-08-06 147 mtk_v4l2_debug(1, "id=%d Framebuf pfb=%p VA=%p Y_DMA=%pad C_DMA=%pad Size=%zx frame_count = %d",
8cdc3794b2e34b Yunfei Dong 2021-08-06 148 dst_buf->index, pfb, pfb->base_y.va, &pfb->base_y.dma_addr,
8cdc3794b2e34b Yunfei Dong 2021-08-06 149 &pfb->base_c.dma_addr, pfb->base_y.size, ctx->decoded_frame_cnt);
8cdc3794b2e34b Yunfei Dong 2021-08-06 150
8cdc3794b2e34b Yunfei Dong 2021-08-06 151 return pfb;
8cdc3794b2e34b Yunfei Dong 2021-08-06 152 }
8cdc3794b2e34b Yunfei Dong 2021-08-06 153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
[djwong-xfs:vectorized-scrub 196/308] fs/xfs/libxfs/xfs_alloc.c:2564:3: warning: Value stored to 'agno' is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git vectorized-scrub
head: d404c6b945070ba14d8db1ee79daa5df149877df
commit: 13631516b02090441a5c788ae69b076009c44418 [196/308] xfs: support logging EFIs for realtime extents
config: arm-randconfig-c002-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 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 fetch --no-tags djwong-xfs vectorized-scrub
git checkout 13631516b02090441a5c788ae69b076009c44418
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> fs/xfs/libxfs/xfs_alloc.c:2564:3: warning: Value stored to 'agno' is never read [clang-analyzer-deadcode.DeadStores]
agno = 0;
^ ~
>> fs/xfs/libxfs/xfs_alloc.c:2565:3: warning: Value stored to 'agbno' is never read [clang-analyzer-deadcode.DeadStores]
agbno = bno;
^ ~~~
vim +/agno +2564 fs/xfs/libxfs/xfs_alloc.c
f8f2835a9cf300 Brian Foster 2018-05-07 2540
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2541 /*
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2542 * Add the extent to the list of extents to be free at transaction end.
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2543 * The list is maintained sorted (by block number).
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2544 */
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2545 void
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2546 xfs_free_extent_later(
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2547 struct xfs_trans *tp,
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2548 xfs_fsblock_t bno,
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2549 xfs_filblks_t len,
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2550 const struct xfs_owner_info *oinfo,
30bb91bc0f3b93 Darrick J. Wong 2021-09-01 2551 unsigned int flags)
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2552 {
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2553 struct xfs_extent_free_item *new; /* new element */
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2554 #ifdef DEBUG
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2555 struct xfs_mount *mp = tp->t_mountp;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2556 xfs_agnumber_t agno;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2557 xfs_agblock_t agbno;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2558
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2559 ASSERT(bno != NULLFSBLOCK);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2560 ASSERT(len > 0);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2561 ASSERT(len <= MAXEXTLEN);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2562 ASSERT(!isnullstartblock(bno));
13631516b02090 Darrick J. Wong 2021-09-01 2563 if (flags & XFS_FREE_EXTENT_REALTIME) {
13631516b02090 Darrick J. Wong 2021-09-01 @2564 agno = 0;
13631516b02090 Darrick J. Wong 2021-09-01 @2565 agbno = bno;
13631516b02090 Darrick J. Wong 2021-09-01 2566 ASSERT(bno < mp->m_sb.sb_rblocks);
13631516b02090 Darrick J. Wong 2021-09-01 2567 ASSERT(len <= mp->m_sb.sb_rblocks);
13631516b02090 Darrick J. Wong 2021-09-01 2568 ASSERT(bno + len <= mp->m_sb.sb_rblocks);
13631516b02090 Darrick J. Wong 2021-09-01 2569 } else {
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2570 agno = XFS_FSB_TO_AGNO(mp, bno);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2571 agbno = XFS_FSB_TO_AGBNO(mp, bno);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2572 ASSERT(agno < mp->m_sb.sb_agcount);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2573 ASSERT(agbno < mp->m_sb.sb_agblocks);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2574 ASSERT(len < mp->m_sb.sb_agblocks);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2575 ASSERT(agbno + len <= mp->m_sb.sb_agblocks);
13631516b02090 Darrick J. Wong 2021-09-01 2576 }
30bb91bc0f3b93 Darrick J. Wong 2021-09-01 2577 ASSERT(!(flags & ~XFS_FREE_EXTENT_ALL_FLAGS));
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2578 #endif
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2579 ASSERT(xfs_extent_free_item_zone != NULL);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2580
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2581 new = kmem_cache_alloc(xfs_extent_free_item_zone,
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2582 GFP_KERNEL | __GFP_NOFAIL);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2583 new->xefi_startblock = bno;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2584 new->xefi_blockcount = (xfs_extlen_t)len;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2585 if (oinfo)
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2586 new->xefi_oinfo = *oinfo;
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2587 else
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2588 new->xefi_oinfo = XFS_RMAP_OINFO_SKIP_UPDATE;
30bb91bc0f3b93 Darrick J. Wong 2021-09-01 2589 new->xefi_skip_discard = !!(flags & XFS_FREE_EXTENT_SKIP_DISCARD);
13631516b02090 Darrick J. Wong 2021-09-01 2590 new->xefi_realtime = !!(flags & XFS_FREE_EXTENT_REALTIME);
5262e94653712f Darrick J. Wong 2021-09-01 2591
5262e94653712f Darrick J. Wong 2021-09-01 2592 trace_xfs_extent_free_defer(tp->t_mountp, XFS_FREE_EXTENT_REGULAR,
5262e94653712f Darrick J. Wong 2021-09-01 2593 new);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2594 xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_FREE, &new->xefi_list);
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2595 }
0c34a6f15b5c3a Darrick J. Wong 2021-09-01 2596
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
Re: [PATCH v1 2/3] ACPI: PM: Fix sharing of wakeup power resources
by kernel test robot
Hi Rafael,
Thanks for your patch! Perhaps something to improve:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on linux/master linus/master v5.15-rc5 next-20211015]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Rafael-J-Wysocki/ACPI-PM-Address...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-c007-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6069a6a5049497a32a50a49661c2f4169078bdba)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/5e93f177b80cbc9b9ee6ffc15ff9ad0ad...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rafael-J-Wysocki/ACPI-PM-Address-issues-related-to-managing-wakeup-power-resources/20211016-010527
git checkout 5e93f177b80cbc9b9ee6ffc15ff9ad0ad23f2a7a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings:
>> drivers/acpi/power.c:739:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
return err;
^ ~~~
drivers/acpi/power.c:712:2: note: 'err' declared without an initial value
int err;
^~~~~~~
drivers/acpi/power.c:714:6: note: Assuming 'dev' is non-null
if (!dev || !dev->wakeup.flags.valid)
^~~~
drivers/acpi/power.c:714:6: note: Left side of '||' is false
drivers/acpi/power.c:714:14: note: Assuming field 'valid' is not equal to 0
if (!dev || !dev->wakeup.flags.valid)
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:714:2: note: Taking false branch
if (!dev || !dev->wakeup.flags.valid)
^
drivers/acpi/power.c:719:6: note: Assuming the condition is true
if (dev->wakeup.prepare_count++)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:719:2: note: Taking true branch
if (dev->wakeup.prepare_count++)
^
drivers/acpi/power.c:720:3: note: Control jumps to line 738
goto out;
^
drivers/acpi/power.c:739:2: note: Undefined or garbage value returned to caller
return err;
^ ~~~
vim +739 drivers/acpi/power.c
77e766099efc29 Rafael J. Wysocki 2008-07-07 703
^1da177e4c3f41 Linus Torvalds 2005-04-16 704 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 705 * Prepare a wakeup device, two steps (Ref ACPI 2.0:P229):
^1da177e4c3f41 Linus Torvalds 2005-04-16 706 * 1. Power on the power resources required for the wakeup device
77e766099efc29 Rafael J. Wysocki 2008-07-07 707 * 2. Execute _DSW (Device Sleep Wake) or (deprecated in ACPI 3.0) _PSW (Power
77e766099efc29 Rafael J. Wysocki 2008-07-07 708 * State Wake) for the device, if present
^1da177e4c3f41 Linus Torvalds 2005-04-16 709 */
77e766099efc29 Rafael J. Wysocki 2008-07-07 710 int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state)
^1da177e4c3f41 Linus Torvalds 2005-04-16 711 {
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 712 int err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 713
^1da177e4c3f41 Linus Torvalds 2005-04-16 714 if (!dev || !dev->wakeup.flags.valid)
77e766099efc29 Rafael J. Wysocki 2008-07-07 715 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 716
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 717 mutex_lock(&acpi_device_lock);
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 718
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 719 if (dev->wakeup.prepare_count++)
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 720 goto out;
0af4b8c4fb3119 Rafael J. Wysocki 2008-07-07 721
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 722 err = acpi_power_on_list(&dev->wakeup.resources);
993cbe595dda73 Rafael J. Wysocki 2013-01-17 723 if (err) {
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 724 dev_err(&dev->dev, "Cannot turn on wakeup power resources\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 725 dev->wakeup.flags.valid = 0;
b5d667eb392ed9 Rafael J. Wysocki 2013-02-23 726 goto out;
b5d667eb392ed9 Rafael J. Wysocki 2013-02-23 727 }
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 728
77e766099efc29 Rafael J. Wysocki 2008-07-07 729 /*
993cbe595dda73 Rafael J. Wysocki 2013-01-17 730 * Passing 3 as the third argument below means the device may be
993cbe595dda73 Rafael J. Wysocki 2013-01-17 731 * put into arbitrary power state afterward.
77e766099efc29 Rafael J. Wysocki 2008-07-07 732 */
0af4b8c4fb3119 Rafael J. Wysocki 2008-07-07 733 err = acpi_device_sleep_wake(dev, 1, sleep_state, 3);
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 734 if (err)
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 735 dev->wakeup.prepare_count = 0;
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 736
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 737 out:
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 738 mutex_unlock(&acpi_device_lock);
0af4b8c4fb3119 Rafael J. Wysocki 2008-07-07 @739 return err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 740 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 741
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months
Re: [PATCH v1 2/3] ACPI: PM: Fix sharing of wakeup power resources
by kernel test robot
Hi "Rafael,
I love your patch! Yet something to improve:
[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on linux/master linus/master v5.15-rc6 next-20211018]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Rafael-J-Wysocki/ACPI-PM-Address...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-buildonly-randconfig-r003-20211019 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/5e93f177b80cbc9b9ee6ffc15ff9ad0ad...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rafael-J-Wysocki/ACPI-PM-Address-issues-related-to-managing-wakeup-power-resources/20211016-010527
git checkout 5e93f177b80cbc9b9ee6ffc15ff9ad0ad23f2a7a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/acpi/power.c:719:6: error: variable 'err' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (dev->wakeup.prepare_count++)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:739:9: note: uninitialized use occurs here
return err;
^~~
drivers/acpi/power.c:719:2: note: remove the 'if' if its condition is always false
if (dev->wakeup.prepare_count++)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:712:9: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
drivers/acpi/power.c:764:6: error: variable 'err' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (!dev->wakeup.prepare_count)
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:789:9: note: uninitialized use occurs here
return err;
^~~
drivers/acpi/power.c:764:2: note: remove the 'if' if its condition is always false
if (!dev->wakeup.prepare_count)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:758:6: error: variable 'err' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (dev->wakeup.prepare_count > 1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:789:9: note: uninitialized use occurs here
return err;
^~~
drivers/acpi/power.c:758:2: note: remove the 'if' if its condition is always false
if (dev->wakeup.prepare_count > 1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/power.c:751:9: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
3 errors generated.
vim +719 drivers/acpi/power.c
77e766099efc29 Rafael J. Wysocki 2008-07-07 703
^1da177e4c3f41 Linus Torvalds 2005-04-16 704 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 705 * Prepare a wakeup device, two steps (Ref ACPI 2.0:P229):
^1da177e4c3f41 Linus Torvalds 2005-04-16 706 * 1. Power on the power resources required for the wakeup device
77e766099efc29 Rafael J. Wysocki 2008-07-07 707 * 2. Execute _DSW (Device Sleep Wake) or (deprecated in ACPI 3.0) _PSW (Power
77e766099efc29 Rafael J. Wysocki 2008-07-07 708 * State Wake) for the device, if present
^1da177e4c3f41 Linus Torvalds 2005-04-16 709 */
77e766099efc29 Rafael J. Wysocki 2008-07-07 710 int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state)
^1da177e4c3f41 Linus Torvalds 2005-04-16 711 {
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 712 int err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 713
^1da177e4c3f41 Linus Torvalds 2005-04-16 714 if (!dev || !dev->wakeup.flags.valid)
77e766099efc29 Rafael J. Wysocki 2008-07-07 715 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 716
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 717 mutex_lock(&acpi_device_lock);
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 718
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 @719 if (dev->wakeup.prepare_count++)
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 720 goto out;
0af4b8c4fb3119 Rafael J. Wysocki 2008-07-07 721
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 722 err = acpi_power_on_list(&dev->wakeup.resources);
993cbe595dda73 Rafael J. Wysocki 2013-01-17 723 if (err) {
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 724 dev_err(&dev->dev, "Cannot turn on wakeup power resources\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 725 dev->wakeup.flags.valid = 0;
b5d667eb392ed9 Rafael J. Wysocki 2013-02-23 726 goto out;
b5d667eb392ed9 Rafael J. Wysocki 2013-02-23 727 }
5e93f177b80cbc Rafael J. Wysocki 2021-10-15 728
77e766099efc29 Rafael J. Wysocki 2008-07-07 729 /*
993cbe595dda73 Rafael J. Wysocki 2013-01-17 730 * Passing 3 as the third argument below means the device may be
993cbe595dda73 Rafael J. Wysocki 2013-01-17 731 * put into arbitrary power state afterward.
77e766099efc29 Rafael J. Wysocki 2008-07-07 732 */
0af4b8c4fb3119 Rafael J. Wysocki 2008-07-07 733 err = acpi_device_sleep_wake(dev, 1, sleep_state, 3);
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 734 if (err)
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 735 dev->wakeup.prepare_count = 0;
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 736
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 737 out:
9b83ccd2f14f64 Rafael J. Wysocki 2009-09-08 738 mutex_unlock(&acpi_device_lock);
0af4b8c4fb3119 Rafael J. Wysocki 2008-07-07 739 return err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 740 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 741
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months