Skip to content

Commit 2b96969

Browse files
committed
cleanup: rename _cleanup_huge_ to __cleanup_huge
Follow the new naming pattern of the compiler attributes which is just __NAME. This is what the kernel is using as well. Signed-off-by: Daniel Wagner <[email protected]>
1 parent f326b21 commit 2b96969

9 files changed

Lines changed: 15 additions & 15 deletions

File tree

nvme.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ static int get_persistent_event_log(int argc, char **argv,
15321532

15331533
__cleanup_free struct nvme_persistent_event_log *pevent = NULL;
15341534
struct nvme_persistent_event_log *pevent_collected = NULL;
1535-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
1535+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
15361536
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
15371537
_cleanup_nvme_transport_handle_ struct libnvme_transport_handle *hdl = NULL;
15381538
nvme_print_flags_t flags;
@@ -5123,7 +5123,7 @@ static int fw_download(int argc, char **argv, struct command *acmd, struct plugi
51235123

51245124
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
51255125
_cleanup_nvme_transport_handle_ struct libnvme_transport_handle *hdl = NULL;
5126-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
5126+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
51275127
__cleanup_fd int fw_fd = -1;
51285128
unsigned int fw_size, pos;
51295129
int err;
@@ -8317,7 +8317,7 @@ static int submit_io(int opcode, char *command, const char *desc, int argc, char
83178317
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
83188318
unsigned long long buffer_size = 0, mbuffer_size = 0;
83198319
__cleanup_free struct nvme_nvm_id_ns *nvm_ns = NULL;
8320-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
8320+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
83218321
__cleanup_free struct nvme_id_ns *ns = NULL;
83228322
unsigned int logical_block_size = 0;
83238323
struct timeval start_time, end_time;
@@ -9271,7 +9271,7 @@ static int passthru(int argc, char **argv, bool admin,
92719271
const char *wr = "set dataflow direction to send";
92729272
const char *prefill = "prefill buffers with known byte-value, default 0";
92739273

9274-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
9274+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
92759275
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
92769276
_cleanup_nvme_transport_handle_ struct libnvme_transport_handle *hdl = NULL;
92779277
__cleanup_fd int dfd = -1, mfd = -1;
@@ -10428,7 +10428,7 @@ static int libnvme_mi(int argc, char **argv, __u8 admin_opcode, const char *desc
1042810428
bool send;
1042910429
__cleanup_fd int fd = -1;
1043010430
int flags;
10431-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
10431+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
1043210432
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
1043310433
_cleanup_nvme_transport_handle_ struct libnvme_transport_handle *hdl = NULL;
1043410434
__u32 result;

plugins/lm/lm-nvme.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static int lm_create_cdq(int argc, char **argv, struct command *acmd, struct plu
6363
_cleanup_nvme_transport_handle_ struct libnvme_transport_handle *hdl = NULL;
6464
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
6565
struct lba_migration_queue_entry_type_0 *queue = NULL;
66-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
66+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
6767
struct libnvme_passthru_cmd cmd;
6868
int err = -1;
6969

@@ -276,7 +276,7 @@ static int lm_migration_send(int argc, char **argv, struct command *acmd, struct
276276

277277
_cleanup_nvme_transport_handle_ struct libnvme_transport_handle *hdl = NULL;
278278
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
279-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
279+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
280280
__cleanup_file FILE *file = NULL;
281281
struct libnvme_passthru_cmd cmd;
282282
void *data = NULL;
@@ -408,7 +408,7 @@ static int lm_migration_recv(int argc, char **argv, struct command *acmd, struct
408408

409409
_cleanup_nvme_transport_handle_ struct libnvme_transport_handle *hdl = NULL;
410410
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
411-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
411+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
412412
__cleanup_file FILE *fd = NULL;
413413
struct libnvme_passthru_cmd cmd;
414414
nvme_print_flags_t flags;

plugins/micron/micron-nvme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2213,7 +2213,7 @@ static void GetGenericLogs(struct libnvme_transport_handle *hdl, const char *dir
22132213
struct nvme_firmware_slot fw_log;
22142214
struct nvme_cmd_effects_log effects;
22152215
struct nvme_persistent_event_log pevent_log;
2216-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
2216+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
22172217
void *pevent_log_info = NULL;
22182218
__u32 log_len = 0;
22192219
int err = 0;

plugins/ocp/ocp-nvme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2937,7 +2937,7 @@ static int ocp_get_persistent_event_log(int argc, char **argv,
29372937

29382938
__cleanup_free struct nvme_persistent_event_log *pevent = NULL;
29392939
struct nvme_persistent_event_log *pevent_collected = NULL;
2940-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
2940+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
29412941
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
29422942
_cleanup_nvme_transport_handle_ struct libnvme_transport_handle *hdl = NULL;
29432943

plugins/scaleflux/sfx-nvme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ static int nvme_parse_evtlog(void *pevent_log_info, __u32 log_len, char *output)
12021202
static int nvme_dump_evtlog(struct libnvme_transport_handle *hdl, __u32 namespace_id, __u32 storage_medium,
12031203
char *file, bool parse, char *output)
12041204
{
1205-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
1205+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
12061206
struct nvme_persistent_event_log *pevent;
12071207
void *pevent_log_info;
12081208
__u8 lsp_base, lsp;

plugins/solidigm/solidigm-internal-logs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ static int ilog_dump_no_lsp_log_pages(struct libnvme_transport_handle *hdl, stru
777777
static int ilog_dump_pel(struct libnvme_transport_handle *hdl, struct ilog *ilog)
778778
{
779779
__cleanup_free struct nvme_persistent_event_log *pevent = NULL;
780-
_cleanup_huge_ struct nvme_mem_huge mh = {0};
780+
__cleanup_huge struct nvme_mem_huge mh = {0};
781781
void *pevent_log_full;
782782
size_t max_data_tx;
783783
struct log lp = {

plugins/wdc/wdc-nvme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11646,7 +11646,7 @@ static int wdc_vs_pcie_stats(int argc, char **argv, struct command *acmd,
1164611646
nvme_print_flags_t fmt;
1164711647
int ret;
1164811648
__u64 capabilities = 0;
11649-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
11649+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
1165011650
struct wdc_vs_pcie_stats *pcieStatsPtr = NULL;
1165111651
int pcie_stats_size = sizeof(struct wdc_vs_pcie_stats);
1165211652

plugins/zns/zns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ static int report_zones(int argc, char **argv, struct command *acmd, struct plug
740740

741741
_cleanup_nvme_transport_handle_ struct libnvme_transport_handle *hdl = NULL;
742742
_cleanup_nvme_global_ctx_ struct libnvme_global_ctx *ctx = NULL;
743-
_cleanup_huge_ struct nvme_mem_huge mh = { 0, };
743+
__cleanup_huge struct nvme_mem_huge mh = { 0, };
744744
struct nvme_zone_report *report, *buff;
745745
struct libnvme_passthru_cmd cmd;
746746
nvme_print_flags_t flags;

util/cleanup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static inline void freep(void *p)
2727
}
2828
#define __cleanup_free __cleanup(freep)
2929

30-
#define _cleanup_huge_ __cleanup(nvme_free_huge)
30+
#define __cleanup_huge __cleanup(nvme_free_huge)
3131

3232
static inline void cleanup_fd(int *fd)
3333
{

0 commit comments

Comments
 (0)