RE: [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-26 Thread David Laight
From: Coiby Xu > Sent: 25 September 2020 15:11 > > On Thu, Sep 24, 2020 at 10:54:50AM +, David Laight wrote: > >From: Coiby Xu > >> Sent: 24 September 2020 11:21 > >> Use __8 to replace int and remove the unnecessary __bitwise type attribute. > >> > >> Found by sparse, > >... > >> diff --git

Re: [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-25 Thread Coiby Xu
On Fri, Sep 25, 2020 at 10:57:27AM -0500, Alex Elder wrote: On 9/25/20 9:07 AM, Coiby Xu wrote: On Thu, Sep 24, 2020 at 01:00:57PM +0200, Greg Kroah-Hartman wrote: On Thu, Sep 24, 2020 at 06:20:39PM +0800, Coiby Xu wrote: Use __8 to replace int and remove the unnecessary __bitwise type

Re: [greybus-dev] [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-25 Thread Coiby Xu
On Fri, Sep 25, 2020 at 11:02:23AM -0500, Alex Elder wrote: On 9/25/20 9:11 AM, Coiby Xu wrote: On Thu, Sep 24, 2020 at 10:54:50AM +, David Laight wrote: From: Coiby Xu Sent: 24 September 2020 11:21 Use __8 to replace int and remove the unnecessary __bitwise type attribute. Found by

Re: [greybus-dev] [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-25 Thread Alex Elder
On 9/25/20 9:11 AM, Coiby Xu wrote: On Thu, Sep 24, 2020 at 10:54:50AM +, David Laight wrote: From: Coiby Xu Sent: 24 September 2020 11:21 Use __8 to replace int and remove the unnecessary __bitwise type attribute. Found by sparse, ... diff --git a/include/uapi/sound/asound.h

Re: [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-25 Thread Alex Elder
On 9/25/20 9:07 AM, Coiby Xu wrote: On Thu, Sep 24, 2020 at 01:00:57PM +0200, Greg Kroah-Hartman wrote: On Thu, Sep 24, 2020 at 06:20:39PM +0800, Coiby Xu wrote: Use __8 to replace int and remove the unnecessary __bitwise type attribute. Found by sparse, . . . diff --git

Re: [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-25 Thread Coiby Xu
On Thu, Sep 24, 2020 at 10:54:50AM +, David Laight wrote: From: Coiby Xu Sent: 24 September 2020 11:21 Use __8 to replace int and remove the unnecessary __bitwise type attribute. Found by sparse, ... diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index

Re: [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-25 Thread Coiby Xu
On Thu, Sep 24, 2020 at 01:00:57PM +0200, Greg Kroah-Hartman wrote: On Thu, Sep 24, 2020 at 06:20:39PM +0800, Coiby Xu wrote: Use __8 to replace int and remove the unnecessary __bitwise type attribute. Found by sparse, $ make C=2 drivers/staging/greybus/

Re: [greybus-dev] [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-24 Thread Alex Elder
On 9/24/20 5:20 AM, Coiby Xu wrote: > Use __8 to replace int and remove the unnecessary __bitwise type attribute. > > Found by sparse, Greg's right, don't change the public header. You could try this in the Greybus code to eliminate the warning, but I haven't tried it (and for all I know it's

Re: [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-24 Thread Greg Kroah-Hartman
On Thu, Sep 24, 2020 at 06:20:39PM +0800, Coiby Xu wrote: > Use __8 to replace int and remove the unnecessary __bitwise type attribute. > > Found by sparse, > > $ make C=2 drivers/staging/greybus/ > drivers/staging/greybus/audio_topology.c:185:24: warning: cast to restricted >

RE: [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-24 Thread David Laight
From: Coiby Xu > Sent: 24 September 2020 11:21 > Use __8 to replace int and remove the unnecessary __bitwise type attribute. > > Found by sparse, ... > diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h > index 535a7229e1d9..8e71a95644ab 100644 > ---

[PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t

2020-09-24 Thread Coiby Xu
Use __8 to replace int and remove the unnecessary __bitwise type attribute. Found by sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_topology.c:185:24: warning: cast to restricted snd_ctl_elem_type_t drivers/staging/greybus/audio_topology.c:679:14: warning: restricted