This patch just fixes the following checkpatch's warnings.
[Warning results from Tizen's checkpatch]
src/pass/pass-parser.c:
:210: ERROR: [IDT_M_TAB] code indent should use tabs where possible
:210: ERROR: [IDT_M_TAB] please, no spaces at the start of a line
:480: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:483: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:615: ERROR: [SPC_M_OPR] spaces required around that '=' (ctx:WxV)
src/pass/pass.c
:355: ERROR: [IDT_M_TAB] please, no space before tabs
:366: ERROR: [IDT_M_TAB] please, no space before tabs
src/pass/pass-gov.c
:387: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
src/core/device-notifier.c
:32: ERROR: [BRC_M_FTN] open brace '{' following function declarations go on the next line
src/pmqos/pmqos.c
:92: WARNING: [BRC_R_SST] braces {} are not necessary
for any arm of this statement
src/shared/log.h
:28: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:29: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:30: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:31: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
src/pass/pass.h
:408: ERROR: [SPC_M_SEP] space prohibited after that open parenthesis '('
:408: ERROR: [SPC_M_SEP] space prohibited before that close parenthesis ')'
:409: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:409: ERROR: [SPC_M_OPR] space required after that ';' (ctx:VxV)
:409: ERROR: [SPC_M_SEP] space prohibited after that open parenthesis '('
:409: ERROR: [SPC_M_SEP] space prohibited before that close parenthesis ')'
src/core/config-parser.h
:40: ERROR: [IDT_M_TAB] please, no spaces at the start of a line
src/core/devices.h
:116: ERROR: [SPC_M_OPR] spaces required around that '?' (ctx:VxW)
:119: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:120: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:123: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:124: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
src/core/common.h
:115: ERROR: [IDT_M_TAB] code indent should use tabs where possible
src/core/common.h:115: ERROR: [IDT_M_TAB] please, no spaces at the start of a line
src/core/common.h:116: ERROR: [IDT_M_TAB] code indent should use tabs where possible
src/core/common.h:116: ERROR: [IDT_M_TAB] please, no spaces at the start of a line
src/core/common.h:117: ERROR: [IDT_M_TAB] code indent should use tabs where possible
src/core/common.h:117: ERROR: [IDT_M_TAB] please, no spaces at the start of a line
src/core/common.h:118: ERROR: [IDT_M_TAB] code indent should use tabs where possible
src/core/common.h:118: ERROR: [IDT_M_TAB] please, no spaces at the start of a line
src/hal/hal-log.h
:29: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:30: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:31: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:32: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:33: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:34: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:35: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
:36: ERROR: [SPC_M_KWD] space required before the open parenthesis '('
src/hal/hal.h
:26: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:26: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:26: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:29: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:29: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:29: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:29: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:29: ERROR: [SPC_M_OPR] space required after that ',' (ctx:Vx )
:29: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:31: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:31: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
:31: ERROR: [SPC_M_OPR] space required after that ',' (ctx:VxV)
Change-Id: I9bfb0db97b825e00d89487929037f833ecc0f156
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
}
#define ret_value_if(expr, val) do { \
- if (expr) { \
- _E("(%s)", #expr); \
- return (val); \
- } \
+ if (expr) { \
+ _E("(%s)", #expr); \
+ return (val); \
+ } \
} while (0)
#define ret_value_msg_if(expr, val, fmt, arg...) do { \
* @return 0 on success, negative if failed
*/
int config_parse(const char *file_name, int cb(struct parse_result *result,
- void *user_data), void *user_data);
+ void *user_data), void *user_data);
#endif
static guint idle_func_id = 0;
static struct device_notifier device_notifiers[DEVICE_NOTIFIER_MAX_COUNT];
-static struct device_notifier *get_device_notifier(void) {
+static struct device_notifier *get_device_notifier(void)
+{
static int pos = 0;
if ((pos < DEVICE_NOTIFIER_MAX_COUNT) &&
const struct device_ops *find_device(const char *name);
int check_default(const struct device_ops *dev);
-#define NOT_SUPPORT_OPS(dev) \
- ((check_default(dev))? 1 : 0)
+#define NOT_SUPPORT_OPS(dev) ((check_default(dev)) ? 1 : 0)
#define FIND_DEVICE_INT(dev, name) do { \
- if (!dev) dev = find_device(name); if(check_default(dev)) return -ENODEV; \
-} while(0)
+ if (!dev) dev = find_device(name); if (check_default(dev)) return -ENODEV; \
+} while (0)
#define FIND_DEVICE_VOID(dev, name) do { \
- if (!dev) dev = find_device(name); if(check_default(dev)) return; \
-} while(0)
+ if (!dev) dev = find_device(name); if (check_default(dev)) return; \
+} while (0)
#endif
#define LOG_TAG "PASS"
#endif /* LOG_TAG */
-
-#define _D(fmt, arg...) do { SLOGD(fmt, ##arg); } while(0)
-#define _I(fmt, arg...) do { SLOGI(fmt, ##arg); } while(0)
-#define _W(fmt, arg...) do { SLOGW(fmt, ##arg); } while(0)
-#define _E(fmt, arg...) do { SLOGE(fmt, ##arg); } while(0)
-#define _SD(fmt, arg...) do { SECURE_SLOGD(fmt, ##arg); } while(0)
-#define _SI(fmt, arg...) do { SECURE_SLOGI(fmt, ##arg); } while(0)
-#define _SW(fmt, arg...) do { SECURE_SLOGW(fmt, ##arg); } while(0)
-#define _SE(fmt, arg...) do { SECURE_SLOGE(fmt, ##arg); } while(0)
+#define _D(fmt, arg...) do { SLOGD(fmt, ##arg); } while (0)
+#define _I(fmt, arg...) do { SLOGI(fmt, ##arg); } while (0)
+#define _W(fmt, arg...) do { SLOGW(fmt, ##arg); } while (0)
+#define _E(fmt, arg...) do { SLOGE(fmt, ##arg); } while (0)
+#define _SD(fmt, arg...) do { SECURE_SLOGD(fmt, ##arg); } while (0)
+#define _SI(fmt, arg...) do { SECURE_SLOGI(fmt, ##arg); } while (0)
+#define _SW(fmt, arg...) do { SECURE_SLOGW(fmt, ##arg); } while (0)
+#define _SE(fmt, arg...) do { SECURE_SLOGE(fmt, ##arg); } while (0)
#endif /* __HAL_LOG_H__ */
#define BUFF_MAX 255
-#define MAKE_4B_CODE_4(A,B,C,D) \
- ((((A) & 0xff) << 24) | (((B) & 0xff) << 16) | \
+#define MAKE_4B_CODE_4(A, B, C, D) \
+ ((((A) & 0xff) << 24) | (((B) & 0xff) << 16) | \
(((C) & 0xff) << 8) | (((D) & 0xff)))
-#define MAKE_TAG_CONSTANT(A,B,C,D) MAKE_4B_CODE_4(A,B,C,D)
+#define MAKE_TAG_CONSTANT(A, B, C, D) MAKE_4B_CODE_4(A, B, C, D)
-#define HAL_INFO_TAG MAKE_TAG_CONSTANT('P','A','S','S')
+#define HAL_INFO_TAG MAKE_TAG_CONSTANT('P', 'A', 'S', 'S')
/* Symbolic name of the HAL info (PASS HAL Info) */
#define HAL_INFO_SYM PassHalInfo
{
int ret;
- if(policy->gov_timeout < 0) {
+ if (policy->gov_timeout < 0) {
_E("invalid timeout value [%d]!", policy->gov_timeout);
pass_governor_update(policy, PASS_GOV_STOP);
return -EINVAL;
if (!result->section || !result->name || !result->value)
return 0;
- if (MATCH(result->name, "pass_support"))
+ if (MATCH(result->name, "pass_support"))
policy->state = atoi(result->value);
else if (MATCH(result->name, "pass_gov_type"))
policy->gov_type = atoi(result->value);
void pass_put_table(struct pass_policy *policy)
{
- if(policy->pass_table)
+ if (policy->pass_table)
free(policy->pass_table);
- if(policy->scenario.list)
+ if (policy->scenario.list)
free(policy->scenario.list);
}
len = strlen(result->value);
snprintf(path_compatible, len + 1, "%s", result->value);
- len =strlen(compatible);
+ len = strlen(compatible);
if (len > 0) {
ret = check_compatible(compatible, path_compatible);
if (ret < 0)
* pass_init - Initialize PASS(Power Aware System Service)
*
* @data: When the data is passed from pass_main(), it is NULL.
- * On the other hand, it will contain the result of this function
+ * On the other hand, it will contain the result of this function
*/
static void pass_init(void *data)
{
* pass_exit - Exit PASS
*
* @data: When the data is passed from pass_main(), it is NULL.
- * On the other hand, it will contain the result of this function
+ * On the other hand, it will contain the result of this function
*/
static void pass_exit(void *data)
{
};
#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
+ const typeof(((type *)0)->member) *__mptr = (ptr); \
+ (type *)((char *)__mptr - offsetof(type, member)); })
#define to_pass_resource(policy) \
container_of(policy, struct pass_resource, policy)
int ret = 0;
int booting_done = 1;
- if (g_initialized) {
+ if (g_initialized)
_I("PASS PMQoS is already started\n");
- } else {
+ else
ret = pmqos_init_done(&booting_done, NULL);
- }
g_dbus_method_invocation_return_value(invoc, g_variant_new("(i)", ret));
#define LOG_TAG "PASS"
#endif /* LOG_TAG */
-#define _D(fmt, arg...) do { SLOGD(fmt, ##arg); } while(0)
-#define _I(fmt, arg...) do { SLOGI(fmt, ##arg); } while(0)
-#define _W(fmt, arg...) do { SLOGW(fmt, ##arg); } while(0)
-#define _E(fmt, arg...) do { SLOGE(fmt, ##arg); } while(0)
+#define _D(fmt, arg...) do { SLOGD(fmt, ##arg); } while (0)
+#define _I(fmt, arg...) do { SLOGI(fmt, ##arg); } while (0)
+#define _W(fmt, arg...) do { SLOGW(fmt, ##arg); } while (0)
+#define _E(fmt, arg...) do { SLOGE(fmt, ##arg); } while (0)
#endif