0528-pisound-Fix-a-warning-in-DEBUG-builds.patch 987 B

12345678910111213141516171819202122232425262728293031
  1. From 84835c07b7cdf960db7cb9e8cf13363e2d8c99b0 Mon Sep 17 00:00:00 2001
  2. From: Giedrius Trainavicius <giedrius@blokas.io>
  3. Date: Tue, 25 Oct 2016 01:47:20 +0300
  4. Subject: [PATCH] pisound: Fix a warning in DEBUG builds
  5. Also change a macro that enables debug level printing from DEBUG to
  6. PISOUND_DEBUG.
  7. ---
  8. sound/soc/bcm/pisound.c | 4 ++--
  9. 1 file changed, 2 insertions(+), 2 deletions(-)
  10. --- a/sound/soc/bcm/pisound.c
  11. +++ b/sound/soc/bcm/pisound.c
  12. @@ -55,7 +55,7 @@ static void pisnd_midi_uninit(void);
  13. #define PISOUND_LOG_PREFIX "pisound: "
  14. -#ifdef DEBUG
  15. +#ifdef PISOUND_DEBUG
  16. # define printd(...) pr_alert(PISOUND_LOG_PREFIX __VA_ARGS__)
  17. #else
  18. # define printd(...) do {} while (0)
  19. @@ -119,7 +119,7 @@ static void pisnd_midi_recv_callback(voi
  20. while ((n = pisnd_spi_recv(data, sizeof(data)))) {
  21. int res = snd_rawmidi_receive(substream, data, n);
  22. (void)res;
  23. - printd("midi recv 0x%02x, res = %d\n", data, res);
  24. + printd("midi recv %u bytes, res = %d\n", n, res);
  25. }
  26. }