drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
PATCH 1/1 drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
Fix:ds1337.c: In function 'rtc_get':
ds1337.c:88:52: warning: variable 'control' set but not used [-Wunused-but-set-variable]
--- drivers/rtc/ds1337.c | 16 +++------------- 1 files changed, 3 insertions(+), 13 deletions(-)
drivers/rtc/ds1337.c +3 -13
@@ -34,16 +34,6 @@#if defined(CONFIG_CMD_DATE ) -/*---------------------------------------------------------------------*/ -#undef DEBUG_RTC - -#ifdef DEBUG_RTC -#define DEBUGR(fmt,args...) printf(fmt ,##args) -#else -#define DEBUGR(fmt,args...) -#endif -/*---------------------------------------------------------------------*/ -/* * RTC register addresses */
@@ -97,7 +87,7 @@ int rtc_get (struct rtc_time *tmp) mon_cent =rtc_read (RTC_MON_REG_ADDR ); year =rtc_read (RTC_YR_REG_ADDR ); -DEBUGR ("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " +debug ("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " "hr: %02x min: %02x sec: %02x control: %02x status: %02x\n" , year, mon_cent, mday, wday, hour, min, sec, control, status);
@@ -119,7 +109,7 @@ int rtc_get (struct rtc_time *tmp) tmp->tm_yday =0 ; tmp->tm_isdst=0 ; -DEBUGR ("Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n" , +debug ("Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n" , tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
@@ -134,7 +124,7 @@ int rtc_set (struct rtc_time *tmp) {uchar century; -DEBUGR ("Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n" , +debug ("Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n" , tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
Signature · 1 line
1.7.6.4
PATCH 1/1 drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
Quoted 18 lines
Fix:
ds1337.c: In function 'rtc_get':
ds1337.c:88:52: warning: variable 'control' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>--- drivers/rtc/ds1337.c | 16 +++------------- 1 files changed, 3 insertions(+), 13 deletions(-)drivers/rtc/ds1337.c +0
-0@@ -34,16 +34,6 @@#if defined(CONFIG_CMD_DATE )
drivers/rtc/ds1337.c line 46
Quoted 10 lines
drivers/rtc/ds1337.c +0
-10-/*---------------------------------------------------------------------*/ -#undef DEBUG_RTC - -#ifdef DEBUG_RTC -#define DEBUGR(fmt,args...) printf(fmt ,##args) -#else -#define DEBUGR(fmt,args...) -#endif -/*---------------------------------------------------------------------*/ -
This undermines the ability of fine-grained debuging output, right? Now you can only debug whole uboot or nothing ... correct me if I'm wrong please.
drivers/rtc/ds1337.c int rtc_get (struct rtc_time *tmp) · line 93
Quoted 12 lines
drivers/rtc/ds1337.c +1
-1/* * RTC register addresses */ @@ -97,7 +87,7 @@ int rtc_get (struct rtc_time *tmp) mon_cent =rtc_read (RTC_MON_REG_ADDR ); year =rtc_read (RTC_YR_REG_ADDR ); -DEBUGR ("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " +debug ("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " "hr: %02x min: %02x sec: %02x control: %02x status: %02x\n" , year, mon_cent, mday, wday, hour, min, sec, control, status);
Cheers
PATCH 1/1 drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
Dear Marek Vasut,
Quoted 13 lines · In message <[email protected]> you wrote:
drivers/rtc/ds1337.c line 46
Quoted 10 lines
drivers/rtc/ds1337.c +0
-9-#undef DEBUG_RTC - -#ifdef DEBUG_RTC -#define DEBUGR(fmt,args...) printf(fmt ,##args) -#else -#define DEBUGR(fmt,args...) -#endif -/*---------------------------------------------------------------------*/ -This undermines the ability of fine-grained debuging output, right? Now you can only debug whole uboot or nothing ... correct me if I'm wrong please.
The normal way to enable debugging on file scope is to compile only the respective files with DEBUG defined.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Hokey religions and ancient weapons are no substitute for a good blaster at your side. - Han Solo
PATCH 1/1 drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
Quoted 17 lines
Dear Marek Vasut,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 5 lines
drivers/rtc/ds1337.c +0
-5-#undef DEBUG_RTC - -#ifdef DEBUG_RTC -#define DEBUGR(fmt,args...) printf(fmt ,##args) -#else Quoted 8 lines
drivers/rtc/ds1337.c
Quoted 4 lines
drivers/rtc/ds1337.c +0
-4-#define DEBUGR(fmt,args...) -#endif -/*-------------------------------------------------------------------- -*/ -This undermines the ability of fine-grained debuging output, right? Now you can only debug whole uboot or nothing ... correct me if I'm wrong please.
Quoted 7 lines
The normal way to enable debugging on file scope is to compile only the respective files with DEBUG defined.
Best regards,
Wolfgang Denk
Roger that !!
Wolfgang Denk
AppliedPATCH 1/1 drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 9 lines · In message <[email protected]> you wrote:
Fix:
ds1337.c: In function 'rtc_get':
ds1337.c:88:52: warning: variable 'control' set but not used [-Wunused-but-set-variable]Signed-off-by Wolfgang Denk <[email protected]>--- drivers/rtc/ds1337.c | 16 +++------------- 1 files changed, 3 insertions(+), 13 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In an organization, each person rises to the level of his own incom- petency - The Peter Principle