gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / tools / perf / util / expr.h
blob9377538f40978170125d44b8cf1ea4be9cad3564
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef PARSE_CTX_H
3 #define PARSE_CTX_H 1
5 #define EXPR_MAX_OTHER 20
6 #define MAX_PARSE_ID EXPR_MAX_OTHER
8 struct parse_id {
9 const char *name;
10 double val;
13 struct parse_ctx {
14 int num_ids;
15 struct parse_id ids[MAX_PARSE_ID];
18 void expr__ctx_init(struct parse_ctx *ctx);
19 void expr__add_id(struct parse_ctx *ctx, const char *id, double val);
20 int expr__parse(double *final_val, struct parse_ctx *ctx, const char *expr);
21 int expr__find_other(const char *expr, const char *one, const char ***other,
22 int *num_other);
24 #endif