diff mbox series

[U-Boot] x86: quark: Fix unused warnings

Message ID 1517084027-25397-1-git-send-email-trini@konsulko.com
State Accepted
Commit d0c0752addcb82fbc74c43842a58cca34d22de00
Delegated to: Bin Meng
Headers show
Series [U-Boot] x86: quark: Fix unused warnings | expand

Commit Message

Tom Rini Jan. 27, 2018, 8:13 p.m. UTC
The variable t_rfc is never used, so drop it.  The variables ddr_wctl
and ddr_wcmd are only used in certain manual instances, so guard their
declaration by the same check as their use.

Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/x86/cpu/quark/smc.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

Comments

Bin Meng Jan. 30, 2018, 6:34 a.m. UTC | #1
On Sun, Jan 28, 2018 at 4:13 AM, Tom Rini <trini@konsulko.com> wrote:
> The variable t_rfc is never used, so drop it.  The variables ddr_wctl
> and ddr_wcmd are only used in certain manual instances, so guard their
> declaration by the same check as their use.
>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  arch/x86/cpu/quark/smc.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng Jan. 30, 2018, 6:55 a.m. UTC | #2
On Tue, Jan 30, 2018 at 2:34 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> On Sun, Jan 28, 2018 at 4:13 AM, Tom Rini <trini@konsulko.com> wrote:
>> The variable t_rfc is never used, so drop it.  The variables ddr_wctl
>> and ddr_wcmd are only used in certain manual instances, so guard their
>> declaration by the same check as their use.
>>
>> Cc: Bin Meng <bmeng.cn@gmail.com>
>> Signed-off-by: Tom Rini <trini@konsulko.com>
>> ---
>>  arch/x86/cpu/quark/smc.c | 13 ++++---------
>>  1 file changed, 4 insertions(+), 9 deletions(-)
>>
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> Tested-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86, thanks!
diff mbox series

Patch

diff --git a/arch/x86/cpu/quark/smc.c b/arch/x86/cpu/quark/smc.c
index 3ffe92b67b20..0195b56a52f6 100644
--- a/arch/x86/cpu/quark/smc.c
+++ b/arch/x86/cpu/quark/smc.c
@@ -17,15 +17,6 @@ 
 #include "hte.h"
 #include "smc.h"
 
-/* t_rfc values (in picoseconds) per density */
-static const uint32_t t_rfc[5] = {
-	90000,	/* 512Mb */
-	110000,	/* 1Gb */
-	160000,	/* 2Gb */
-	300000,	/* 4Gb */
-	350000,	/* 8Gb */
-};
-
 /* t_ck clock period in picoseconds per speed index 800, 1066, 1333 */
 static const uint32_t t_ck[3] = {
 	2500,
@@ -35,8 +26,12 @@  static const uint32_t t_ck[3] = {
 
 /* Global variables */
 static const uint16_t ddr_wclk[] = {193, 158};
+#ifdef BACKUP_WCTL
 static const uint16_t ddr_wctl[] = {1, 217};
+#endif
+#ifdef BACKUP_WCMD
 static const uint16_t ddr_wcmd[] = {1, 220};
+#endif
 
 #ifdef BACKUP_RCVN
 static const uint16_t ddr_rcvn[] = {129, 498};