From 9d9fa19d83b9794495c1e0f8cb9e7ea6dced5817 Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Fri, 10 Mar 2017 15:19:02 +0800 Subject: [PATCH] qcacmn: add 'const' for 'section' in struct TGT_REG_TABLE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To fix the following compilation error: warning: assignment discards ‘const’ qualifier from pointer target type, at: reg_table->section = ar6320v2_reg_table in ol_fw.c. It's because the register table is a const array, while reg_table->section does not point to a const. So add 'const' for 'section'. Change-Id: Idfef358817241e73d660d2730b74c2ca88e23af1 CRs-Fixed: 2017786 --- hif/inc/regtable_pcie.h | 2 +- hif/src/sdio/regtable_sdio.h | 2 +- hif/src/usb/regtable_usb.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hif/inc/regtable_pcie.h b/hif/inc/regtable_pcie.h index 87d55c52bf..9dcb9e7d27 100644 --- a/hif/inc/regtable_pcie.h +++ b/hif/inc/regtable_pcie.h @@ -740,7 +740,7 @@ struct tgt_reg_section { }; struct tgt_reg_table { - struct tgt_reg_section *section; + const struct tgt_reg_section *section; uint32_t section_size; }; diff --git a/hif/src/sdio/regtable_sdio.h b/hif/src/sdio/regtable_sdio.h index 7b03208b78..d6b30fb160 100644 --- a/hif/src/sdio/regtable_sdio.h +++ b/hif/src/sdio/regtable_sdio.h @@ -879,7 +879,7 @@ struct tgt_reg_section { struct tgt_reg_table { - struct tgt_reg_section *section; + const struct tgt_reg_section *section; uint32_t section_size; }; #endif /* _REGTABLE_SDIO_H_ */ diff --git a/hif/src/usb/regtable_usb.h b/hif/src/usb/regtable_usb.h index 1e5e49d7ed..4d17bcc0d5 100644 --- a/hif/src/usb/regtable_usb.h +++ b/hif/src/usb/regtable_usb.h @@ -1285,7 +1285,7 @@ struct tgt_reg_section { }; struct tgt_reg_table { - struct tgt_reg_section *section; + const struct tgt_reg_section *section; u_int32_t section_size; };