neh 108 drivers/staging/uwb/neh.c struct uwb_rc_neh *neh = container_of(kref, struct uwb_rc_neh, kref); neh 110 drivers/staging/uwb/neh.c kfree(neh); neh 113 drivers/staging/uwb/neh.c static void uwb_rc_neh_get(struct uwb_rc_neh *neh) neh 115 drivers/staging/uwb/neh.c kref_get(&neh->kref); neh 122 drivers/staging/uwb/neh.c void uwb_rc_neh_put(struct uwb_rc_neh *neh) neh 124 drivers/staging/uwb/neh.c kref_put(&neh->kref, uwb_rc_neh_release); neh 149 drivers/staging/uwb/neh.c int __uwb_rc_ctx_get(struct uwb_rc *rc, struct uwb_rc_neh *neh) neh 162 drivers/staging/uwb/neh.c neh->context = result; neh 169 drivers/staging/uwb/neh.c void __uwb_rc_ctx_put(struct uwb_rc *rc, struct uwb_rc_neh *neh) neh 172 drivers/staging/uwb/neh.c if (neh->context == 0) neh 174 drivers/staging/uwb/neh.c if (test_bit(neh->context, rc->ctx_bm) == 0) { neh 176 drivers/staging/uwb/neh.c neh->context); neh 179 drivers/staging/uwb/neh.c clear_bit(neh->context, rc->ctx_bm); neh 180 drivers/staging/uwb/neh.c neh->context = 0; neh 202 drivers/staging/uwb/neh.c struct uwb_rc_neh *neh; neh 204 drivers/staging/uwb/neh.c neh = kzalloc(sizeof(*neh), GFP_KERNEL); neh 205 drivers/staging/uwb/neh.c if (neh == NULL) { neh 210 drivers/staging/uwb/neh.c kref_init(&neh->kref); neh 211 drivers/staging/uwb/neh.c INIT_LIST_HEAD(&neh->list_node); neh 212 drivers/staging/uwb/neh.c timer_setup(&neh->timer, uwb_rc_neh_timer, 0); neh 214 drivers/staging/uwb/neh.c neh->rc = rc; neh 215 drivers/staging/uwb/neh.c neh->evt_type = expected_type; neh 216 drivers/staging/uwb/neh.c neh->evt = cpu_to_le16(expected_event); neh 217 drivers/staging/uwb/neh.c neh->cb = cb; neh 218 drivers/staging/uwb/neh.c neh->arg = arg; neh 221 drivers/staging/uwb/neh.c result = __uwb_rc_ctx_get(rc, neh); neh 223 drivers/staging/uwb/neh.c cmd->bCommandContext = neh->context; neh 224 drivers/staging/uwb/neh.c list_add_tail(&neh->list_node, &rc->neh_list); neh 225 drivers/staging/uwb/neh.c uwb_rc_neh_get(neh); neh 231 drivers/staging/uwb/neh.c return neh; neh 234 drivers/staging/uwb/neh.c kfree(neh); neh 240 drivers/staging/uwb/neh.c static void __uwb_rc_neh_rm(struct uwb_rc *rc, struct uwb_rc_neh *neh) neh 242 drivers/staging/uwb/neh.c __uwb_rc_ctx_put(rc, neh); neh 243 drivers/staging/uwb/neh.c list_del(&neh->list_node); neh 254 drivers/staging/uwb/neh.c void uwb_rc_neh_rm(struct uwb_rc *rc, struct uwb_rc_neh *neh) neh 259 drivers/staging/uwb/neh.c __uwb_rc_neh_rm(rc, neh); neh 262 drivers/staging/uwb/neh.c del_timer_sync(&neh->timer); neh 263 drivers/staging/uwb/neh.c uwb_rc_neh_put(neh); neh 274 drivers/staging/uwb/neh.c void uwb_rc_neh_arm(struct uwb_rc *rc, struct uwb_rc_neh *neh) neh 279 drivers/staging/uwb/neh.c if (neh->context) neh 280 drivers/staging/uwb/neh.c mod_timer(&neh->timer, neh 285 drivers/staging/uwb/neh.c static void uwb_rc_neh_cb(struct uwb_rc_neh *neh, struct uwb_rceb *rceb, size_t size) neh 287 drivers/staging/uwb/neh.c (*neh->cb)(neh->rc, neh->arg, rceb, size); neh 288 drivers/staging/uwb/neh.c uwb_rc_neh_put(neh); neh 291 drivers/staging/uwb/neh.c static bool uwb_rc_neh_match(struct uwb_rc_neh *neh, const struct uwb_rceb *rceb) neh 293 drivers/staging/uwb/neh.c return neh->evt_type == rceb->bEventType neh 294 drivers/staging/uwb/neh.c && neh->evt == rceb->wEvent neh 295 drivers/staging/uwb/neh.c && neh->context == rceb->bEventContext; neh 316 drivers/staging/uwb/neh.c struct uwb_rc_neh *neh = NULL, *h; neh 323 drivers/staging/uwb/neh.c neh = h; neh 328 drivers/staging/uwb/neh.c if (neh) neh 329 drivers/staging/uwb/neh.c __uwb_rc_neh_rm(rc, neh); neh 333 drivers/staging/uwb/neh.c return neh; neh 395 drivers/staging/uwb/neh.c struct uwb_rc_neh *neh; neh 409 drivers/staging/uwb/neh.c neh = uwb_rc_neh_lookup(rc, rceb); neh 410 drivers/staging/uwb/neh.c if (neh) { neh 413 drivers/staging/uwb/neh.c neh->completed = 1; neh 414 drivers/staging/uwb/neh.c del_timer(&neh->timer); neh 416 drivers/staging/uwb/neh.c uwb_rc_neh_cb(neh, rceb, size); neh 534 drivers/staging/uwb/neh.c struct uwb_rc_neh *neh; neh 543 drivers/staging/uwb/neh.c neh = list_first_entry(&rc->neh_list, struct uwb_rc_neh, list_node); neh 544 drivers/staging/uwb/neh.c __uwb_rc_neh_rm(rc, neh); neh 547 drivers/staging/uwb/neh.c del_timer_sync(&neh->timer); neh 548 drivers/staging/uwb/neh.c uwb_rc_neh_cb(neh, NULL, error); neh 556 drivers/staging/uwb/neh.c struct uwb_rc_neh *neh = from_timer(neh, t, timer); neh 557 drivers/staging/uwb/neh.c struct uwb_rc *rc = neh->rc; neh 561 drivers/staging/uwb/neh.c if (neh->completed) { neh 565 drivers/staging/uwb/neh.c if (neh->context) neh 566 drivers/staging/uwb/neh.c __uwb_rc_neh_rm(rc, neh); neh 568 drivers/staging/uwb/neh.c neh = NULL; neh 571 drivers/staging/uwb/neh.c if (neh) neh 572 drivers/staging/uwb/neh.c uwb_rc_neh_cb(neh, NULL, -ETIMEDOUT); neh 591 drivers/staging/uwb/neh.c struct uwb_rc_neh *neh; neh 599 drivers/staging/uwb/neh.c neh = list_first_entry(&rc->neh_list, struct uwb_rc_neh, list_node); neh 600 drivers/staging/uwb/neh.c __uwb_rc_neh_rm(rc, neh); neh 603 drivers/staging/uwb/neh.c del_timer_sync(&neh->timer); neh 604 drivers/staging/uwb/neh.c uwb_rc_neh_put(neh); neh 63 drivers/staging/uwb/reset.c struct uwb_rc_neh *neh; neh 83 drivers/staging/uwb/reset.c neh = uwb_rc_neh_add(rc, cmd, expected_type, expected_event, cb, arg); neh 84 drivers/staging/uwb/reset.c if (IS_ERR(neh)) { neh 85 drivers/staging/uwb/reset.c result = PTR_ERR(neh); neh 93 drivers/staging/uwb/reset.c uwb_rc_neh_rm(rc, neh); neh 95 drivers/staging/uwb/reset.c uwb_rc_neh_arm(rc, neh); neh 96 drivers/staging/uwb/reset.c uwb_rc_neh_put(neh); neh 94 drivers/staging/uwb/uwb-internal.h void uwb_rc_neh_rm(struct uwb_rc *rc, struct uwb_rc_neh *neh); neh 95 drivers/staging/uwb/uwb-internal.h void uwb_rc_neh_arm(struct uwb_rc *rc, struct uwb_rc_neh *neh); neh 96 drivers/staging/uwb/uwb-internal.h void uwb_rc_neh_put(struct uwb_rc_neh *neh); neh 1042 fs/ext4/extents.c struct ext4_extent_header *neh; neh 1116 fs/ext4/extents.c neh = ext_block_hdr(bh); neh 1117 fs/ext4/extents.c neh->eh_entries = 0; neh 1118 fs/ext4/extents.c neh->eh_max = cpu_to_le16(ext4_ext_space_block(inode, 0)); neh 1119 fs/ext4/extents.c neh->eh_magic = EXT4_EXT_MAGIC; neh 1120 fs/ext4/extents.c neh->eh_depth = 0; neh 1136 fs/ext4/extents.c ex = EXT_FIRST_EXTENT(neh); neh 1138 fs/ext4/extents.c le16_add_cpu(&neh->eh_entries, m); neh 1143 fs/ext4/extents.c sizeof(struct ext4_extent) * le16_to_cpu(neh->eh_entries); neh 1145 fs/ext4/extents.c ext4_extent_block_csum_set(inode, neh); neh 1193 fs/ext4/extents.c neh = ext_block_hdr(bh); neh 1194 fs/ext4/extents.c neh->eh_entries = cpu_to_le16(1); neh 1195 fs/ext4/extents.c neh->eh_magic = EXT4_EXT_MAGIC; neh 1196 fs/ext4/extents.c neh->eh_max = cpu_to_le16(ext4_ext_space_block_idx(inode, 0)); neh 1197 fs/ext4/extents.c neh->eh_depth = cpu_to_le16(depth - i); neh 1198 fs/ext4/extents.c fidx = EXT_FIRST_INDEX(neh); neh 1222 fs/ext4/extents.c le16_add_cpu(&neh->eh_entries, m); neh 1226 fs/ext4/extents.c (sizeof(struct ext4_extent) * le16_to_cpu(neh->eh_entries)); neh 1229 fs/ext4/extents.c ext4_extent_block_csum_set(inode, neh); neh 1289 fs/ext4/extents.c struct ext4_extent_header *neh; neh 1327 fs/ext4/extents.c neh = ext_block_hdr(bh); neh 1331 fs/ext4/extents.c neh->eh_max = cpu_to_le16(ext4_ext_space_block_idx(inode, 0)); neh 1333 fs/ext4/extents.c neh->eh_max = cpu_to_le16(ext4_ext_space_block(inode, 0)); neh 1334 fs/ext4/extents.c neh->eh_magic = EXT4_EXT_MAGIC; neh 1335 fs/ext4/extents.c ext4_extent_block_csum_set(inode, neh); neh 1344 fs/ext4/extents.c neh = ext_inode_hdr(inode); neh 1345 fs/ext4/extents.c neh->eh_entries = cpu_to_le16(1); neh 1346 fs/ext4/extents.c ext4_idx_store_pblock(EXT_FIRST_INDEX(neh), newblock); neh 1347 fs/ext4/extents.c if (neh->eh_depth == 0) { neh 1349 fs/ext4/extents.c neh->eh_max = cpu_to_le16(ext4_ext_space_root_idx(inode, 0)); neh 1350 fs/ext4/extents.c EXT_FIRST_INDEX(neh)->ei_block = neh 1351 fs/ext4/extents.c EXT_FIRST_EXTENT(neh)->ee_block; neh 1354 fs/ext4/extents.c le16_to_cpu(neh->eh_entries), le16_to_cpu(neh->eh_max), neh 1355 fs/ext4/extents.c le32_to_cpu(EXT_FIRST_INDEX(neh)->ei_block), neh 1356 fs/ext4/extents.c ext4_idx_pblock(EXT_FIRST_INDEX(neh))); neh 1358 fs/ext4/extents.c le16_add_cpu(&neh->eh_depth, 1);