kernel: Fix build errors with LLVM
This patch intends to fix some trivial errors reported
while building kernel with LLVM toolchain.
Change-Id: Icc15085abe52498c90ee5345beb65120fc2636ee
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
diff --git a/drivers/clk/msm/clock-gcc-8909.c b/drivers/clk/msm/clock-gcc-8909.c
index 54d8d56..d96a398 100644
--- a/drivers/clk/msm/clock-gcc-8909.c
+++ b/drivers/clk/msm/clock-gcc-8909.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016, 2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2016, 2018, 2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1062,7 +1062,7 @@
.c = {
.dbg_name = "pclk0_clk_src",
.ops = &clk_ops_pixel,
- VDD_DIG_FMAX_MAP1(LOWER, 83333333.33),
+ VDD_DIG_FMAX_MAP1(LOWER, 83333333),
CLK_INIT(pclk0_clk_src.c),
},
};
diff --git a/drivers/mtd/devices/msm_qpic_nand.c b/drivers/mtd/devices/msm_qpic_nand.c
index 2139655..eb39bf7 100644
--- a/drivers/mtd/devices/msm_qpic_nand.c
+++ b/drivers/mtd/devices/msm_qpic_nand.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2007 Google, Inc.
- * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017, 2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -3052,7 +3052,7 @@
for (i = 0; !flashman && nand_manuf_ids[i].id; ++i)
if (nand_manuf_ids[i].id == manid)
flashman = &nand_manuf_ids[i];
- for (i = 0; !flashdev && nand_flash_ids[i].id; ++i) {
+ for (i = 0; !flashdev && (nand_flash_ids[i].id != NULL); ++i) {
/*
* If id_len is specified for an entry in the nand ids
* array, then at least 4 bytes of the nand id is
diff --git a/drivers/soc/qcom/pil_bg_intf.h b/drivers/soc/qcom/pil_bg_intf.h
index 777ccaa..07e98f7 100644
--- a/drivers/soc/qcom/pil_bg_intf.h
+++ b/drivers/soc/qcom/pil_bg_intf.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2018, 2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -27,18 +27,18 @@
};
/* tzapp bg request.*/
-__packed struct tzapp_bg_req {
+struct tzapp_bg_req {
uint8_t tzapp_bg_cmd;
phys_addr_t address_fw;
size_t size_fw;
-};
+} __attribute__ ((__packed__));
/* tzapp bg response.*/
-__packed struct tzapp_bg_rsp {
+struct tzapp_bg_rsp {
uint32_t tzapp_bg_cmd;
uint32_t bg_info_len;
int32_t status;
uint32_t bg_info[100];
-};
+} __attribute__ ((__packed__));
#endif
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index a4d90aa..9172128 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -107,7 +107,7 @@
return perms;
} else if (!profile->file.dfa) {
return nullperms;
- } else if ((ns == profile->ns)) {
+ } else if (ns == profile->ns) {
/* try matching against rules with out namespace prepended */
aa_str_perms(profile->file.dfa, start, name, &cond, &perms);
if (COMBINED_PERM_MASK(perms) & request)