mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
ALSA: firewire-lib: change a member of event structure to suppress sparse wanings to bool type
Commita9c4284bf5
("ALSA: firewire-lib: add context information to tracepoints") adds new members to tracepoint events of this module, to represent context information. One of the members is bool type and this causes sparse warnings. 16:1: warning: expression using sizeof bool 60:1: warning: expression using sizeof bool 16:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) 60:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) This commit suppresses the warnings, by changing type of the member to 'unsigned int'. Additionally, this commit applies '!!' idiom to get 0/1 from 'in_interrupt()'. Fixes:a9c4284bf5
("ALSA: firewire-lib: add context information to tracepoints") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
c7c5856b6f
commit
17e1717c11
@ -26,7 +26,7 @@ TRACE_EVENT(in_packet,
|
||||
__field(u32, cip_header1)
|
||||
__field(unsigned int, payload_quadlets)
|
||||
__field(unsigned int, packet_index)
|
||||
__field(bool, irq)
|
||||
__field(unsigned int, irq)
|
||||
__field(unsigned int, index)
|
||||
),
|
||||
TP_fast_assign(
|
||||
@ -39,7 +39,7 @@ TRACE_EVENT(in_packet,
|
||||
__entry->cip_header1 = cip_header[1];
|
||||
__entry->payload_quadlets = payload_quadlets;
|
||||
__entry->packet_index = s->packet_index;
|
||||
__entry->irq = in_interrupt();
|
||||
__entry->irq = !!in_interrupt();
|
||||
__entry->index = index;
|
||||
),
|
||||
TP_printk(
|
||||
@ -70,7 +70,7 @@ TRACE_EVENT(out_packet,
|
||||
__field(u32, cip_header1)
|
||||
__field(unsigned int, payload_quadlets)
|
||||
__field(unsigned int, packet_index)
|
||||
__field(bool, irq)
|
||||
__field(unsigned int, irq)
|
||||
__field(unsigned int, index)
|
||||
),
|
||||
TP_fast_assign(
|
||||
@ -83,7 +83,7 @@ TRACE_EVENT(out_packet,
|
||||
__entry->cip_header1 = be32_to_cpu(cip_header[1]);
|
||||
__entry->payload_quadlets = payload_length / 4;
|
||||
__entry->packet_index = s->packet_index;
|
||||
__entry->irq = in_interrupt();
|
||||
__entry->irq = !!in_interrupt();
|
||||
__entry->index = index;
|
||||
),
|
||||
TP_printk(
|
||||
|
Loading…
Reference in New Issue
Block a user