Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262352
b: refs/heads/master
c: eecf2f7
h: refs/heads/master
v: v3
  • Loading branch information
Huang Ying authored and Len Brown committed Jul 14, 2011
1 parent 904774d commit 6f146a4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5588340d46a484da53bbce8136184d9c7fbc259c
refs/heads/master: eecf2f7124834dd1cad21807526a8ea031ba8217
9 changes: 5 additions & 4 deletions trunk/drivers/acpi/apei/apei-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ EXPORT_SYMBOL_GPL(apei_exec_noop);
* Interpret the specified action. Go through whole action table,
* execute all instructions belong to the action.
*/
int apei_exec_run(struct apei_exec_context *ctx, u8 action)
int __apei_exec_run(struct apei_exec_context *ctx, u8 action,
bool optional)
{
int rc;
int rc = -ENOENT;
u32 i, ip;
struct acpi_whea_header *entry;
apei_exec_ins_func_t run;
Expand Down Expand Up @@ -198,9 +199,9 @@ int apei_exec_run(struct apei_exec_context *ctx, u8 action)
goto rewind;
}

return 0;
return !optional && rc < 0 ? rc : 0;
}
EXPORT_SYMBOL_GPL(apei_exec_run);
EXPORT_SYMBOL_GPL(__apei_exec_run);

typedef int (*apei_exec_entry_func_t)(struct apei_exec_context *ctx,
struct acpi_whea_header *entry,
Expand Down
13 changes: 12 additions & 1 deletion trunk/drivers/acpi/apei/apei-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,18 @@ static inline u64 apei_exec_ctx_get_output(struct apei_exec_context *ctx)
return ctx->value;
}

int apei_exec_run(struct apei_exec_context *ctx, u8 action);
int __apei_exec_run(struct apei_exec_context *ctx, u8 action, bool optional);

static inline int apei_exec_run(struct apei_exec_context *ctx, u8 action)
{
return __apei_exec_run(ctx, action, 0);
}

/* It is optional whether the firmware provides the action */
static inline int apei_exec_run_optional(struct apei_exec_context *ctx, u8 action)
{
return __apei_exec_run(ctx, action, 1);
}

/* Common instruction implementation */

Expand Down

0 comments on commit 6f146a4

Please sign in to comment.