Fix the wrong bit-and check by adding parentheses properly:
ctl.c: In function ‘tplg_add_bytes’:
ctl.c:868:22: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
if (be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE
^
Signed-off-by: Takashi Iwai <tiwai@suse.de>
/* check on TLV bytes control */
if (be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) {
- if (be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE
+ if ((be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE)
!= SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE) {
SNDERR("error: Invalid TLV bytes control access 0x%x\n",
be->hdr.access);