* [U-Boot] [PATCH] drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
@ 2011-10-29 19:39 Wolfgang Denk
2011-10-29 22:39 ` Marek Vasut
2011-11-03 19:41 ` Wolfgang Denk
0 siblings, 2 replies; 5+ messages in thread
From: Wolfgang Denk @ 2011-10-29 19:39 UTC (permalink / raw)
To: u-boot
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 <wd@denx.de>
---
drivers/rtc/ds1337.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c
index 7abf041..5bb9f94 100644
--- a/drivers/rtc/ds1337.c
+++ b/drivers/rtc/ds1337.c
@@ -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);
--
1.7.6.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
2011-10-29 19:39 [U-Boot] [PATCH] drivers/rtc/ds1337.c: fix GCC 4.6 build warnings Wolfgang Denk
@ 2011-10-29 22:39 ` Marek Vasut
2011-10-30 13:11 ` Wolfgang Denk
2011-11-03 19:41 ` Wolfgang Denk
1 sibling, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2011-10-29 22:39 UTC (permalink / raw)
To: u-boot
> 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 <wd@denx.de>
> ---
> drivers/rtc/ds1337.c | 16 +++-------------
> 1 files changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c
> index 7abf041..5bb9f94 100644
> --- a/drivers/rtc/ds1337.c
> +++ b/drivers/rtc/ds1337.c
> @@ -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
> -/*---------------------------------------------------------------------*/
> -
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.
> /*
> * 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
2011-10-29 22:39 ` Marek Vasut
@ 2011-10-30 13:11 ` Wolfgang Denk
2011-10-30 20:12 ` Marek Vasut
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2011-10-30 13:11 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201110300039.59309.marek.vasut@gmail.com> you wrote:
>
> > -#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
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
2011-10-30 13:11 ` Wolfgang Denk
@ 2011-10-30 20:12 ` Marek Vasut
0 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2011-10-30 20:12 UTC (permalink / raw)
To: u-boot
> Dear Marek Vasut,
>
> In message <201110300039.59309.marek.vasut@gmail.com> you wrote:
> > > -#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
Roger that !!
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] drivers/rtc/ds1337.c: fix GCC 4.6 build warnings
2011-10-29 19:39 [U-Boot] [PATCH] drivers/rtc/ds1337.c: fix GCC 4.6 build warnings Wolfgang Denk
2011-10-29 22:39 ` Marek Vasut
@ 2011-11-03 19:41 ` Wolfgang Denk
1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2011-11-03 19:41 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1319917151-14369-1-git-send-email-wd@denx.de> 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 <wd@denx.de>
> ---
> drivers/rtc/ds1337.c | 16 +++-------------
> 1 files changed, 3 insertions(+), 13 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-03 19:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29 19:39 [U-Boot] [PATCH] drivers/rtc/ds1337.c: fix GCC 4.6 build warnings Wolfgang Denk
2011-10-29 22:39 ` Marek Vasut
2011-10-30 13:11 ` Wolfgang Denk
2011-10-30 20:12 ` Marek Vasut
2011-11-03 19:41 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox