drivers/hid/hid-nintendo.c:403:29: error: unused variable 'JC_RUMBLE_ZERO_AMP_PKT_CNT'
by kernel test robot
Hi Jiri,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: daf11ca2b9f45a1ac6f90af5a61ee4db915110b1 HID: nintendo: fix -Werror build
date: 3 months ago
config: riscv-randconfig-c006-20220213 (https://download.01.org/0day-ci/archive/20220214/202202140250.xs4vEOjg-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 478c237e21b2c3a83e46f26fcbeb3876682f9b14)
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/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 daf11ca2b9f45a1ac6f90af5a61ee4db915110b1
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/mm/ drivers/clk/bcm/ drivers/gpu/drm/ drivers/hid/ kernel/sched/
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/hid/hid-nintendo.c:196:45: error: unused variable 'joycon_rumble_frequencies' [-Werror,-Wunused-const-variable]
static const struct joycon_rumble_freq_data joycon_rumble_frequencies[] = {
^
drivers/hid/hid-nintendo.c:254:44: error: unused variable 'joycon_rumble_amplitudes' [-Werror,-Wunused-const-variable]
static const struct joycon_rumble_amp_data joycon_rumble_amplitudes[] = {
^
drivers/hid/hid-nintendo.c:400:18: error: unused variable 'JC_RUMBLE_DFLT_LOW_FREQ' [-Werror,-Wunused-const-variable]
static const u16 JC_RUMBLE_DFLT_LOW_FREQ = 160;
^
drivers/hid/hid-nintendo.c:401:18: error: unused variable 'JC_RUMBLE_DFLT_HIGH_FREQ' [-Werror,-Wunused-const-variable]
static const u16 JC_RUMBLE_DFLT_HIGH_FREQ = 320;
^
>> drivers/hid/hid-nintendo.c:403:29: error: unused variable 'JC_RUMBLE_ZERO_AMP_PKT_CNT' [-Werror,-Wunused-const-variable]
static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
^
5 errors generated.
vim +/JC_RUMBLE_ZERO_AMP_PKT_CNT +403 drivers/hid/hid-nintendo.c
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 252
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 253 #define joycon_max_rumble_amp (1003)
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 @254 static const struct joycon_rumble_amp_data joycon_rumble_amplitudes[] = {
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 255 /* high, low, amp */
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 256 { 0x00, 0x0040, 0 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 257 { 0x02, 0x8040, 10 }, { 0x04, 0x0041, 12 }, { 0x06, 0x8041, 14 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 258 { 0x08, 0x0042, 17 }, { 0x0a, 0x8042, 20 }, { 0x0c, 0x0043, 24 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 259 { 0x0e, 0x8043, 28 }, { 0x10, 0x0044, 33 }, { 0x12, 0x8044, 40 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 260 { 0x14, 0x0045, 47 }, { 0x16, 0x8045, 56 }, { 0x18, 0x0046, 67 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 261 { 0x1a, 0x8046, 80 }, { 0x1c, 0x0047, 95 }, { 0x1e, 0x8047, 112 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 262 { 0x20, 0x0048, 117 }, { 0x22, 0x8048, 123 }, { 0x24, 0x0049, 128 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 263 { 0x26, 0x8049, 134 }, { 0x28, 0x004a, 140 }, { 0x2a, 0x804a, 146 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 264 { 0x2c, 0x004b, 152 }, { 0x2e, 0x804b, 159 }, { 0x30, 0x004c, 166 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 265 { 0x32, 0x804c, 173 }, { 0x34, 0x004d, 181 }, { 0x36, 0x804d, 189 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 266 { 0x38, 0x004e, 198 }, { 0x3a, 0x804e, 206 }, { 0x3c, 0x004f, 215 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 267 { 0x3e, 0x804f, 225 }, { 0x40, 0x0050, 230 }, { 0x42, 0x8050, 235 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 268 { 0x44, 0x0051, 240 }, { 0x46, 0x8051, 245 }, { 0x48, 0x0052, 251 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 269 { 0x4a, 0x8052, 256 }, { 0x4c, 0x0053, 262 }, { 0x4e, 0x8053, 268 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 270 { 0x50, 0x0054, 273 }, { 0x52, 0x8054, 279 }, { 0x54, 0x0055, 286 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 271 { 0x56, 0x8055, 292 }, { 0x58, 0x0056, 298 }, { 0x5a, 0x8056, 305 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 272 { 0x5c, 0x0057, 311 }, { 0x5e, 0x8057, 318 }, { 0x60, 0x0058, 325 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 273 { 0x62, 0x8058, 332 }, { 0x64, 0x0059, 340 }, { 0x66, 0x8059, 347 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 274 { 0x68, 0x005a, 355 }, { 0x6a, 0x805a, 362 }, { 0x6c, 0x005b, 370 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 275 { 0x6e, 0x805b, 378 }, { 0x70, 0x005c, 387 }, { 0x72, 0x805c, 395 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 276 { 0x74, 0x005d, 404 }, { 0x76, 0x805d, 413 }, { 0x78, 0x005e, 422 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 277 { 0x7a, 0x805e, 431 }, { 0x7c, 0x005f, 440 }, { 0x7e, 0x805f, 450 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 278 { 0x80, 0x0060, 460 }, { 0x82, 0x8060, 470 }, { 0x84, 0x0061, 480 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 279 { 0x86, 0x8061, 491 }, { 0x88, 0x0062, 501 }, { 0x8a, 0x8062, 512 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 280 { 0x8c, 0x0063, 524 }, { 0x8e, 0x8063, 535 }, { 0x90, 0x0064, 547 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 281 { 0x92, 0x8064, 559 }, { 0x94, 0x0065, 571 }, { 0x96, 0x8065, 584 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 282 { 0x98, 0x0066, 596 }, { 0x9a, 0x8066, 609 }, { 0x9c, 0x0067, 623 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 283 { 0x9e, 0x8067, 636 }, { 0xa0, 0x0068, 650 }, { 0xa2, 0x8068, 665 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 284 { 0xa4, 0x0069, 679 }, { 0xa6, 0x8069, 694 }, { 0xa8, 0x006a, 709 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 285 { 0xaa, 0x806a, 725 }, { 0xac, 0x006b, 741 }, { 0xae, 0x806b, 757 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 286 { 0xb0, 0x006c, 773 }, { 0xb2, 0x806c, 790 }, { 0xb4, 0x006d, 808 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 287 { 0xb6, 0x806d, 825 }, { 0xb8, 0x006e, 843 }, { 0xba, 0x806e, 862 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 288 { 0xbc, 0x006f, 881 }, { 0xbe, 0x806f, 900 }, { 0xc0, 0x0070, 920 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 289 { 0xc2, 0x8070, 940 }, { 0xc4, 0x0071, 960 }, { 0xc6, 0x8071, 981 },
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 290 { 0xc8, 0x0072, joycon_max_rumble_amp }
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 291 };
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 292
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 293 /* States for controller state machine */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 294 enum joycon_ctlr_state {
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 295 JOYCON_CTLR_STATE_INIT,
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 296 JOYCON_CTLR_STATE_READ,
012bd52c699d61 Daniel J. Ogorchock 2021-09-11 297 JOYCON_CTLR_STATE_REMOVED,
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 298 };
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 299
294a828759d041 Daniel J. Ogorchock 2021-09-11 300 /* Controller type received as part of device info */
294a828759d041 Daniel J. Ogorchock 2021-09-11 301 enum joycon_ctlr_type {
294a828759d041 Daniel J. Ogorchock 2021-09-11 302 JOYCON_CTLR_TYPE_JCL = 0x01,
294a828759d041 Daniel J. Ogorchock 2021-09-11 303 JOYCON_CTLR_TYPE_JCR = 0x02,
294a828759d041 Daniel J. Ogorchock 2021-09-11 304 JOYCON_CTLR_TYPE_PRO = 0x03,
294a828759d041 Daniel J. Ogorchock 2021-09-11 305 };
294a828759d041 Daniel J. Ogorchock 2021-09-11 306
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 307 struct joycon_stick_cal {
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 308 s32 max;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 309 s32 min;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 310 s32 center;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 311 };
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 312
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 313 struct joycon_imu_cal {
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 314 s16 offset[3];
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 315 s16 scale[3];
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 316 };
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 317
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 318 /*
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 319 * All the controller's button values are stored in a u32.
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 320 * They can be accessed with bitwise ANDs.
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 321 */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 322 static const u32 JC_BTN_Y = BIT(0);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 323 static const u32 JC_BTN_X = BIT(1);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 324 static const u32 JC_BTN_B = BIT(2);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 325 static const u32 JC_BTN_A = BIT(3);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 326 static const u32 JC_BTN_SR_R = BIT(4);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 327 static const u32 JC_BTN_SL_R = BIT(5);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 328 static const u32 JC_BTN_R = BIT(6);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 329 static const u32 JC_BTN_ZR = BIT(7);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 330 static const u32 JC_BTN_MINUS = BIT(8);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 331 static const u32 JC_BTN_PLUS = BIT(9);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 332 static const u32 JC_BTN_RSTICK = BIT(10);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 333 static const u32 JC_BTN_LSTICK = BIT(11);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 334 static const u32 JC_BTN_HOME = BIT(12);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 335 static const u32 JC_BTN_CAP = BIT(13); /* capture button */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 336 static const u32 JC_BTN_DOWN = BIT(16);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 337 static const u32 JC_BTN_UP = BIT(17);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 338 static const u32 JC_BTN_RIGHT = BIT(18);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 339 static const u32 JC_BTN_LEFT = BIT(19);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 340 static const u32 JC_BTN_SR_L = BIT(20);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 341 static const u32 JC_BTN_SL_L = BIT(21);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 342 static const u32 JC_BTN_L = BIT(22);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 343 static const u32 JC_BTN_ZL = BIT(23);
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 344
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 345 enum joycon_msg_type {
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 346 JOYCON_MSG_TYPE_NONE,
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 347 JOYCON_MSG_TYPE_USB,
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 348 JOYCON_MSG_TYPE_SUBCMD,
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 349 };
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 350
4c048f6b2c25ff Daniel J. Ogorchock 2021-09-11 351 struct joycon_rumble_output {
4c048f6b2c25ff Daniel J. Ogorchock 2021-09-11 352 u8 output_id;
4c048f6b2c25ff Daniel J. Ogorchock 2021-09-11 353 u8 packet_num;
4c048f6b2c25ff Daniel J. Ogorchock 2021-09-11 354 u8 rumble_data[8];
4c048f6b2c25ff Daniel J. Ogorchock 2021-09-11 355 } __packed;
4c048f6b2c25ff Daniel J. Ogorchock 2021-09-11 356
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 357 struct joycon_subcmd_request {
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 358 u8 output_id; /* must be 0x01 for subcommand, 0x10 for rumble only */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 359 u8 packet_num; /* incremented every send */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 360 u8 rumble_data[8];
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 361 u8 subcmd_id;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 362 u8 data[]; /* length depends on the subcommand */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 363 } __packed;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 364
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 365 struct joycon_subcmd_reply {
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 366 u8 ack; /* MSB 1 for ACK, 0 for NACK */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 367 u8 id; /* id of requested subcmd */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 368 u8 data[]; /* will be at most 35 bytes */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 369 } __packed;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 370
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 371 struct joycon_imu_data {
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 372 s16 accel_x;
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 373 s16 accel_y;
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 374 s16 accel_z;
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 375 s16 gyro_x;
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 376 s16 gyro_y;
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 377 s16 gyro_z;
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 378 } __packed;
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 379
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 380 struct joycon_input_report {
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 381 u8 id;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 382 u8 timer;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 383 u8 bat_con; /* battery and connection info */
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 384 u8 button_status[3];
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 385 u8 left_stick[3];
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 386 u8 right_stick[3];
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 387 u8 vibrator_report;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 388
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 389 union {
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 390 struct joycon_subcmd_reply subcmd_reply;
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 391 /* IMU input reports contain 3 samples */
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 392 u8 imu_raw_bytes[sizeof(struct joycon_imu_data) * 3];
4ff5b10840a88e Daniel J. Ogorchock 2021-09-11 393 };
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 394 } __packed;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 395
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 396 #define JC_MAX_RESP_SIZE (sizeof(struct joycon_input_report) + 35)
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 397 #define JC_RUMBLE_DATA_SIZE 8
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 398 #define JC_RUMBLE_QUEUE_SIZE 8
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 399
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 400 static const u16 JC_RUMBLE_DFLT_LOW_FREQ = 160;
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 401 static const u16 JC_RUMBLE_DFLT_HIGH_FREQ = 320;
c4eae84feff3e6 Daniel J. Ogorchock 2021-09-11 402 static const u16 JC_RUMBLE_PERIOD_MS = 50;
dad74e18f72a85 Daniel J. Ogorchock 2021-09-11 @403 static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
2af16c1f846bd6 Daniel J. Ogorchock 2021-09-11 404
:::::: The code at line 403 was first introduced by commit
:::::: dad74e18f72a852ae40ad7b4246841a1b7e196b5 HID: nintendo: prevent needless queueing of the rumble worker
:::::: TO: Daniel J. Ogorchock <djogorchock(a)gmail.com>
:::::: CC: Jiri Kosina <jkosina(a)suse.cz>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
arch/arm/mach-ep93xx/ts72xx.c:154:13: error: no previous prototype for function 'ts72xx_register_flash'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date: 4 months ago
config: arm-randconfig-r004-20220213 (https://download.01.org/0day-ci/archive/20220214/202202140141.HRZ3WZwi-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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/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 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/mach-ep93xx/ drivers/hsi/controllers/
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 >>):
>> arch/arm/mach-ep93xx/ts72xx.c:154:13: error: no previous prototype for function 'ts72xx_register_flash' [-Werror,-Wmissing-prototypes]
void __init ts72xx_register_flash(struct mtd_partition *parts, int n,
^
arch/arm/mach-ep93xx/ts72xx.c:154:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init ts72xx_register_flash(struct mtd_partition *parts, int n,
^
static
1 error generated.
--
>> drivers/hsi/controllers/omap_ssi_core.c:147:6: error: no previous prototype for function 'ssi_waketest' [-Werror,-Wmissing-prototypes]
void ssi_waketest(struct hsi_client *cl, unsigned int enable)
^
drivers/hsi/controllers/omap_ssi_core.c:147:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ssi_waketest(struct hsi_client *cl, unsigned int enable)
^
static
1 error generated.
--
>> drivers/hsi/controllers/omap_ssi_port.c:463:6: error: variable 'val' set but not used [-Werror,-Wunused-but-set-variable]
u32 val;
^
>> drivers/hsi/controllers/omap_ssi_port.c:1325:6: error: variable 'mode' set but not used [-Werror,-Wunused-but-set-variable]
u32 mode;
^
2 errors generated.
vim +/ts72xx_register_flash +154 arch/arm/mach-ep93xx/ts72xx.c
030d2dd450a628 H Hartley Sweeten 2010-01-05 153
d6d76745f4d921 Lukasz Majewski 2017-12-12 @154 void __init ts72xx_register_flash(struct mtd_partition *parts, int n,
d6d76745f4d921 Lukasz Majewski 2017-12-12 155 resource_size_t start)
3174c88af4b6b2 Hartley Sweeten 2009-07-20 156 {
16bcf78f8cac9c Hartley Sweeten 2010-06-10 157 /*
16bcf78f8cac9c Hartley Sweeten 2010-06-10 158 * TS7200 has NOR flash all other TS72xx board have NAND flash.
16bcf78f8cac9c Hartley Sweeten 2010-06-10 159 */
030d2dd450a628 H Hartley Sweeten 2010-01-05 160 if (board_is_ts7200()) {
16bcf78f8cac9c Hartley Sweeten 2010-06-10 161 ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M);
030d2dd450a628 H Hartley Sweeten 2010-01-05 162 } else {
030d2dd450a628 H Hartley Sweeten 2010-01-05 163 ts72xx_nand_resource[0].start = start;
030d2dd450a628 H Hartley Sweeten 2010-01-05 164 ts72xx_nand_resource[0].end = start + SZ_16M - 1;
030d2dd450a628 H Hartley Sweeten 2010-01-05 165
d6d76745f4d921 Lukasz Majewski 2017-12-12 166 ts72xx_nand_data.chip.partitions = parts;
d6d76745f4d921 Lukasz Majewski 2017-12-12 167 ts72xx_nand_data.chip.nr_partitions = n;
d6d76745f4d921 Lukasz Majewski 2017-12-12 168
030d2dd450a628 H Hartley Sweeten 2010-01-05 169 platform_device_register(&ts72xx_nand_flash);
030d2dd450a628 H Hartley Sweeten 2010-01-05 170 }
3174c88af4b6b2 Hartley Sweeten 2009-07-20 171 }
3174c88af4b6b2 Hartley Sweeten 2009-07-20 172
:::::: The code at line 154 was first introduced by commit
:::::: d6d76745f4d921ba8c58d72259b9383ee5b67b28 ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept parameters
:::::: TO: Lukasz Majewski <lukma(a)denx.de>
:::::: CC: Alexander Sverdlin <alexander.sverdlin(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[hch-misc:remove-scsi_request 4/8] drivers/scsi/scsi_logging.c:90:22: error: address of array 'scmd->cmnd' will always evaluate to 'true'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git remove-scsi_request
head: d8fd889c4c1f73165ec38da54e2c10bfe795686b
commit: 17cfefd0e27007b007c4650e76537805abfe18ed [4/8] scsi: remove the cmd field from struct scsi_request
config: arm-randconfig-c002-20220213 (https://download.01.org/0day-ci/archive/20220214/202202140045.5lpcLNP9-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc remove-scsi_request
git checkout 17cfefd0e27007b007c4650e76537805abfe18ed
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/scsi/
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/scsi/scsi_logging.c:90:22: error: address of array 'scmd->cmnd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if (!scmd || !scmd->cmnd)
~~~~~~~^~~~
>> drivers/scsi/scsi_logging.c:186:12: error: address of array 'cmd->cmnd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if (!cmd->cmnd)
~~~~~~^~~~
2 errors generated.
vim +90 drivers/scsi/scsi_logging.c
ded85c193a391a Hannes Reinecke 2015-01-08 82
9c4a6b1e428013 Hannes Reinecke 2015-02-04 83 void scmd_printk(const char *level, const struct scsi_cmnd *scmd,
ded85c193a391a Hannes Reinecke 2015-01-08 84 const char *fmt, ...)
ded85c193a391a Hannes Reinecke 2015-01-08 85 {
ded85c193a391a Hannes Reinecke 2015-01-08 86 va_list args;
ded85c193a391a Hannes Reinecke 2015-01-08 87 char *logbuf;
ded85c193a391a Hannes Reinecke 2015-01-08 88 size_t off = 0, logbuf_len;
ded85c193a391a Hannes Reinecke 2015-01-08 89
ded85c193a391a Hannes Reinecke 2015-01-08 @90 if (!scmd || !scmd->cmnd)
9c4a6b1e428013 Hannes Reinecke 2015-02-04 91 return;
ded85c193a391a Hannes Reinecke 2015-01-08 92
ded85c193a391a Hannes Reinecke 2015-01-08 93 logbuf = scsi_log_reserve_buffer(&logbuf_len);
ded85c193a391a Hannes Reinecke 2015-01-08 94 if (!logbuf)
9c4a6b1e428013 Hannes Reinecke 2015-02-04 95 return;
2104551969e801 Hannes Reinecke 2015-01-08 96 off = sdev_format_header(logbuf, logbuf_len, scmd_name(scmd),
aa8e25e5006aac Bart Van Assche 2021-08-09 97 scsi_cmd_to_rq((struct scsi_cmnd *)scmd)->tag);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 98 if (off < logbuf_len) {
ded85c193a391a Hannes Reinecke 2015-01-08 99 va_start(args, fmt);
ded85c193a391a Hannes Reinecke 2015-01-08 100 off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args);
ded85c193a391a Hannes Reinecke 2015-01-08 101 va_end(args);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 102 }
9c4a6b1e428013 Hannes Reinecke 2015-02-04 103 dev_printk(level, &scmd->device->sdev_gendev, "%s", logbuf);
ded85c193a391a Hannes Reinecke 2015-01-08 104 scsi_log_release_buffer(logbuf);
ded85c193a391a Hannes Reinecke 2015-01-08 105 }
ded85c193a391a Hannes Reinecke 2015-01-08 106 EXPORT_SYMBOL(scmd_printk);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 107
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 108 static size_t scsi_format_opcode_name(char *buffer, size_t buf_len,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 109 const unsigned char *cdbp)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 110 {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 111 int sa, cdb0;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 112 const char *cdb_name = NULL, *sa_name = NULL;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 113 size_t off;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 114
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 115 cdb0 = cdbp[0];
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 116 if (cdb0 == VARIABLE_LENGTH_CMD) {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 117 int len = scsi_varlen_cdb_length(cdbp);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 118
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 119 if (len < 10) {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 120 off = scnprintf(buffer, buf_len,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 121 "short variable length command, len=%d",
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 122 len);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 123 return off;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 124 }
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 125 sa = (cdbp[8] << 8) + cdbp[9];
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 126 } else
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 127 sa = cdbp[1] & 0x1f;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 128
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 129 if (!scsi_opcode_sa_name(cdb0, sa, &cdb_name, &sa_name)) {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 130 if (cdb_name)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 131 off = scnprintf(buffer, buf_len, "%s", cdb_name);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 132 else {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 133 off = scnprintf(buffer, buf_len, "opcode=0x%x", cdb0);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 134 if (WARN_ON(off >= buf_len))
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 135 return off;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 136 if (cdb0 >= VENDOR_SPECIFIC_CDB)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 137 off += scnprintf(buffer + off, buf_len - off,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 138 " (vendor)");
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 139 else if (cdb0 >= 0x60 && cdb0 < 0x7e)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 140 off += scnprintf(buffer + off, buf_len - off,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 141 " (reserved)");
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 142 }
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 143 } else {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 144 if (sa_name)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 145 off = scnprintf(buffer, buf_len, "%s", sa_name);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 146 else if (cdb_name)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 147 off = scnprintf(buffer, buf_len, "%s, sa=0x%x",
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 148 cdb_name, sa);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 149 else
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 150 off = scnprintf(buffer, buf_len,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 151 "opcode=0x%x, sa=0x%x", cdb0, sa);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 152 }
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 153 WARN_ON(off >= buf_len);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 154 return off;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 155 }
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 156
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 157 size_t __scsi_format_command(char *logbuf, size_t logbuf_len,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 158 const unsigned char *cdb, size_t cdb_len)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 159 {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 160 int len, k;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 161 size_t off;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 162
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 163 off = scsi_format_opcode_name(logbuf, logbuf_len, cdb);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 164 if (off >= logbuf_len)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 165 return off;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 166 len = scsi_command_size(cdb);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 167 if (cdb_len < len)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 168 len = cdb_len;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 169 /* print out all bytes in cdb */
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 170 for (k = 0; k < len; ++k) {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 171 if (off > logbuf_len - 3)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 172 break;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 173 off += scnprintf(logbuf + off, logbuf_len - off,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 174 " %02x", cdb[k]);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 175 }
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 176 return off;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 177 }
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 178 EXPORT_SYMBOL(__scsi_format_command);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 179
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 180 void scsi_print_command(struct scsi_cmnd *cmd)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 181 {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 182 int k;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 183 char *logbuf;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 184 size_t off, logbuf_len;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 185
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 @186 if (!cmd->cmnd)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 187 return;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 188
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 189 logbuf = scsi_log_reserve_buffer(&logbuf_len);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 190 if (!logbuf)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 191 return;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 192
2104551969e801 Hannes Reinecke 2015-01-08 193 off = sdev_format_header(logbuf, logbuf_len,
aa8e25e5006aac Bart Van Assche 2021-08-09 194 scmd_name(cmd), scsi_cmd_to_rq(cmd)->tag);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 195 if (off >= logbuf_len)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 196 goto out_printk;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 197 off += scnprintf(logbuf + off, logbuf_len - off, "CDB: ");
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 198 if (WARN_ON(off >= logbuf_len))
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 199 goto out_printk;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 200
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 201 off += scsi_format_opcode_name(logbuf + off, logbuf_len - off,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 202 cmd->cmnd);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 203 if (off >= logbuf_len)
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 204 goto out_printk;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 205
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 206 /* print out all bytes in cdb */
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 207 if (cmd->cmd_len > 16) {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 208 /* Print opcode in one line and use separate lines for CDB */
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 209 off += scnprintf(logbuf + off, logbuf_len - off, "\n");
2fc583c4628bf7 Christoph Hellwig 2015-01-18 210 dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 211 for (k = 0; k < cmd->cmd_len; k += 16) {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 212 size_t linelen = min(cmd->cmd_len - k, 16);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 213
2104551969e801 Hannes Reinecke 2015-01-08 214 off = sdev_format_header(logbuf, logbuf_len,
2104551969e801 Hannes Reinecke 2015-01-08 215 scmd_name(cmd),
aa8e25e5006aac Bart Van Assche 2021-08-09 216 scsi_cmd_to_rq(cmd)->tag);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 217 if (!WARN_ON(off > logbuf_len - 58)) {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 218 off += scnprintf(logbuf + off, logbuf_len - off,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 219 "CDB[%02x]: ", k);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 220 hex_dump_to_buffer(&cmd->cmnd[k], linelen,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 221 16, 1, logbuf + off,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 222 logbuf_len - off, false);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 223 }
2fc583c4628bf7 Christoph Hellwig 2015-01-18 224 dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s",
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 225 logbuf);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 226 }
811f39479c0c2d Ye Bin 2020-07-17 227 goto out;
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 228 }
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 229 if (!WARN_ON(off > logbuf_len - 49)) {
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 230 off += scnprintf(logbuf + off, logbuf_len - off, " ");
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 231 hex_dump_to_buffer(cmd->cmnd, cmd->cmd_len, 16, 1,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 232 logbuf + off, logbuf_len - off,
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 233 false);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 234 }
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 235 out_printk:
2fc583c4628bf7 Christoph Hellwig 2015-01-18 236 dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf);
811f39479c0c2d Ye Bin 2020-07-17 237 out:
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 238 scsi_log_release_buffer(logbuf);
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 239 }
9e5ed2a5b3662c Hannes Reinecke 2015-01-08 240 EXPORT_SYMBOL(scsi_print_command);
2104551969e801 Hannes Reinecke 2015-01-08 241
:::::: The code at line 90 was first introduced by commit
:::::: ded85c193a391a84076d5c6a7a5668fe164a490e scsi: Implement per-cpu logging buffer
:::::: TO: Hannes Reinecke <hare(a)suse.de>
:::::: CC: Christoph Hellwig <hch(a)lst.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[PATCH] iio: versal-sysmon: fix for_each_child.cocci warnings
by Julia Lawall
From: kernel test robot <lkp(a)intel.com>
For_each_child_of_node" should have of_node_put() before return.
Generated by: scripts/coccinelle/iterators/for_each_child.cocci
CC: Anand Ashok Dumbre <anand.ashok.dumbre(a)xilinx.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Julia Lawall <julia.lawall(a)inria.fr>
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head: 966124532656bc95d781abf57531e4cd4f962237
commit: 1459646ab280aa68c3c4fa1d9552ea21f15d7a2d [543/923] iio: versal-sysmon: add driver for Versal Sysmon
:::::: branch date: 3 days ago
:::::: commit date: 12 days ago
Please take the patch only if it's a positive warning. Thanks!
versal-sysmon.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/iio/adc/versal-sysmon.c
+++ b/drivers/iio/adc/versal-sysmon.c
@@ -875,12 +875,16 @@ static int sysmon_parse_dt(struct iio_de
for_each_child_of_node(np, child_node) {
ret = of_property_read_u32(child_node, "reg", ®);
- if (ret < 0)
+ if (ret < 0) {
+ of_node_put(child_node);
return ret;
+ }
ret = of_property_read_string(child_node, "xlnx,name", &name);
- if (ret < 0)
+ if (ret < 0) {
+ of_node_put(child_node);
return ret;
+ }
sysmon_channels[i].type = IIO_VOLTAGE;
sysmon_channels[i].indexed = 1;
7 months, 1 week
drivers/dma/bestcomm/bestcomm.c:98:30: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: adec566b05288f2787a1f88dbaf77ed8b0c644fa dmaengine: bestcomm: fix system boot lockups
date: 4 months ago
config: powerpc-randconfig-s032-20220213 (https://download.01.org/0day-ci/archive/20220213/202202132337.6w53hDke-lk...)
compiler: powerpc-linux-gcc (GCC) 11.2.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.4-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 adec566b05288f2787a1f88dbaf77ed8b0c644fa
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/dma/bestcomm/
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/dma/bestcomm/bestcomm.c:98:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got struct bcom_bd *bd @@
drivers/dma/bestcomm/bestcomm.c:98:30: sparse: expected void volatile [noderef] __iomem *a
drivers/dma/bestcomm/bestcomm.c:98:30: sparse: got struct bcom_bd *bd
>> drivers/dma/bestcomm/bestcomm.c:189:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *[assigned] var @@
drivers/dma/bestcomm/bestcomm.c:189:19: sparse: expected void volatile [noderef] __iomem *a
drivers/dma/bestcomm/bestcomm.c:189:19: sparse: got unsigned int [usertype] *[assigned] var
>> drivers/dma/bestcomm/bestcomm.c:190:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *[assigned] inc @@
drivers/dma/bestcomm/bestcomm.c:190:19: sparse: expected void volatile [noderef] __iomem *a
drivers/dma/bestcomm/bestcomm.c:190:19: sparse: got unsigned int [usertype] *[assigned] inc
>> drivers/dma/bestcomm/bestcomm.c:196:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got unsigned int [usertype] *[assigned] desc @@
drivers/dma/bestcomm/bestcomm.c:196:21: sparse: expected void volatile [noderef] __iomem *d
drivers/dma/bestcomm/bestcomm.c:196:21: sparse: got unsigned int [usertype] *[assigned] desc
>> drivers/dma/bestcomm/bestcomm.c:197:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got unsigned int [usertype] * @@
drivers/dma/bestcomm/bestcomm.c:197:25: sparse: expected void volatile [noderef] __iomem *d
drivers/dma/bestcomm/bestcomm.c:197:25: sparse: got unsigned int [usertype] *
>> drivers/dma/bestcomm/bestcomm.c:198:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got unsigned int [usertype] *[assigned] inc @@
drivers/dma/bestcomm/bestcomm.c:198:21: sparse: expected void volatile [noderef] __iomem *d
drivers/dma/bestcomm/bestcomm.c:198:21: sparse: got unsigned int [usertype] *[assigned] inc
>> drivers/dma/bestcomm/bestcomm.c:305:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got struct bcom_tdt *tdt @@
drivers/dma/bestcomm/bestcomm.c:305:27: sparse: expected void volatile [noderef] __iomem *a
drivers/dma/bestcomm/bestcomm.c:305:27: sparse: got struct bcom_tdt *tdt
>> drivers/dma/bestcomm/bestcomm.c:306:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *ctx @@
drivers/dma/bestcomm/bestcomm.c:306:27: sparse: expected void volatile [noderef] __iomem *a
drivers/dma/bestcomm/bestcomm.c:306:27: sparse: got unsigned int [usertype] *ctx
>> drivers/dma/bestcomm/bestcomm.c:307:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *var @@
drivers/dma/bestcomm/bestcomm.c:307:27: sparse: expected void volatile [noderef] __iomem *a
drivers/dma/bestcomm/bestcomm.c:307:27: sparse: got unsigned int [usertype] *var
>> drivers/dma/bestcomm/bestcomm.c:308:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got unsigned int [usertype] *fdt @@
drivers/dma/bestcomm/bestcomm.c:308:27: sparse: expected void volatile [noderef] __iomem *a
drivers/dma/bestcomm/bestcomm.c:308:27: sparse: got unsigned int [usertype] *fdt
drivers/dma/bestcomm/bestcomm.c:311:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *d @@ got unsigned int [usertype] * @@
drivers/dma/bestcomm/bestcomm.c:311:35: sparse: expected void volatile [noderef] __iomem *d
drivers/dma/bestcomm/bestcomm.c:311:35: sparse: got unsigned int [usertype] *
vim +98 drivers/dma/bestcomm/bestcomm.c
48
49 struct bcom_task *
50 bcom_task_alloc(int bd_count, int bd_size, int priv_size)
51 {
52 int i, tasknum = -1;
53 struct bcom_task *tsk;
54
55 /* Don't try to do anything if bestcomm init failed */
56 if (!bcom_eng)
57 return NULL;
58
59 /* Get and reserve a task num */
60 spin_lock(&bcom_eng->lock);
61
62 for (i=0; i<BCOM_MAX_TASKS; i++)
63 if (!bcom_eng->tdt[i].stop) { /* we use stop as a marker */
64 bcom_eng->tdt[i].stop = 0xfffffffful; /* dummy addr */
65 tasknum = i;
66 break;
67 }
68
69 spin_unlock(&bcom_eng->lock);
70
71 if (tasknum < 0)
72 return NULL;
73
74 /* Allocate our structure */
75 tsk = kzalloc(sizeof(struct bcom_task) + priv_size, GFP_KERNEL);
76 if (!tsk)
77 goto error;
78
79 tsk->tasknum = tasknum;
80 if (priv_size)
81 tsk->priv = (void*)tsk + sizeof(struct bcom_task);
82
83 /* Get IRQ of that task */
84 tsk->irq = irq_of_parse_and_map(bcom_eng->ofnode, tsk->tasknum);
85 if (!tsk->irq)
86 goto error;
87
88 /* Init the BDs, if needed */
89 if (bd_count) {
90 tsk->cookie = kmalloc_array(bd_count, sizeof(void *),
91 GFP_KERNEL);
92 if (!tsk->cookie)
93 goto error;
94
95 tsk->bd = bcom_sram_alloc(bd_count * bd_size, 4, &tsk->bd_pa);
96 if (!tsk->bd)
97 goto error;
> 98 memset_io(tsk->bd, 0x00, bd_count * bd_size);
99
100 tsk->num_bd = bd_count;
101 tsk->bd_size = bd_size;
102 }
103
104 return tsk;
105
106 error:
107 if (tsk) {
108 if (tsk->irq)
109 irq_dispose_mapping(tsk->irq);
110 bcom_sram_free(tsk->bd);
111 kfree(tsk->cookie);
112 kfree(tsk);
113 }
114
115 bcom_eng->tdt[tasknum].stop = 0;
116
117 return NULL;
118 }
119 EXPORT_SYMBOL_GPL(bcom_task_alloc);
120
121 void
122 bcom_task_free(struct bcom_task *tsk)
123 {
124 /* Stop the task */
125 bcom_disable_task(tsk->tasknum);
126
127 /* Clear TDT */
128 bcom_eng->tdt[tsk->tasknum].start = 0;
129 bcom_eng->tdt[tsk->tasknum].stop = 0;
130
131 /* Free everything */
132 irq_dispose_mapping(tsk->irq);
133 bcom_sram_free(tsk->bd);
134 kfree(tsk->cookie);
135 kfree(tsk);
136 }
137 EXPORT_SYMBOL_GPL(bcom_task_free);
138
139 int
140 bcom_load_image(int task, u32 *task_image)
141 {
142 struct bcom_task_header *hdr = (struct bcom_task_header *)task_image;
143 struct bcom_tdt *tdt;
144 u32 *desc, *var, *inc;
145 u32 *desc_src, *var_src, *inc_src;
146
147 /* Safety checks */
148 if (hdr->magic != BCOM_TASK_MAGIC) {
149 printk(KERN_ERR DRIVER_NAME
150 ": Trying to load invalid microcode\n");
151 return -EINVAL;
152 }
153
154 if ((task < 0) || (task >= BCOM_MAX_TASKS)) {
155 printk(KERN_ERR DRIVER_NAME
156 ": Trying to load invalid task %d\n", task);
157 return -EINVAL;
158 }
159
160 /* Initial load or reload */
161 tdt = &bcom_eng->tdt[task];
162
163 if (tdt->start) {
164 desc = bcom_task_desc(task);
165 if (hdr->desc_size != bcom_task_num_descs(task)) {
166 printk(KERN_ERR DRIVER_NAME
167 ": Trying to reload wrong task image "
168 "(%d size %d/%d)!\n",
169 task,
170 hdr->desc_size,
171 bcom_task_num_descs(task));
172 return -EINVAL;
173 }
174 } else {
175 phys_addr_t start_pa;
176
177 desc = bcom_sram_alloc(hdr->desc_size * sizeof(u32), 4, &start_pa);
178 if (!desc)
179 return -ENOMEM;
180
181 tdt->start = start_pa;
182 tdt->stop = start_pa + ((hdr->desc_size-1) * sizeof(u32));
183 }
184
185 var = bcom_task_var(task);
186 inc = bcom_task_inc(task);
187
188 /* Clear & copy */
> 189 memset_io(var, 0x00, BCOM_VAR_SIZE);
> 190 memset_io(inc, 0x00, BCOM_INC_SIZE);
191
192 desc_src = (u32 *)(hdr + 1);
193 var_src = desc_src + hdr->desc_size;
194 inc_src = var_src + hdr->var_size;
195
> 196 memcpy_toio(desc, desc_src, hdr->desc_size * sizeof(u32));
> 197 memcpy_toio(var + hdr->first_var, var_src, hdr->var_size * sizeof(u32));
> 198 memcpy_toio(inc, inc_src, hdr->inc_size * sizeof(u32));
199
200 return 0;
201 }
202 EXPORT_SYMBOL_GPL(bcom_load_image);
203
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[frank-w-bpi-r2-4.14:5.17-r2pro-hdmiv5-gpu 109/109] sound/soc/generic/simple-card.c:661:33: error: mixing declarations and code is a C99 extension
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.17-r2pro-hdmiv5-gpu
head: 1699cddf654f06e318ea18f3cc11d29bb0e0d135
commit: 1699cddf654f06e318ea18f3cc11d29bb0e0d135 [109/109] debug for headphone soundcard
config: riscv-randconfig-r012-20220213 (https://download.01.org/0day-ci/archive/20220213/202202132253.QVNDRt2F-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 478c237e21b2c3a83e46f26fcbeb3876682f9b14)
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://github.com/frank-w/BPI-R2-4.14/commit/1699cddf654f06e318ea18f3cc1...
git remote add frank-w-bpi-r2-4.14 https://github.com/frank-w/BPI-R2-4.14
git fetch --no-tags frank-w-bpi-r2-4.14 5.17-r2pro-hdmiv5-gpu
git checkout 1699cddf654f06e318ea18f3cc11d29bb0e0d135
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash sound/soc/generic/
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 >>):
>> sound/soc/generic/simple-card.c:661:33: error: mixing declarations and code is a C99 extension [-Werror,-Wdeclaration-after-statement]
struct asoc_simple_card_info *cinfo;
^
1 error generated.
vim +661 sound/soc/generic/simple-card.c
8d1bd113a19440 Katsuhiro Suzuki 2018-06-11 613
b0a821daf0d04e Amir Goldstein 2019-05-16 614 static int asoc_simple_probe(struct platform_device *pdev)
f2390880ec0264 Kuninori Morimoto 2012-04-08 615 {
e59289cda8dec0 Kuninori Morimoto 2019-03-20 616 struct asoc_simple_priv *priv;
f89983ef61677a Kuninori Morimoto 2012-12-25 617 struct device *dev = &pdev->dev;
dcee9bfe890451 Kuninori Morimoto 2017-03-15 618 struct device_node *np = dev->of_node;
5be509576cf634 Kuninori Morimoto 2017-03-15 619 struct snd_soc_card *card;
ec1af6c64db94e Thierry Reding 2021-04-19 620 struct link_info *li;
65a5056b21202e Kuninori Morimoto 2019-03-20 621 int ret;
1699cddf654f06 Frank Wunderlich 2022-02-13 622 dev_err(dev,"DEBUG: Passed %s %d\n",__FUNCTION__,__LINE__);
0dd4fc3c2f663b Xiubo Li 2014-09-10 623 /* Allocate the private data and the DAI link array */
b0133d9c4d7600 Kuninori Morimoto 2016-08-26 624 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
ca65b492c7a265 Jean-Francois Moine 2014-01-15 625 if (!priv)
ca919fe4b972b9 Xiubo Li 2014-01-14 626 return -ENOMEM;
ca919fe4b972b9 Xiubo Li 2014-01-14 627
d947cdfd4be29c Kuninori Morimoto 2018-12-20 628 card = simple_priv_to_card(priv);
d947cdfd4be29c Kuninori Morimoto 2018-12-20 629 card->owner = THIS_MODULE;
d947cdfd4be29c Kuninori Morimoto 2018-12-20 630 card->dev = dev;
2d01a84605a55c Kuninori Morimoto 2018-12-20 631 card->probe = simple_soc_probe;
907f0a3051869a Guido Günther 2021-06-22 632 card->driver_name = "simple-card";
d947cdfd4be29c Kuninori Morimoto 2018-12-20 633
ec1af6c64db94e Thierry Reding 2021-04-19 634 li = devm_kzalloc(dev, sizeof(*li), GFP_KERNEL);
ec1af6c64db94e Thierry Reding 2021-04-19 635 if (!li)
ec1af6c64db94e Thierry Reding 2021-04-19 636 return -ENOMEM;
ec1af6c64db94e Thierry Reding 2021-04-19 637
ec1af6c64db94e Thierry Reding 2021-04-19 638 ret = simple_get_dais_count(priv, li);
1699cddf654f06 Frank Wunderlich 2022-02-13 639 dev_err(dev,"DEBUG: Passed %s %d ret:%d\n",__FUNCTION__,__LINE__,ret);
0f687d826736a5 Thierry Reding 2021-04-16 640 if (ret < 0)
0f687d826736a5 Thierry Reding 2021-04-16 641 return ret;
0f687d826736a5 Thierry Reding 2021-04-16 642
ec1af6c64db94e Thierry Reding 2021-04-19 643 if (!li->link)
da215354eb55c3 Kuninori Morimoto 2018-12-14 644 return -EINVAL;
da215354eb55c3 Kuninori Morimoto 2018-12-14 645
ec1af6c64db94e Thierry Reding 2021-04-19 646 ret = asoc_simple_init_priv(priv, li);
1699cddf654f06 Frank Wunderlich 2022-02-13 647 dev_err(dev,"DEBUG: Passed %s %d ret:%d\n",__FUNCTION__,__LINE__,ret);
65a5056b21202e Kuninori Morimoto 2019-03-20 648 if (ret < 0)
65a5056b21202e Kuninori Morimoto 2019-03-20 649 return ret;
1699cddf654f06 Frank Wunderlich 2022-02-13 650 dev_err(dev,"DEBUG: Passed %s %d\n",__FUNCTION__,__LINE__);
201a0eac7fe5e7 Jean-Francois Moine 2014-01-15 651 if (np && of_device_is_available(np)) {
1699cddf654f06 Frank Wunderlich 2022-02-13 652 dev_err(dev,"DEBUG: Passed %s %d\n",__FUNCTION__,__LINE__);
ec1af6c64db94e Thierry Reding 2021-04-19 653 ret = simple_parse_of(priv, li);
fa558c2801fc17 Kuninori Morimoto 2013-11-20 654 if (ret < 0) {
7a0299e13bc740 Kuninori Morimoto 2021-12-14 655 dev_err_probe(dev, ret, "parse error\n");
e512e001dafa54 Jean-Francois Moine 2014-03-11 656 goto err;
fa558c2801fc17 Kuninori Morimoto 2013-11-20 657 }
6a91a17bd7b92b Jean-Francois Moine 2014-03-20 658
fa558c2801fc17 Kuninori Morimoto 2013-11-20 659 } else {
1699cddf654f06 Frank Wunderlich 2022-02-13 660 dev_err(dev,"DEBUG: Passed %s %d\n",__FUNCTION__,__LINE__);
ca65b492c7a265 Jean-Francois Moine 2014-01-15 @661 struct asoc_simple_card_info *cinfo;
f107294c6422e7 Kuninori Morimoto 2019-06-06 662 struct snd_soc_dai_link_component *cpus;
710af9196ce614 Kuninori Morimoto 2018-08-31 663 struct snd_soc_dai_link_component *codecs;
e58f41e41185c6 Kuninori Morimoto 2018-08-31 664 struct snd_soc_dai_link_component *platform;
65a5056b21202e Kuninori Morimoto 2019-03-20 665 struct snd_soc_dai_link *dai_link = priv->dai_link;
65a5056b21202e Kuninori Morimoto 2019-03-20 666 struct simple_dai_props *dai_props = priv->dai_props;
65a5056b21202e Kuninori Morimoto 2019-03-20 667
ca65b492c7a265 Jean-Francois Moine 2014-01-15 668 cinfo = dev->platform_data;
ca65b492c7a265 Jean-Francois Moine 2014-01-15 669 if (!cinfo) {
f89983ef61677a Kuninori Morimoto 2012-12-25 670 dev_err(dev, "no info for asoc-simple-card\n");
f2390880ec0264 Kuninori Morimoto 2012-04-08 671 return -EINVAL;
f2390880ec0264 Kuninori Morimoto 2012-04-08 672 }
1699cddf654f06 Frank Wunderlich 2022-02-13 673 dev_err(dev,"DEBUG: Passed %s %d\n",__FUNCTION__,__LINE__);
f2390880ec0264 Kuninori Morimoto 2012-04-08 674 if (!cinfo->name ||
fa558c2801fc17 Kuninori Morimoto 2013-11-20 675 !cinfo->codec_dai.name ||
7722f830a45f7f Jean-Francois Moine 2014-01-15 676 !cinfo->codec ||
7722f830a45f7f Jean-Francois Moine 2014-01-15 677 !cinfo->platform ||
7722f830a45f7f Jean-Francois Moine 2014-01-15 678 !cinfo->cpu_dai.name) {
f89983ef61677a Kuninori Morimoto 2012-12-25 679 dev_err(dev, "insufficient asoc_simple_card_info settings\n");
f2390880ec0264 Kuninori Morimoto 2012-04-08 680 return -EINVAL;
f2390880ec0264 Kuninori Morimoto 2012-04-08 681 }
2bee991460a838 Jean-Francois Moine 2014-01-15 682
f107294c6422e7 Kuninori Morimoto 2019-06-06 683 cpus = dai_link->cpus;
f107294c6422e7 Kuninori Morimoto 2019-06-06 684 cpus->dai_name = cinfo->cpu_dai.name;
f107294c6422e7 Kuninori Morimoto 2019-06-06 685
710af9196ce614 Kuninori Morimoto 2018-08-31 686 codecs = dai_link->codecs;
710af9196ce614 Kuninori Morimoto 2018-08-31 687 codecs->name = cinfo->codec;
710af9196ce614 Kuninori Morimoto 2018-08-31 688 codecs->dai_name = cinfo->codec_dai.name;
710af9196ce614 Kuninori Morimoto 2018-08-31 689
910fdcabedd235 Kuninori Morimoto 2019-01-21 690 platform = dai_link->platforms;
e58f41e41185c6 Kuninori Morimoto 2018-08-31 691 platform->name = cinfo->platform;
e58f41e41185c6 Kuninori Morimoto 2018-08-31 692
5be509576cf634 Kuninori Morimoto 2017-03-15 693 card->name = (cinfo->card) ? cinfo->card : cinfo->name;
5ca8ba4180a6f6 Jean-Francois Moine 2014-01-15 694 dai_link->name = cinfo->name;
5ca8ba4180a6f6 Jean-Francois Moine 2014-01-15 695 dai_link->stream_name = cinfo->name;
1efb53a220b78f Lars-Peter Clausen 2015-03-24 696 dai_link->dai_fmt = cinfo->daifmt;
ad934ca8010843 Kuninori Morimoto 2019-03-20 697 dai_link->init = asoc_simple_dai_init;
65a5056b21202e Kuninori Morimoto 2019-03-20 698 memcpy(dai_props->cpu_dai, &cinfo->cpu_dai,
65a5056b21202e Kuninori Morimoto 2019-03-20 699 sizeof(*dai_props->cpu_dai));
65a5056b21202e Kuninori Morimoto 2019-03-20 700 memcpy(dai_props->codec_dai, &cinfo->codec_dai,
65a5056b21202e Kuninori Morimoto 2019-03-20 701 sizeof(*dai_props->codec_dai));
7722f830a45f7f Jean-Francois Moine 2014-01-15 702 }
1699cddf654f06 Frank Wunderlich 2022-02-13 703 dev_err(dev,"DEBUG: Passed %s %d\n",__FUNCTION__,__LINE__);
5be509576cf634 Kuninori Morimoto 2017-03-15 704 snd_soc_card_set_drvdata(card, priv);
1699cddf654f06 Frank Wunderlich 2022-02-13 705 dev_err(dev,"DEBUG: Passed %s %d\n",__FUNCTION__,__LINE__);
0580dde5943868 Kuninori Morimoto 2019-03-20 706 asoc_simple_debug_info(priv);
1699cddf654f06 Frank Wunderlich 2022-02-13 707 dev_err(dev,"DEBUG: Passed %s %d\n",__FUNCTION__,__LINE__);
5be509576cf634 Kuninori Morimoto 2017-03-15 708 ret = devm_snd_soc_register_card(dev, card);
1699cddf654f06 Frank Wunderlich 2022-02-13 709 dev_err(dev,"DEBUG: Passed %s %d ret:%d\n",__FUNCTION__,__LINE__,ret);
c6d112e442fed7 Kuninori Morimoto 2017-05-19 710 if (ret < 0)
c6d112e442fed7 Kuninori Morimoto 2017-05-19 711 goto err;
c6d112e442fed7 Kuninori Morimoto 2017-05-19 712
ec1af6c64db94e Thierry Reding 2021-04-19 713 devm_kfree(dev, li);
c6d112e442fed7 Kuninori Morimoto 2017-05-19 714 return 0;
e512e001dafa54 Jean-Francois Moine 2014-03-11 715 err:
ad11e59f52d6fc Kuninori Morimoto 2019-03-20 716 asoc_simple_clean_reference(card);
387f5823f40044 Kuninori Morimoto 2016-08-26 717
e512e001dafa54 Jean-Francois Moine 2014-03-11 718 return ret;
f2390880ec0264 Kuninori Morimoto 2012-04-08 719 }
f2390880ec0264 Kuninori Morimoto 2012-04-08 720
:::::: The code at line 661 was first introduced by commit
:::::: ca65b492c7a265b220f763fd68bf87391213248f ASoC: simple-card: simplify code
:::::: TO: Jean-Francois Moine <moinejf(a)free.fr>
:::::: CC: Mark Brown <broonie(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week