REG_FIELD_PREP16(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– REG_FIELD_PREP16(9) πŸ’–

Okay bestie, welcome to the REG_FIELD_PREP16(9) page from the Kernel API Manual β€” we're doing u16 bitfield prep today and it's gonna be cute and correct. ✨


🌸 NAME 🌸

REG_FIELD_PREP16 β€” prepare a u16 bitfield value πŸŽ€


πŸ› οΈ SYNOPSIS πŸ› οΈ

REG_FIELD_PREP16 (__mask , __val );

πŸŽ€ ARGUMENTS πŸŽ€

  • __mask β€” the shifted mask that defines the field's length and position, iykyk πŸ’…
  • __val β€” the value you're putting in the field 🫢

πŸ’… DESCRIPTION πŸ’…

This is the local copy of FIELD_PREP16, bestie. Its whole vibe is:

  • generate an integer constant expression ✨
  • force u8 😌
  • stay consistent with REG_FIELD_GET16, REG_BIT16 and REG_GENMASK16 πŸ‘‘

No cap, that's literally the description. πŸ¦‹


πŸ” RETURN πŸ”

__val gets masked and shifted into the field defined by __mask. Slay. πŸ’–


πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./include/drm/intel/reg_bits.h


This page lives in ./include/drm/intel, and the date stamped on it is October 2026 β€” mwah, bye bestie! πŸ’œπŸŽ€

πŸ“¦ where this page comes from