Add helper for "cleanup" variable attribute
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest6 patches 6 repliesIn review
- v25 patches 2 repliesSuperseded
- v15 patches 1 replySuperseded
Changes in v3 from the cover letter
- Add macros to declare cleanup for specific types
- Add file descriptor cleanup
- Add "steal" helpers for fd and pointers
- Add unit tests
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | all: Remove more unneeded MIN/MAX macro definitionlib/ src/ src/ | +0 | 1 reply | |
| 2/6 | shared/util: Add helper for "cleanup" variable attributesrc/ unit/ | +105 | 0 replies | |
| 3/6 | doc: Recommend using _cleanup_ and friendsdoc/ | +3 | 0 replies | |
| 4/6 | main: Use _cleanup_() to simplify configuration parsingsrc/ | +31 | 1 reply | |
| 5/6 | client: Use _cleanup_fd_ to simplify urandom accessclient/ | +1 | 0 replies | |
| 6/6 | btattach: Use _cleanup_fd_ to simplify error pathstools/ | +6 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [BlueZ v3 0/6] Add helper for "cleanup" variable attribute
As discussed in:
https://lore.kernel.org/linux-bluetooth/[email protected]/
Implement a cleanup helper.
The MIN/MAX fix is here because it touches the same hunk in src/main.c as the other patches. Feel free to pick it up straight away while the rest is discussed.
Changes since v2:
- Add macros to declare cleanup for specific types
- Add file descriptor cleanup
- Add "steal" helpers for fd and pointers
- Add unit tests
Changes since v1:
- Fixed checkpatch warnings
Bastien Nocera (6):
all: Remove more unneeded MIN/MAX macro definition shared/util: Add helper for "cleanup" variable attribute
doc: Recommend using _cleanup_ and friends
main: Use _cleanup_() to simplify configuration parsing
client: Use _cleanup_fd_ to simplify urandom access
btattach: Use _cleanup_fd_ to simplify error paths
client/mgmt.c | 5 +- doc/maintainer-guidelines.rst | 3 + lib/bluetooth/hci.c | 4 -- src/main.c | 103 ++++++++++------------------------ src/shared/gatt-server.c | 8 --- src/shared/util.h | 40 +++++++++++++ tools/btattach.c | 18 ++---- unit/test-util.c | 65 +++++++++++++++++++++ 8 files changed, 145 insertions(+), 101 deletions(-)
Signature · 1 line
2.54.0