x86/resctrl: Cleanup cbm_ensure_valid()
authorReinette Chatre <reinette.chatre@intel.com>
Mon, 24 Jun 2019 20:34:27 +0000 (13:34 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 25 Jun 2019 07:26:11 +0000 (09:26 +0200)
commit2ef085bd110c5723ca08a522608ac3468dc304bd
tree861f6b1fb1279551f2dba98c6f5e02400b474d52
parent4fedcde7026835a05b44aab388d4bb95f3226286
x86/resctrl: Cleanup cbm_ensure_valid()

A recent fix to the cbm_ensure_valid() function left some coding style
issues that are now addressed:

- Return a value instead of using a function parameter as input and
  output
- Use if (!val) instead of if (val == 0)
- Follow reverse fir tree ordering of variable declarations

Suggested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: fenghua.yu@intel.com
Cc: tony.luck@intel.com
Cc: hpa@zytor.com
Link: https://lkml.kernel.org/r/15ba03856f1d944468ee6f44e3fd7aa548293ede.1561408280.git.reinette.chatre@intel.com
arch/x86/kernel/cpu/resctrl/rdtgroup.c