Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d33dcb9e authored by Peter Oruba's avatar Peter Oruba Committed by Ingo Molnar
Browse files

x86: Microcode patch loader style corrections



Style corrections to main microcode module.

Signed-off-by: default avatarPeter Oruba <peter.oruba@amd.com>
Cc: Peter Oruba <peter.oruba@amd.com>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 34a1b9fc
Loading
Loading
Loading
Loading
+13 −11
Original line number Original line Diff line number Diff line
@@ -55,8 +55,8 @@
 *		in a single CPU package.
 *		in a single CPU package.
 *	1.10	28 Feb 2002 Asit K Mallick <asit.k.mallick@intel.com> and
 *	1.10	28 Feb 2002 Asit K Mallick <asit.k.mallick@intel.com> and
 *		Tigran Aivazian <tigran@veritas.com>,
 *		Tigran Aivazian <tigran@veritas.com>,
 *		Serialize updates as required on HT processors due to speculative
 *		Serialize updates as required on HT processors due to
 *		nature of implementation.
 *		speculative nature of implementation.
 *	1.11	22 Mar 2002 Tigran Aivazian <tigran@veritas.com>
 *	1.11	22 Mar 2002 Tigran Aivazian <tigran@veritas.com>
 *		Fix the panic when writing zero-length microcode chunk.
 *		Fix the panic when writing zero-length microcode chunk.
 *	1.12	29 Sep 2003 Nitin Kamble <nitin.a.kamble@intel.com>,
 *	1.12	29 Sep 2003 Nitin Kamble <nitin.a.kamble@intel.com>,
@@ -71,7 +71,7 @@
 *		Thanks to Stuart Swales for pointing out this bug.
 *		Thanks to Stuart Swales for pointing out this bug.
 */
 */


//#define DEBUG /* pr_debug */
/*#define DEBUG pr_debug */
#include <linux/capability.h>
#include <linux/capability.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/init.h>
@@ -164,12 +164,14 @@ static int microcode_open (struct inode *unused1, struct file *unused2)
	return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
	return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
}
}


static ssize_t microcode_write (struct file *file, const char __user *buf, size_t len, loff_t *ppos)
static ssize_t microcode_write(struct file *file, const char __user *buf,
			       size_t len, loff_t *ppos)
{
{
	ssize_t ret;
	ssize_t ret;


	if ((len >> PAGE_SHIFT) > num_physpages) {
	if ((len >> PAGE_SHIFT) > num_physpages) {
		printk(KERN_ERR "microcode: too much data (max %ld pages)\n", num_physpages);
		printk(KERN_ERR "microcode: too much data (max %ld pages)\n",
		       num_physpages);
		return -EINVAL;
		return -EINVAL;
	}
	}