[PATCH v5 09/23] ALSA: usb-audio: #undef field_{get,prep}() before local definition
    Takashi Iwai 
    tiwai at suse.de
       
    Wed Oct 29 03:13:18 AEDT 2025
    
    
  
On Mon, 27 Oct 2025 19:41:43 +0100,
Geert Uytterhoeven wrote:
> 
> Prepare for the advent of globally available common field_get() and
> field_prep() macros by undefining the symbols before defining local
> variants.  This prevents redefinition warnings from the C preprocessor
> when introducing the common macros later.
> 
> Suggested-by: Yury Norov <yury.norov at gmail.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
> --
> v5:
>   - New.
> ---
>  sound/usb/mixer_quirks.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
> index 828af3095b86ee0a..713a8498b975e1ac 100644
> --- a/sound/usb/mixer_quirks.c
> +++ b/sound/usb/mixer_quirks.c
> @@ -3312,7 +3312,9 @@ static int snd_bbfpro_controls_create(struct usb_mixer_interface *mixer)
>  #define RME_DIGIFACE_INVERT BIT(31)
>  
>  /* Nonconst helpers */
> +#undef field_get
>  #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
> +#undef field_prep
>  #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
>  
>  static int snd_rme_digiface_write_reg(struct snd_kcontrol *kcontrol, int item, u16 mask, u16 val)
Acked-by: Takashi Iwai <tiwai at suse.de>
thanks,
Takashi
    
    
More information about the Linux-aspeed
mailing list