hv: fix 'Space missing before or after binary operator'

This patch adds the necessary space before or after binary operator.

v1 -> v2:
 * minor fix related to integer
   [i - 1] ====> [i - 1U]

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
Shiqing Gao 2018-12-03 13:29:01 +08:00 committed by wenlingz
parent e32b2b4c11
commit b38629b85e
9 changed files with 13 additions and 17 deletions

View File

@ -468,8 +468,7 @@ void init_e820(void)
struct multiboot_mmap *mmap = struct multiboot_mmap *mmap =
(struct multiboot_mmap *) (struct multiboot_mmap *)
hpa2hva((uint64_t)mbi->mi_mmap_addr); hpa2hva((uint64_t)mbi->mi_mmap_addr);
e820_entries = mbi->mi_mmap_length/ e820_entries = mbi->mi_mmap_length / sizeof(struct multiboot_mmap);
sizeof(struct multiboot_mmap);
if (e820_entries > E820_MAX_ENTRIES) { if (e820_entries > E820_MAX_ENTRIES) {
pr_err("Too many E820 entries %d\n", pr_err("Too many E820 entries %d\n",
e820_entries); e820_entries);

View File

@ -310,8 +310,7 @@ static inline uint32_t get_max_svn_index(void)
uint32_t i, max_svn_idx = 0U; uint32_t i, max_svn_idx = 0U;
for (i = 1U; i < g_key_info.num_seeds; i++) { for (i = 1U; i < g_key_info.num_seeds; i++) {
if (g_key_info.dseed_list[i].cse_svn > if (g_key_info.dseed_list[i].cse_svn > g_key_info.dseed_list[i - 1U].cse_svn) {
g_key_info.dseed_list[i-1].cse_svn) {
max_svn_idx = i; max_svn_idx = i;
} }
} }

View File

@ -267,8 +267,7 @@ static void print_pow2(struct print_param *param,
mask = (1UL << shift) - 1UL; mask = (1UL << shift) - 1UL;
/* determine digit translation table */ /* determine digit translation table */
digits = ((param->vars.flags & PRINT_FLAG_UPPER) != 0U) ? digits = ((param->vars.flags & PRINT_FLAG_UPPER) != 0U) ? &upper_hex_digits : &lower_hex_digits;
&upper_hex_digits : &lower_hex_digits;
/* apply mask for short/char */ /* apply mask for short/char */
v &= param->vars.mask; v &= param->vars.mask;

View File

@ -417,8 +417,7 @@ int strncmp(const char *s1_arg, const char *s2_arg, size_t n_arg)
* Pointer to the first occurrence of str2 in str1, * Pointer to the first occurrence of str2 in str1,
* or return null if not found. * or return null if not found.
*/ */
char *strstr_s (const char *str1, size_t maxlen1, char *strstr_s(const char *str1, size_t maxlen1, const char *str2, size_t maxlen2)
const char *str2, size_t maxlen2)
{ {
size_t len1, len2; size_t len1, len2;
size_t i; size_t i;