diff mbox series

[3/3] x86/sgx: Fix whitespace damage in sgx_encl_page_alloc()

Message ID 20190823215236.8081-4-sean.j.christopherson@intel.com (mailing list archive)
State New, archived
Headers show
Series x86/sgx: Misc code cleanups | expand

Commit Message

Sean Christopherson Aug. 23, 2019, 9:52 p.m. UTC
Fix a variety of recently introduced whitespace damage.  No functional
change intended.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kernel/cpu/sgx/ioctl.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/kernel/cpu/sgx/ioctl.c b/arch/x86/kernel/cpu/sgx/ioctl.c
index ead9fb2d9b69..3ce7849f067b 100644
--- a/arch/x86/kernel/cpu/sgx/ioctl.c
+++ b/arch/x86/kernel/cpu/sgx/ioctl.c
@@ -133,7 +133,7 @@  static struct sgx_encl_page *sgx_encl_page_alloc(struct sgx_encl *encl,
 						 u64 secinfo_flags)
 {
 	struct sgx_encl_page *encl_page;
-       unsigned long prot;
+	unsigned long prot;
 
 	encl_page = kzalloc(sizeof(*encl_page), GFP_KERNEL);
 	if (!encl_page)
@@ -145,18 +145,17 @@  static struct sgx_encl_page *sgx_encl_page_alloc(struct sgx_encl *encl,
 	if (secinfo_flags & SGX_SECINFO_TCS)
 		encl_page->desc |= SGX_ENCL_PAGE_TCS;
 
+	prot = _calc_vm_trans(secinfo_flags, SGX_SECINFO_R, PROT_READ)  |
+	       _calc_vm_trans(secinfo_flags, SGX_SECINFO_W, PROT_WRITE) |
+	       _calc_vm_trans(secinfo_flags, SGX_SECINFO_X, PROT_EXEC);
 
-       prot = _calc_vm_trans(secinfo_flags, SGX_SECINFO_R, PROT_READ)  |
-	      _calc_vm_trans(secinfo_flags, SGX_SECINFO_W, PROT_WRITE) |
-	      _calc_vm_trans(secinfo_flags, SGX_SECINFO_X, PROT_EXEC);
-
-       /*
-	* TCS pages must always RW set for CPU access while the SECINFO
-	* permissions are *always* zero - the CPU ignores the user provided
-	* values and silently overwrites them with zero permissions.
-	*/
-       if ((secinfo_flags & SGX_SECINFO_PAGE_TYPE_MASK) == SGX_SECINFO_TCS)
-	       prot |= PROT_READ | PROT_WRITE;
+	/*
+	 * TCS pages must always RW set for CPU access while the SECINFO
+	 * permissions are *always* zero - the CPU ignores the user provided
+	 * values and silently overwrites them with zero permissions.
+	 */
+	if ((secinfo_flags & SGX_SECINFO_PAGE_TYPE_MASK) == SGX_SECINFO_TCS)
+		prot |= PROT_READ | PROT_WRITE;
 
 	/* Calculate maximum of the VM flags for the page. */
 	encl_page->vm_max_prot_bits = calc_vm_prot_bits(prot, 0);