Fixup set_bit/clear_bit definition and usage
Get series with b4
b4 am [email protected]Versions newest first
- v3 Latest9 patches 0 repliesNew
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | x86: Define PLATFORM__SET_BIT for generic_set_bit() | +0 | 0 replies | |
| 2/9 | riscv: Define PLATFORM__SET_BIT for generic_set_bit() | +0 | 0 replies | |
| 3/9 | riscv: Define PLATFORM__CLEAR_BIT for generic_clear_bit() | +0 | 0 replies | |
| 4/9 | nios2: Define PLATFORM__SET_BIT for generic_set_bit() | +0 | 0 replies | |
| 5/9 | nios2: Define PLATFORM__CLEAR_BIT for generic_clear_bit() | +0 | 0 replies | |
| 6/9 | nds32: Define PLATFORM__SET_BIT for generic_set_bit() | +0 | 0 replies | |
| 7/9 | nds32: Define PLATFORM__CLEAR_BIT for generic_clear_bit() | +0 | 0 replies | |
| 8/9 | usb: f_mass_storage: Fix set_bit and clear_bit usage | +0 | 0 replies | |
| 9/9 | usb: composite convert __set_bit to generic_set_bit | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [U-Boot] [PATCH v3 0/9] Fixup set_bit/clear_bit definition and usage
Quoted 53 lines · Bryan O'Donoghue
v3:
- Uselinux/bitops.hinstead ofasm/bitops.h
- checkpatch.pl- Updated commit logs to make intended usage of
__set_bit()and__clear_bit()clearer with respect togeneric_set_bit()- Bin Meng- Added Patch #8 changelong to cover-letter - Lukasz Majewski Initial patch fixes compile error for x86 by ifdeffing the local
set_bit()clear_bit()Second patch renames to
_set_bit()and_clear_bit()respectivelyThird patch - on further discussion we agree to use
generic_set_bit()andgeneric_clear_bit().Using
generic_set_bit()andgeneric_clear_bit()prompts me to do a general tidy-up ofset_bit()andclear_bit()for USB gadget and to ensure where architectures provide__set_bit()and/or__clear_bit()that said functions are appropriately stitched intogeneric_set_bit()andgeneric_clear_bit()respectively.V2:
- Fix commit log nds2 -> nds32
- Fix copy/paste error resulting in double colon "arch : : text"V1:
Following on from a discussion with Marek and Lukasz re: a namespace collision withset_bitandclear_bitinf_mass_storage, I noticed some inconsistencies in the definition and usage ofPLATFORM__SET_BITandPLATFORM__CLEAR_BITas well as a similar use of__set_bitin the composite USB gadget driver.
__set_bitis lock-prefixed on x86 whereasset_bitis not and the analog driver in upstream Linux doesset_bit()not__set_bit().This series addresses all of those inconsistencies.
There are some usages of
__set_bit()but those are in SoC specific GPIO code-paths and therefore don't really need to change IMO.Bryan O'Donoghue (9):
x86: DefinePLATFORM__SET_BITforgeneric_set_bit()
riscv: DefinePLATFORM__SET_BITforgeneric_set_bit()
riscv: DefinePLATFORM__CLEAR_BITforgeneric_clear_bit()
nios2: DefinePLATFORM__SET_BITforgeneric_set_bit()
nios2: DefinePLATFORM__CLEAR_BITforgeneric_clear_bit()
nds32: DefinePLATFORM__SET_BITforgeneric_set_bit()
nds32: DefinePLATFORM__CLEAR_BITforgeneric_clear_bit()
usb:f_mass_storage: Fixset_bitandclear_bitusage
usb: composite convert__set_bittogeneric_set_bit
Quoted 7 lines
arch/nds32/include/asm/bitops.h | 4 ++++ arch/nios2/include/asm/bitops/non-atomic.h | 4 ++++ arch/riscv/include/asm/bitops.h | 4 ++++ arch/x86/include/asm/bitops.h | 2 ++ drivers/usb/gadget/composite.c | 2 +- drivers/usb/gadget/f_mass_storage.c | 25 +++------------------- 6 files changed, 18 insertions(+), 23 deletions(-)
This seems right, but I see a whole lot of CC and no Acks/Reviews, so I'm going to wait a bit more before grabbing it. It would be great to see a travis-ci link before I try myself, thanks!
Quoted 8 lines
Signature · 7 lines
-- 2.17.0 _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de https://lists.denx.de/listinfo/u-boot
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180510/c034a7fb/attachment.sig>