Re: [PATCH 2/2] ALSA: usb-audio: Add mixer quirk for RME Digiface USB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




On 9/2/24 4:29 PM, kernel test robot wrote:
> Hi Asahi,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on 8400291e289ee6b2bf9779ff1c83a291501f017b]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Asahi-Lina/ALSA-usb-audio-Add-quirk-for-RME-Digiface-USB/20240902-054004
> base:   8400291e289ee6b2bf9779ff1c83a291501f017b
> patch link:    https://lore.kernel.org/r/20240902-rme-digiface-v1-2-6e88472a2744%40asahilina.net
> patch subject: [PATCH 2/2] ALSA: usb-audio: Add mixer quirk for RME Digiface USB
> config: mips-mtx1_defconfig (https://download.01.org/0day-ci/archive/20240902/202409021549.DbXWdqGa-lkp@xxxxxxxxx/config)
> compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240902/202409021549.DbXWdqGa-lkp@xxxxxxxxx/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202409021549.DbXWdqGa-lkp@xxxxxxxxx/
> 
> All warnings (new ones prefixed by >>):
> 
>>> sound/usb/mixer_quirks.c:3000:42: warning: shift count >= width of type [-Wshift-count-overflow]
>            bool invert = kcontrol->private_value & RME_DIGIFACE_INVERT;
>                                                    ^~~~~~~~~~~~~~~~~~~
>    sound/usb/mixer_quirks.c:2948:29: note: expanded from macro 'RME_DIGIFACE_INVERT'
>    #define RME_DIGIFACE_INVERT BIT(32)

Oops, this was supposed to be BIT(31). I'll fix it for v2.

>                                ^~~~~~~
>    include/vdso/bits.h:7:26: note: expanded from macro 'BIT'
>    #define BIT(nr)                 (UL(1) << (nr))
>                                           ^  ~~~~
>    sound/usb/mixer_quirks.c:3063:42: warning: shift count >= width of type [-Wshift-count-overflow]
>            bool invert = kcontrol->private_value & RME_DIGIFACE_INVERT;
>                                                    ^~~~~~~~~~~~~~~~~~~
>    sound/usb/mixer_quirks.c:2948:29: note: expanded from macro 'RME_DIGIFACE_INVERT'
>    #define RME_DIGIFACE_INVERT BIT(32)
>                                ^~~~~~~
>    include/vdso/bits.h:7:26: note: expanded from macro 'BIT'
>    #define BIT(nr)                 (UL(1) << (nr))
>                                           ^  ~~~~
>    sound/usb/mixer_quirks.c:3160:4: warning: shift count >= width of type [-Wshift-count-overflow]
>                            RME_DIGIFACE_INVERT,
>                            ^~~~~~~~~~~~~~~~~~~
>    sound/usb/mixer_quirks.c:2948:29: note: expanded from macro 'RME_DIGIFACE_INVERT'
>    #define RME_DIGIFACE_INVERT BIT(32)
>                                ^~~~~~~
>    include/vdso/bits.h:7:26: note: expanded from macro 'BIT'
>    #define BIT(nr)                 (UL(1) << (nr))
>                                           ^  ~~~~
>    sound/usb/mixer_quirks.c:3185:4: warning: shift count >= width of type [-Wshift-count-overflow]
>                            RME_DIGIFACE_INVERT,
>                            ^~~~~~~~~~~~~~~~~~~
>    sound/usb/mixer_quirks.c:2948:29: note: expanded from macro 'RME_DIGIFACE_INVERT'
>    #define RME_DIGIFACE_INVERT BIT(32)
>                                ^~~~~~~
>    include/vdso/bits.h:7:26: note: expanded from macro 'BIT'
>    #define BIT(nr)                 (UL(1) << (nr))
>                                           ^  ~~~~
>    sound/usb/mixer_quirks.c:3210:4: warning: shift count >= width of type [-Wshift-count-overflow]
>                            RME_DIGIFACE_INVERT,
>                            ^~~~~~~~~~~~~~~~~~~
>    sound/usb/mixer_quirks.c:2948:29: note: expanded from macro 'RME_DIGIFACE_INVERT'
>    #define RME_DIGIFACE_INVERT BIT(32)
>                                ^~~~~~~
>    include/vdso/bits.h:7:26: note: expanded from macro 'BIT'
>    #define BIT(nr)                 (UL(1) << (nr))
>                                           ^  ~~~~
>    sound/usb/mixer_quirks.c:3235:4: warning: shift count >= width of type [-Wshift-count-overflow]
>                            RME_DIGIFACE_INVERT,
>                            ^~~~~~~~~~~~~~~~~~~
>    sound/usb/mixer_quirks.c:2948:29: note: expanded from macro 'RME_DIGIFACE_INVERT'
>    #define RME_DIGIFACE_INVERT BIT(32)
>                                ^~~~~~~
>    include/vdso/bits.h:7:26: note: expanded from macro 'BIT'
>    #define BIT(nr)                 (UL(1) << (nr))
>                                           ^  ~~~~
>    6 warnings generated.
> 
> 
> vim +3000 sound/usb/mixer_quirks.c
> 
>   2995	
>   2996	static int snd_rme_digiface_get_status_val(struct snd_kcontrol *kcontrol)
>   2997	{
>   2998		int err;
>   2999		u32 status[4];
>> 3000		bool invert = kcontrol->private_value & RME_DIGIFACE_INVERT;
>   3001		u8 reg = kcontrol->private_value >> 16;
>   3002		u16 mask = kcontrol->private_value & 0xffff;
>   3003		u16 val;
>   3004	
>   3005		err = snd_rme_digiface_read_status(kcontrol, status);
>   3006		if (err < 0)
>   3007			return err;
>   3008	
>   3009		switch (reg) {
>   3010		/* Status register halfwords */
>   3011		case RME_DIGIFACE_STATUS_REG0L ... RME_DIGIFACE_STATUS_REG3H:
>   3012			break;
>   3013		case RME_DIGIFACE_CTL_REG1: /* Control register 1, present in halfword 3L */
>   3014			reg = RME_DIGIFACE_STATUS_REG3L;
>   3015			break;
>   3016		case RME_DIGIFACE_CTL_REG2: /* Control register 2, present in halfword 3H */
>   3017			reg = RME_DIGIFACE_STATUS_REG3H;
>   3018			break;
>   3019		default:
>   3020			return -EINVAL;
>   3021		}
>   3022	
>   3023		if (reg & 1)
>   3024			val = status[reg >> 1] >> 16;
>   3025		else
>   3026			val = status[reg >> 1] & 0xffff;
>   3027	
>   3028		if (invert)
>   3029			val ^= mask;
>   3030	
>   3031		return field_get(mask, val);
>   3032	}
>   3033	
> 

~~ Lina




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux