Commit 8acb888c authored by Anton Blanchard's avatar Anton Blanchard Committed by Paul Mackerras

[PATCH] ppc64: Quieten lparcfg

If we dont have permission to read some information from the hypervisor,
lparcfg outputs a warning on the console. Now that lparcfg is world
readable this is a problem.

Dont warn in the case of H_Authority, remove some unnecessary function
prototypes and fix whitespace damage in a structure as well.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 7f7fda04
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
/* #define LPARCFG_DEBUG */ /* #define LPARCFG_DEBUG */
/* find a better place for this function... */ /* find a better place for this function... */
void log_plpar_hcall_return(unsigned long rc, char *tag) static void log_plpar_hcall_return(unsigned long rc, char *tag)
{ {
if (rc == 0) /* success, return */ if (rc == 0) /* success, return */
return; return;
...@@ -213,11 +213,10 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) ...@@ -213,11 +213,10 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs)
unsigned long dummy; unsigned long dummy;
rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);
if (rc != H_Authority)
log_plpar_hcall_return(rc, "H_PIC"); log_plpar_hcall_return(rc, "H_PIC");
} }
static unsigned long get_purr(void);
/* Track sum of all purrs across all processors. This is used to further */ /* Track sum of all purrs across all processors. This is used to further */
/* calculate usage values by different applications */ /* calculate usage values by different applications */
...@@ -319,8 +318,6 @@ static void parse_system_parameter_string(struct seq_file *m) ...@@ -319,8 +318,6 @@ static void parse_system_parameter_string(struct seq_file *m)
kfree(local_buffer); kfree(local_buffer);
} }
static int lparcfg_count_active_processors(void);
/* Return the number of processors in the system. /* Return the number of processors in the system.
* This function reads through the device tree and counts * This function reads through the device tree and counts
* the virtual processors, this does not include threads. * the virtual processors, this does not include threads.
...@@ -548,7 +545,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, ...@@ -548,7 +545,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
retval = -EIO; retval = -EIO;
} }
out: out:
kfree(kbuf); kfree(kbuf);
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment