astlpc: Fix up FILEIO function definitions

The functions have no business being marked as const due to the logging.
The GCC manual has this to say:

> Calls to functions whose return value is not affected by changes to
> the observable state of the program and that have no observable
> effects on such state other than to return a value may lend themselves
> to optimizations such as common subexpression elimination. Declaring
> such functions with the const attribute allows GCC to avoid emitting
> some calls in repeated invocations of the function with the same
> argument values.
>
> For example,
>
> int square (int) __attribute__ ((const));
>
> tells GCC that subsequent calls to function square with the same
> argument value can be replaced by the result of the first call
> regardless of the statements in between.
>
> The const attribute prohibits a function from reading objects that
> affect its return value between successive invocations. However,
> functions declared with the attribute can safely read objects that do
> not change their return value, such as non-volatile constants.
>
> The const attribute imposes greater restrictions on a function’s
> definition than the similar pure attribute. Declaring the same
> function with both the const and the pure attribute is diagnosed.
> Because a const function cannot have any observable side effects it
> does not make sense for it to return void. Declaring such a function
> is diagnosed.
>
> Note that a function that has pointer arguments and examines the data
> pointed to must not be declared const if the pointed-to data might
> change between successive invocations of the function. In general,
> since a function cannot distinguish data that might change from data
> that cannot, const functions should never take pointer or, in C++,
> reference arguments. Likewise, a function that calls a non-const
> function usually must not be const itself.

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes

Further, the logging was broken as there was no valid astlpc object in
the case of mctp_astlpc_init_fileio(), and any such instance passed to
mctp_astlp_get_fd() would be invalid.

Switch the logging to use mctp_prlog() instead.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ic27ff76a7f5577004f53fb236d397b03fa55ec4a
diff --git a/astlpc.c b/astlpc.c
index 807b6fc..8d316e3 100644
--- a/astlpc.c
+++ b/astlpc.c
@@ -1348,17 +1348,15 @@
 	return astlpc;
 }
 #else
-struct mctp_binding_astlpc * __attribute__((const))
-	mctp_astlpc_init_fileio(void)
+struct mctp_binding_astlpc *mctp_astlpc_init_fileio(void)
 {
-	astlpc_prerr(astlpc, "Missing support for file IO");
+	mctp_prlog(MCTP_LOG_ERR, "%s: Missing support for file IO", __func__);
 	return NULL;
 }
 
-int __attribute__((const)) mctp_astlpc_get_fd(
-		struct mctp_binding_astlpc *astlpc __attribute__((unused)))
+int mctp_astlpc_get_fd(struct mctp_binding_astlpc *astlpc __unused)
 {
-	astlpc_prerr(astlpc, "Missing support for file IO");
+	mctp_prlog(MCTP_LOG_ERR, "%s: Missing support for file IO", __func__);
 	return -1;
 }
 #endif