diff mbox series

[4/5] ALSA: fireface: Use ULL suffixes for 64-bit constants

Message ID 20190528142424.19626-5-geert@linux-m68k.org (mailing list archive)
State New, archived
Headers show
Series Assorted fixes discovered with gcc 4.1 | expand

Commit Message

Geert Uytterhoeven May 28, 2019, 2:24 p.m. UTC
With gcc 4.1:

    sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_switch_fetching_mode’:
    sound/firewire/fireface/ff-protocol-latter.c:97: warning: integer constant is too large for ‘long’ type
    sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_begin_session’:
    sound/firewire/fireface/ff-protocol-latter.c:170: warning: integer constant is too large for ‘long’ type
    sound/firewire/fireface/ff-protocol-latter.c:197: warning: integer constant is too large for ‘long’ type
    sound/firewire/fireface/ff-protocol-latter.c:205: warning: integer constant is too large for ‘long’ type
    sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_finish_session’:
    sound/firewire/fireface/ff-protocol-latter.c:214: warning: integer constant is too large for ‘long’ type

Fix this by adding the missing "ULL" suffixes.
Add the same suffix to the last constant, to maintain consistency.

Fixes: fd1cc9de64c2ca6c ("ALSA: fireface: add support for Fireface UCX")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 sound/firewire/fireface/ff-protocol-latter.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Takashi Sakamoto May 29, 2019, 9:57 a.m. UTC | #1
Hi,

On Tue, May 28, 2019 at 04:24:23PM +0200, Geert Uytterhoeven wrote:
> With gcc 4.1:
> 
>     sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_switch_fetching_mode’:
>     sound/firewire/fireface/ff-protocol-latter.c:97: warning: integer constant is too large for ‘long’ type
>     sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_begin_session’:
>     sound/firewire/fireface/ff-protocol-latter.c:170: warning: integer constant is too large for ‘long’ type
>     sound/firewire/fireface/ff-protocol-latter.c:197: warning: integer constant is too large for ‘long’ type
>     sound/firewire/fireface/ff-protocol-latter.c:205: warning: integer constant is too large for ‘long’ type
>     sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_finish_session’:
>     sound/firewire/fireface/ff-protocol-latter.c:214: warning: integer constant is too large for ‘long’ type
> 
> Fix this by adding the missing "ULL" suffixes.
> Add the same suffix to the last constant, to maintain consistency.
> 
> Fixes: fd1cc9de64c2ca6c ("ALSA: fireface: add support for Fireface UCX")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  sound/firewire/fireface/ff-protocol-latter.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Thanks for your care.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

> diff --git a/sound/firewire/fireface/ff-protocol-latter.c b/sound/firewire/fireface/ff-protocol-latter.c
> index c8236ff89b7fb9de..b30d02d359b1d21b 100644
> --- a/sound/firewire/fireface/ff-protocol-latter.c
> +++ b/sound/firewire/fireface/ff-protocol-latter.c
> @@ -9,11 +9,11 @@
>  
>  #include "ff.h"
>  
> -#define LATTER_STF		0xffff00000004
> -#define LATTER_ISOC_CHANNELS	0xffff00000008
> -#define LATTER_ISOC_START	0xffff0000000c
> -#define LATTER_FETCH_MODE	0xffff00000010
> -#define LATTER_SYNC_STATUS	0x0000801c0000
> +#define LATTER_STF		0xffff00000004ULL
> +#define LATTER_ISOC_CHANNELS	0xffff00000008ULL
> +#define LATTER_ISOC_START	0xffff0000000cULL
> +#define LATTER_FETCH_MODE	0xffff00000010ULL
> +#define LATTER_SYNC_STATUS	0x0000801c0000ULL
>  
>  static int parse_clock_bits(u32 data, unsigned int *rate,
>  			    enum snd_ff_clock_src *src)
> -- 
> 2.17.1
> 


Regards

Takashi Sakamoto
Takashi Iwai May 29, 2019, 10:07 a.m. UTC | #2
On Wed, 29 May 2019 11:57:31 +0200,
Takashi Sakamoto wrote:
> 
> Hi,
> 
> On Tue, May 28, 2019 at 04:24:23PM +0200, Geert Uytterhoeven wrote:
> > With gcc 4.1:
> > 
> >     sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_switch_fetching_mode’:
> >     sound/firewire/fireface/ff-protocol-latter.c:97: warning: integer constant is too large for ‘long’ type
> >     sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_begin_session’:
> >     sound/firewire/fireface/ff-protocol-latter.c:170: warning: integer constant is too large for ‘long’ type
> >     sound/firewire/fireface/ff-protocol-latter.c:197: warning: integer constant is too large for ‘long’ type
> >     sound/firewire/fireface/ff-protocol-latter.c:205: warning: integer constant is too large for ‘long’ type
> >     sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_finish_session’:
> >     sound/firewire/fireface/ff-protocol-latter.c:214: warning: integer constant is too large for ‘long’ type
> > 
> > Fix this by adding the missing "ULL" suffixes.
> > Add the same suffix to the last constant, to maintain consistency.
> > 
> > Fixes: fd1cc9de64c2ca6c ("ALSA: fireface: add support for Fireface UCX")
> > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > ---
> >  sound/firewire/fireface/ff-protocol-latter.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> Thanks for your care.
> 
> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

Applied to sound git tree now.  Thanks.


Takashi
diff mbox series

Patch

diff --git a/sound/firewire/fireface/ff-protocol-latter.c b/sound/firewire/fireface/ff-protocol-latter.c
index c8236ff89b7fb9de..b30d02d359b1d21b 100644
--- a/sound/firewire/fireface/ff-protocol-latter.c
+++ b/sound/firewire/fireface/ff-protocol-latter.c
@@ -9,11 +9,11 @@ 
 
 #include "ff.h"
 
-#define LATTER_STF		0xffff00000004
-#define LATTER_ISOC_CHANNELS	0xffff00000008
-#define LATTER_ISOC_START	0xffff0000000c
-#define LATTER_FETCH_MODE	0xffff00000010
-#define LATTER_SYNC_STATUS	0x0000801c0000
+#define LATTER_STF		0xffff00000004ULL
+#define LATTER_ISOC_CHANNELS	0xffff00000008ULL
+#define LATTER_ISOC_START	0xffff0000000cULL
+#define LATTER_FETCH_MODE	0xffff00000010ULL
+#define LATTER_SYNC_STATUS	0x0000801c0000ULL
 
 static int parse_clock_bits(u32 data, unsigned int *rate,
 			    enum snd_ff_clock_src *src)