ACK: [PATCH 07/13] lib: fwts_ipmi: make fwts_ipmi_msg_id static, make some code style changes
ivanhu
ivan.hu at canonical.com
Thu Aug 16 09:04:26 UTC 2018
On 08/14/2018 07:24 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Variable fwts_ipmi_msg_id does not need to be in global scope so
> make it static. Make some fwts coding style changes and remove
> some empty lines.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_ipmi.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/src/lib/src/fwts_ipmi.c b/src/lib/src/fwts_ipmi.c
> index a4c8a511..36acf6ee 100644
> --- a/src/lib/src/fwts_ipmi.c
> +++ b/src/lib/src/fwts_ipmi.c
> @@ -27,10 +27,11 @@
>
> #include "fwts.h"
>
> -unsigned int fwts_ipmi_msg_id = 1;
> +static unsigned int fwts_ipmi_msg_id = 1;
> static const char *fwts_ipmi_devnode = "/dev/ipmi0";
>
> -bool fwts_ipmi_present(int fwts_ipmi_flags) {
> +bool fwts_ipmi_present(int fwts_ipmi_flags)
> +{
> return !access(fwts_ipmi_devnode, fwts_ipmi_flags);
> }
>
> @@ -49,7 +50,6 @@ int fwts_ipmi_exec_query(
> return FWTS_ERROR;
>
> fwts_send_rc = ioctl(fd, IPMICTL_SEND_COMMAND, (char *)fwts_ipmi_req);
> -
> if (fwts_send_rc != 0) {
> (void)close(fd);
> return FWTS_ERROR;
> @@ -69,7 +69,6 @@ int fwts_ipmi_exec_query(
> fwts_ipmi_recv.addr = (unsigned char *)&fwts_ipmi_addr;
> fwts_ipmi_recv.addr_len = sizeof (fwts_ipmi_addr);
> fwts_recv_rc = ioctl(fd, IPMICTL_RECEIVE_MSG_TRUNC, &fwts_ipmi_recv);
> -
> if (fwts_recv_rc != 0) {
> (void)close(fd);
> return FWTS_ERROR;
Acked-by: Ivan Hu <ivan.hu at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180816/60553543/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180816/60553543/attachment.sig>
More information about the fwts-devel
mailing list