Hi Stefan, I love your patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.16-rc7 next-20180329] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Stefan-Wahren/staging-vchiq_core-Fix-missing-semaphore-release-in-error-case/20180401-055855 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=ia64 All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:7:0, from include/linux/kernel.h:14, from drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c:35: drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c: In function 'vchiq_dump_service_use_state': include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH' #define KERN_INFO KERN_SOH "6" /* informational */ ^~~~~~~~ drivers/staging//vc04_services/interface/vchiq_arm/vchiq_core.h:52:28: note: in expansion of macro 'KERN_INFO' #define VCHIQ_LOG_PREFIX KERN_INFO "vchiq: " ^~~~~~~~~ drivers/staging//vc04_services/interface/vchiq_arm/vchiq_core.h:62:11: note: in expansion of macro 'VCHIQ_LOG_PREFIX' printk(VCHIQ_LOG_PREFIX fmt "\n", ##__VA_ARGS__); } while (0) ^~~~~~~~~~~~~~~~ >> drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c:3479:3: note: in expansion of macro 'vchiq_log_warning' vchiq_log_warning(vchiq_susp_log_level, "Too many active " ^~~~~~~~~~~~~~~~~ drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c:3480:47: note: format string is defined here "services (%d). Only dumping up to first %d services " ~^ %ld vim +/vchiq_log_warning +3479 drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c 8dbc30957 Stefan Wahren 2018-03-31 3422 71bad7f08 popcornmix 2013-07-02 3423 void 71bad7f08 popcornmix 2013-07-02 3424 vchiq_dump_service_use_state(VCHIQ_STATE_T *state) 71bad7f08 popcornmix 2013-07-02 3425 { 71bad7f08 popcornmix 2013-07-02 3426 VCHIQ_ARM_STATE_T *arm_state = vchiq_platform_get_arm_state(state); 8dbc30957 Stefan Wahren 2018-03-31 3427 static struct service_data_struct service_data[64]; 71bad7f08 popcornmix 2013-07-02 3428 int i, j = 0; 71bad7f08 popcornmix 2013-07-02 3429 /* If there's more than 64 services, only dump ones with 71bad7f08 popcornmix 2013-07-02 3430 * non-zero counts */ 71bad7f08 popcornmix 2013-07-02 3431 int only_nonzero = 0; 71bad7f08 popcornmix 2013-07-02 3432 static const char *nz = "<-- preventing suspend"; 71bad7f08 popcornmix 2013-07-02 3433 71bad7f08 popcornmix 2013-07-02 3434 enum vc_suspend_status vc_suspend_state; 71bad7f08 popcornmix 2013-07-02 3435 enum vc_resume_status vc_resume_state; 71bad7f08 popcornmix 2013-07-02 3436 int peer_count; 71bad7f08 popcornmix 2013-07-02 3437 int vc_use_count; 71bad7f08 popcornmix 2013-07-02 3438 int active_services; 71bad7f08 popcornmix 2013-07-02 3439 71bad7f08 popcornmix 2013-07-02 3440 if (!arm_state) 71bad7f08 popcornmix 2013-07-02 3441 return; 71bad7f08 popcornmix 2013-07-02 3442 71bad7f08 popcornmix 2013-07-02 3443 read_lock_bh(&arm_state->susp_res_lock); 71bad7f08 popcornmix 2013-07-02 3444 vc_suspend_state = arm_state->vc_suspend_state; 71bad7f08 popcornmix 2013-07-02 3445 vc_resume_state = arm_state->vc_resume_state; 71bad7f08 popcornmix 2013-07-02 3446 peer_count = arm_state->peer_use_count; 71bad7f08 popcornmix 2013-07-02 3447 vc_use_count = arm_state->videocore_use_count; 71bad7f08 popcornmix 2013-07-02 3448 active_services = state->unused_service; 8dbc30957 Stefan Wahren 2018-03-31 3449 if (active_services > ARRAY_SIZE(service_data)) 71bad7f08 popcornmix 2013-07-02 3450 only_nonzero = 1; 71bad7f08 popcornmix 2013-07-02 3451 8dbc30957 Stefan Wahren 2018-03-31 3452 for (i = 0; (i < active_services) && (j < ARRAY_SIZE(service_data)); i++) { 71bad7f08 popcornmix 2013-07-02 3453 VCHIQ_SERVICE_T *service_ptr = state->services[i]; 6e475350a Yamanappagouda Patil 2017-02-21 3454 71bad7f08 popcornmix 2013-07-02 3455 if (!service_ptr) 71bad7f08 popcornmix 2013-07-02 3456 continue; 71bad7f08 popcornmix 2013-07-02 3457 71bad7f08 popcornmix 2013-07-02 3458 if (only_nonzero && !service_ptr->service_use_count) 71bad7f08 popcornmix 2013-07-02 3459 continue; 71bad7f08 popcornmix 2013-07-02 3460 b322396ce Stefan Wahren 2017-05-26 3461 if (service_ptr->srvstate == VCHIQ_SRVSTATE_FREE) b322396ce Stefan Wahren 2017-05-26 3462 continue; b322396ce Stefan Wahren 2017-05-26 3463 71bad7f08 popcornmix 2013-07-02 3464 service_data[j].fourcc = service_ptr->base.fourcc; 71bad7f08 popcornmix 2013-07-02 3465 service_data[j].clientid = service_ptr->client_id; b322396ce Stefan Wahren 2017-05-26 3466 service_data[j++].use_count = service_ptr->service_use_count; 71bad7f08 popcornmix 2013-07-02 3467 } 71bad7f08 popcornmix 2013-07-02 3468 71bad7f08 popcornmix 2013-07-02 3469 read_unlock_bh(&arm_state->susp_res_lock); 71bad7f08 popcornmix 2013-07-02 3470 71bad7f08 popcornmix 2013-07-02 3471 vchiq_log_warning(vchiq_susp_log_level, 71bad7f08 popcornmix 2013-07-02 3472 "-- Videcore suspend state: %s --", 71bad7f08 popcornmix 2013-07-02 3473 suspend_state_names[vc_suspend_state + VC_SUSPEND_NUM_OFFSET]); 71bad7f08 popcornmix 2013-07-02 3474 vchiq_log_warning(vchiq_susp_log_level, 71bad7f08 popcornmix 2013-07-02 3475 "-- Videcore resume state: %s --", 71bad7f08 popcornmix 2013-07-02 3476 resume_state_names[vc_resume_state + VC_RESUME_NUM_OFFSET]); 71bad7f08 popcornmix 2013-07-02 3477 71bad7f08 popcornmix 2013-07-02 3478 if (only_nonzero) 71bad7f08 popcornmix 2013-07-02 @3479 vchiq_log_warning(vchiq_susp_log_level, "Too many active " 71bad7f08 popcornmix 2013-07-02 3480 "services (%d). Only dumping up to first %d services " 71bad7f08 popcornmix 2013-07-02 3481 "with non-zero use-count", active_services, 8dbc30957 Stefan Wahren 2018-03-31 3482 ARRAY_SIZE(service_data)); 71bad7f08 popcornmix 2013-07-02 3483 71bad7f08 popcornmix 2013-07-02 3484 for (i = 0; i < j; i++) { 71bad7f08 popcornmix 2013-07-02 3485 vchiq_log_warning(vchiq_susp_log_level, 71bad7f08 popcornmix 2013-07-02 3486 "----- %c%c%c%c:%d service count %d %s", 71bad7f08 popcornmix 2013-07-02 3487 VCHIQ_FOURCC_AS_4CHARS(service_data[i].fourcc), 71bad7f08 popcornmix 2013-07-02 3488 service_data[i].clientid, 71bad7f08 popcornmix 2013-07-02 3489 service_data[i].use_count, 71bad7f08 popcornmix 2013-07-02 3490 service_data[i].use_count ? nz : ""); 71bad7f08 popcornmix 2013-07-02 3491 } 71bad7f08 popcornmix 2013-07-02 3492 vchiq_log_warning(vchiq_susp_log_level, 71bad7f08 popcornmix 2013-07-02 3493 "----- VCHIQ use count count %d", peer_count); 71bad7f08 popcornmix 2013-07-02 3494 vchiq_log_warning(vchiq_susp_log_level, 71bad7f08 popcornmix 2013-07-02 3495 "--- Overall vchiq instance use count %d", vc_use_count); 71bad7f08 popcornmix 2013-07-02 3496 71bad7f08 popcornmix 2013-07-02 3497 vchiq_dump_platform_use_state(state); 71bad7f08 popcornmix 2013-07-02 3498 } 71bad7f08 popcornmix 2013-07-02 3499 :::::: The code at line 3479 was first introduced by commit :::::: 71bad7f086419dc674244b91ca35a12bfa4cb597 staging: add bcm2708 vchiq driver :::::: TO: popcornmix <popcornmix@xxxxxxxxx> :::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel