* [Qemu-devel] [PATCH V4 1/2] sdhci: use PRIx64 for uint64_t type
@ 2015-09-07 18:06 Sai Pavan Boddu
2015-09-07 18:06 ` [Qemu-devel] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally Sai Pavan Boddu
2015-09-16 10:25 ` [Qemu-devel] " Michael Tokarev
0 siblings, 2 replies; 8+ messages in thread
From: Sai Pavan Boddu @ 2015-09-07 18:06 UTC (permalink / raw)
To: qemu-devel, crosthwaitepeter, eblake, peter.maydell
Cc: Sai Pavan Boddu, edgari, alistai
Fix compile time warnings, because of type mismatch for unsigned long
long type.
Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
---
Changes for V3:
Same as V2.
Changes for V2:
Fix commit message.
Correct line lenght.
---
hw/sd/sdhci.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 811e5b0..e6348ef 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -22,6 +22,7 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include <inttypes.h>
#include "hw/hw.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
@@ -719,7 +720,8 @@ static void sdhci_do_adma(SDHCIState *s)
break;
case SDHC_ADMA_ATTR_ACT_LINK: /* link to next descriptor table */
s->admasysaddr = dscr.addr;
- DPRINT_L1("ADMA link: admasysaddr=0x%lx\n", s->admasysaddr);
+ DPRINT_L1("ADMA link: admasysaddr=0x%" PRIx64 "\n",
+ s->admasysaddr);
break;
default:
s->admasysaddr += dscr.incr;
@@ -727,7 +729,8 @@ static void sdhci_do_adma(SDHCIState *s)
}
if (dscr.attr & SDHC_ADMA_ATTR_INT) {
- DPRINT_L1("ADMA interrupt: admasysaddr=0x%lx\n", s->admasysaddr);
+ DPRINT_L1("ADMA interrupt: admasysaddr=0x%" PRIx64 "\n",
+ s->admasysaddr);
if (s->norintstsen & SDHC_NISEN_DMA) {
s->norintsts |= SDHC_NIS_DMA;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [Qemu-devel] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally 2015-09-07 18:06 [Qemu-devel] [PATCH V4 1/2] sdhci: use PRIx64 for uint64_t type Sai Pavan Boddu @ 2015-09-07 18:06 ` Sai Pavan Boddu 2015-09-16 10:26 ` [Qemu-devel] " Michael Tokarev 2015-09-16 10:25 ` [Qemu-devel] " Michael Tokarev 1 sibling, 1 reply; 8+ messages in thread From: Sai Pavan Boddu @ 2015-09-07 18:06 UTC (permalink / raw) To: qemu-devel, crosthwaitepeter, eblake, peter.maydell Cc: Sai Pavan Boddu, edgari, alistai Conditional compilation hides few type mismatch warnings, fix it to compile unconditionally. Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com> Suggested-by: Eric Blake <eblake@redhat.com> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> --- Changes for V4: fix the commit message mistakes. --- hw/sd/sdhci.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index e6348ef..4c0ddf6 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -37,24 +37,24 @@ #define SDHC_DEBUG 0 #endif -#if SDHC_DEBUG == 0 - #define DPRINT_L1(fmt, args...) do { } while (0) - #define DPRINT_L2(fmt, args...) do { } while (0) - #define ERRPRINT(fmt, args...) do { } while (0) -#elif SDHC_DEBUG == 1 - #define DPRINT_L1(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0) - #define DPRINT_L2(fmt, args...) do { } while (0) - #define ERRPRINT(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC ERROR: "fmt, ## args); } while (0) -#else - #define DPRINT_L1(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0) - #define DPRINT_L2(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0) - #define ERRPRINT(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC ERROR: "fmt, ## args); } while (0) -#endif +#define DPRINT_L1(fmt, args...) \ + do { \ + if (SDHC_DEBUG) { \ + fprintf(stderr, "QEMU SDHC: " fmt, ## args); \ + } \ + } while (0) +#define DPRINT_L2(fmt, args...) \ + do { \ + if (SDHC_DEBUG > 1) { \ + fprintf(stderr, "QEMU SDHC: " fmt, ## args); \ + } \ + } while (0) +#define ERRPRINT(fmt, args...) \ + do { \ + if (SDHC_DEBUG) { \ + fprintf(stderr, "QEMU SDHC ERROR: " fmt, ## args); \ + } \ + } while (0) /* Default SD/MMC host controller features information, which will be * presented in CAPABILITIES register of generic SD host controller at reset. -- 1.9.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-trivial] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally 2015-09-07 18:06 ` [Qemu-devel] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally Sai Pavan Boddu @ 2015-09-16 10:26 ` Michael Tokarev 0 siblings, 0 replies; 8+ messages in thread From: Michael Tokarev @ 2015-09-16 10:26 UTC (permalink / raw) To: Sai Pavan Boddu, qemu-devel, crosthwaitepeter, eblake, peter.maydell Cc: Sai Pavan Boddu, qemu-trivial, edgari, alistai 07.09.2015 21:06, Sai Pavan Boddu wrote: > Conditional compilation hides few type mismatch warnings, fix it to > compile unconditionally. Applied to the trivial-patches tree, thanks! /mjt ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally @ 2015-09-16 10:26 ` Michael Tokarev 0 siblings, 0 replies; 8+ messages in thread From: Michael Tokarev @ 2015-09-16 10:26 UTC (permalink / raw) To: Sai Pavan Boddu, qemu-devel, crosthwaitepeter, eblake, peter.maydell Cc: Sai Pavan Boddu, qemu-trivial, edgari, alistai 07.09.2015 21:06, Sai Pavan Boddu wrote: > Conditional compilation hides few type mismatch warnings, fix it to > compile unconditionally. Applied to the trivial-patches tree, thanks! /mjt ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-trivial] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally 2015-09-16 10:26 ` [Qemu-devel] " Michael Tokarev @ 2015-09-16 10:56 ` Sai Pavan Boddu -1 siblings, 0 replies; 8+ messages in thread From: Sai Pavan Boddu @ 2015-09-16 10:56 UTC (permalink / raw) To: Michael Tokarev, qemu-devel@nongnu.org, crosthwaitepeter@gmail.com, eblake@redhat.com, peter.maydell@linaro.org Cc: qemu-trivial, Edgar Iglesias, Alistair Francis > -----Original Message----- > From: Michael Tokarev [mailto:mjt@tls.msk.ru] > Sent: Wednesday, September 16, 2015 3:56 PM > To: Sai Pavan Boddu; qemu-devel@nongnu.org; > crosthwaitepeter@gmail.com; eblake@redhat.com; > peter.maydell@linaro.org > Cc: Sai Pavan Boddu; Edgar Iglesias; Alistair Francis; qemu-trivial > Subject: Re: [PATCH V4 2/2] sdhci: Change debug prints to compile > unconditionally > > 07.09.2015 21:06, Sai Pavan Boddu wrote: > > Conditional compilation hides few type mismatch warnings, fix it to > > compile unconditionally. > > Applied to the trivial-patches tree, thanks! Thanks Michael, Regards, Sai > > /mjt ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally @ 2015-09-16 10:56 ` Sai Pavan Boddu 0 siblings, 0 replies; 8+ messages in thread From: Sai Pavan Boddu @ 2015-09-16 10:56 UTC (permalink / raw) To: Michael Tokarev, qemu-devel@nongnu.org, crosthwaitepeter@gmail.com, eblake@redhat.com, peter.maydell@linaro.org Cc: qemu-trivial, Edgar Iglesias, Alistair Francis > -----Original Message----- > From: Michael Tokarev [mailto:mjt@tls.msk.ru] > Sent: Wednesday, September 16, 2015 3:56 PM > To: Sai Pavan Boddu; qemu-devel@nongnu.org; > crosthwaitepeter@gmail.com; eblake@redhat.com; > peter.maydell@linaro.org > Cc: Sai Pavan Boddu; Edgar Iglesias; Alistair Francis; qemu-trivial > Subject: Re: [PATCH V4 2/2] sdhci: Change debug prints to compile > unconditionally > > 07.09.2015 21:06, Sai Pavan Boddu wrote: > > Conditional compilation hides few type mismatch warnings, fix it to > > compile unconditionally. > > Applied to the trivial-patches tree, thanks! Thanks Michael, Regards, Sai > > /mjt ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-trivial] [PATCH V4 1/2] sdhci: use PRIx64 for uint64_t type 2015-09-07 18:06 [Qemu-devel] [PATCH V4 1/2] sdhci: use PRIx64 for uint64_t type Sai Pavan Boddu @ 2015-09-16 10:25 ` Michael Tokarev 2015-09-16 10:25 ` [Qemu-devel] " Michael Tokarev 1 sibling, 0 replies; 8+ messages in thread From: Michael Tokarev @ 2015-09-16 10:25 UTC (permalink / raw) To: Sai Pavan Boddu, qemu-devel, crosthwaitepeter, eblake, peter.maydell Cc: Sai Pavan Boddu, edgari, alistai 07.09.2015 21:06, Sai Pavan Boddu wrote: > Fix compile time warnings, because of type mismatch for unsigned long > long type. Applied to the trivial-patches tree, thanks! /mjt ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH V4 1/2] sdhci: use PRIx64 for uint64_t type @ 2015-09-16 10:25 ` Michael Tokarev 0 siblings, 0 replies; 8+ messages in thread From: Michael Tokarev @ 2015-09-16 10:25 UTC (permalink / raw) To: Sai Pavan Boddu, qemu-devel, crosthwaitepeter, eblake, peter.maydell Cc: Sai Pavan Boddu, edgari, alistai 07.09.2015 21:06, Sai Pavan Boddu wrote: > Fix compile time warnings, because of type mismatch for unsigned long > long type. Applied to the trivial-patches tree, thanks! /mjt ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-16 12:48 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-09-07 18:06 [Qemu-devel] [PATCH V4 1/2] sdhci: use PRIx64 for uint64_t type Sai Pavan Boddu 2015-09-07 18:06 ` [Qemu-devel] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally Sai Pavan Boddu 2015-09-16 10:26 ` [Qemu-trivial] " Michael Tokarev 2015-09-16 10:26 ` [Qemu-devel] " Michael Tokarev 2015-09-16 10:56 ` [Qemu-trivial] " Sai Pavan Boddu 2015-09-16 10:56 ` [Qemu-devel] " Sai Pavan Boddu 2015-09-16 10:25 ` [Qemu-trivial] [PATCH V4 1/2] sdhci: use PRIx64 for uint64_t type Michael Tokarev 2015-09-16 10:25 ` [Qemu-devel] " Michael Tokarev
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.