Loading drivers/media/platform/msm/camera/cam_sync/cam_sync.c +1 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ int cam_sync_get_obj_ref(int32_t sync_obj) if (row->state != CAM_SYNC_STATE_ACTIVE) { spin_unlock(&sync_dev->row_spinlocks[sync_obj]); CAM_ERR(CAM_SYNC, CAM_ERR_RATE_LIMIT_CUSTOM(CAM_SYNC, 1, 5, "accessing an uninitialized sync obj = %d state = %d", sync_obj, row->state); return -EINVAL; Loading drivers/media/platform/msm/camera/cam_utils/cam_debug_util.h +43 −1 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -119,6 +119,27 @@ const char *cam_get_module_name(unsigned int module_id); pr_err_ratelimited("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_INFO_RATE_LIMIT_CUSTOM * @brief : This Macro will print info logs with custom ratelimit * * @__module : Respective module id which is been calling this Macro * @interval : Time interval in seconds * @burst : No of logs to print in interval time * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_INFO_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \ ({ \ static DEFINE_RATELIMIT_STATE(_rs, \ (interval * HZ), \ burst); \ if (__ratelimit(&_rs)) \ pr_info("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__,\ __LINE__, ##args); \ }) /* * CAM_DBG * @brief : This Macro will print debug logs when enabled using GROUP Loading @@ -138,4 +159,25 @@ const char *cam_get_module_name(unsigned int module_id); pr_err_ratelimited("CAM_ERR: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_ERR_RATE_LIMIT_CUSTOM * @brief : This Macro will print error logs with custom ratelimit * * @__module : Respective module id which is been calling this Macro * @interval : Time interval in seconds * @burst : No of logs to print in interval time * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_ERR_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \ ({ \ static DEFINE_RATELIMIT_STATE(_rs, \ (interval * HZ), \ burst); \ if (__ratelimit(&_rs)) \ pr_err("CAM_ERR: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__,\ __LINE__, ##args); \ }) #endif /* _CAM_DEBUG_UTIL_H_ */ Loading
drivers/media/platform/msm/camera/cam_sync/cam_sync.c +1 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ int cam_sync_get_obj_ref(int32_t sync_obj) if (row->state != CAM_SYNC_STATE_ACTIVE) { spin_unlock(&sync_dev->row_spinlocks[sync_obj]); CAM_ERR(CAM_SYNC, CAM_ERR_RATE_LIMIT_CUSTOM(CAM_SYNC, 1, 5, "accessing an uninitialized sync obj = %d state = %d", sync_obj, row->state); return -EINVAL; Loading
drivers/media/platform/msm/camera/cam_utils/cam_debug_util.h +43 −1 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -119,6 +119,27 @@ const char *cam_get_module_name(unsigned int module_id); pr_err_ratelimited("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_INFO_RATE_LIMIT_CUSTOM * @brief : This Macro will print info logs with custom ratelimit * * @__module : Respective module id which is been calling this Macro * @interval : Time interval in seconds * @burst : No of logs to print in interval time * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_INFO_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \ ({ \ static DEFINE_RATELIMIT_STATE(_rs, \ (interval * HZ), \ burst); \ if (__ratelimit(&_rs)) \ pr_info("CAM_INFO: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__,\ __LINE__, ##args); \ }) /* * CAM_DBG * @brief : This Macro will print debug logs when enabled using GROUP Loading @@ -138,4 +159,25 @@ const char *cam_get_module_name(unsigned int module_id); pr_err_ratelimited("CAM_ERR: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__, __LINE__, ##args) /* * CAM_ERR_RATE_LIMIT_CUSTOM * @brief : This Macro will print error logs with custom ratelimit * * @__module : Respective module id which is been calling this Macro * @interval : Time interval in seconds * @burst : No of logs to print in interval time * @fmt : Formatted string which needs to be print in log * @args : Arguments which needs to be print in log */ #define CAM_ERR_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \ ({ \ static DEFINE_RATELIMIT_STATE(_rs, \ (interval * HZ), \ burst); \ if (__ratelimit(&_rs)) \ pr_err("CAM_ERR: %s: %s: %d " fmt "\n", \ cam_get_module_name(__module), __func__,\ __LINE__, ##args); \ }) #endif /* _CAM_DEBUG_UTIL_H_ */