aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_in.c
diff options
context:
space:
mode:
authorManivannan Sadhasivam <[email protected]>2022-03-01 21:33:03 +0530
committerGreg Kroah-Hartman <[email protected]>2022-03-18 14:02:54 +0100
commitd28cab4d4aa06cdb203196cefcd31208a8ccd808 (patch)
tree14ac992b8959c149d1df555de1c11dceb1416ab3 /net/lapb/lapb_in.c
parenta0f5a630668cb8b2ebf5204f08e957875e991780 (diff)
bus: mhi: Use bitfield operations for register read and write
Functions like mhi_read_reg_field(), mhi_poll_reg_field() and mhi_write_reg_field() could be modified to not depend on the shift value passed as an argument. Instead, the bitfield operation could be used to extract the shift value from the mask itself. This eliminates the need to define _SHIFT (and _SHFT) macros and simplifies the code a bit. For shift values those cannot be determined during build time, "__ffs()" helper is used find the shift value during runtime. While at it, let's also get rid of 32-bit masks like CHDBOFF_CHDBOFF_MASK by doing the full 32-bit register read. Suggested-by: Alex Elder <[email protected]> Reviewed-by: Alex Elder <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions