diff options
author | Cédric Le Goater <clg@fr.ibm.com> | 2016-03-10 15:03:55 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-03-11 16:59:13 +0200 |
commit | a580d82085278bffbabc3ab1a6fee9670b0c5e54 (patch) | |
tree | 7cc094f8aae9faf0895166640feda0d428f47570 /target-tricore | |
parent | 4f298a4b2957b7833bc607c951ca27c458d98d88 (diff) |
ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers
The IPMI command handlers in the BMC simulator use a macro
IPMI_ADD_RSP_DATA() to push bytes in a response buffer. The macro
hides the fact that it implicitly uses variables local to the handler,
which is misleading.
This patch introduces a simple 'struct RspBuffer' and inlined helper
routines to store byte(s) in a response buffer. rsp_buffer_push()
replaces the macro IPMI_ADD_RSP_DATA() and rsp_buffer_pushmore() is
new helper to push multiple bytes. The latest is used in the command
handlers get_msg() and get_sdr() which are manipulating the buffer
directly.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'target-tricore')
0 files changed, 0 insertions, 0 deletions