Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 1229) sorted by relevance

12345678910>>...50

/drivers/media/pci/zoran/
Dzr36050.c41 static u8 zr36050_read(struct zr36050 *ptr, u16 reg) in zr36050_read() argument
43 struct zoran *zr = videocodec_to_zoran(ptr->codec); in zr36050_read()
47 if (ptr->codec->master_data->readreg) in zr36050_read()
48 value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xFF; in zr36050_read()
50 zrdev_err(zr, "%s: invalid I/O setup, nothing read!\n", ptr->name); in zr36050_read()
52 zrdev_dbg(zr, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); in zr36050_read()
57 static void zr36050_write(struct zr36050 *ptr, u16 reg, u8 value) in zr36050_write() argument
59 struct zoran *zr = videocodec_to_zoran(ptr->codec); in zr36050_write()
61 zrdev_dbg(zr, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); in zr36050_write()
64 if (ptr->codec->master_data->writereg) in zr36050_write()
[all …]
Dzr36060.c41 static u8 zr36060_read(struct zr36060 *ptr, u16 reg) in zr36060_read() argument
44 struct zoran *zr = videocodec_to_zoran(ptr->codec); in zr36060_read()
47 if (ptr->codec->master_data->readreg) in zr36060_read()
48 value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xff; in zr36060_read()
50 zrdev_err(zr, "%s: invalid I/O setup, nothing read!\n", ptr->name); in zr36060_read()
55 static void zr36060_write(struct zr36060 *ptr, u16 reg, u8 value) in zr36060_write() argument
57 struct zoran *zr = videocodec_to_zoran(ptr->codec); in zr36060_write()
62 if (ptr->codec->master_data->writereg) in zr36060_write()
63 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36060_write()
65 zrdev_err(zr, "%s: invalid I/O setup, nothing written!\n", ptr->name); in zr36060_write()
[all …]
Dzr36016.c33 static u8 zr36016_read(struct zr36016 *ptr, u16 reg) in zr36016_read() argument
36 struct zoran *zr = videocodec_to_zoran(ptr->codec); in zr36016_read()
39 if (ptr->codec->master_data->readreg) in zr36016_read()
40 value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xFF; in zr36016_read()
42 zrdev_err(zr, "%s: invalid I/O setup, nothing read!\n", ptr->name); in zr36016_read()
44 zrdev_dbg(zr, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); in zr36016_read()
49 static void zr36016_write(struct zr36016 *ptr, u16 reg, u8 value) in zr36016_write() argument
51 struct zoran *zr = videocodec_to_zoran(ptr->codec); in zr36016_write()
53 zrdev_dbg(zr, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); in zr36016_write()
56 if (ptr->codec->master_data->writereg) in zr36016_write()
[all …]
/drivers/video/
Dhdmi.c35 static u8 hdmi_infoframe_checksum(const u8 *ptr, size_t size) in hdmi_infoframe_checksum() argument
42 csum += ptr[i]; in hdmi_infoframe_checksum()
49 u8 *ptr = buffer; in hdmi_infoframe_set_checksum() local
51 ptr[3] = hdmi_infoframe_checksum(buffer, size); in hdmi_infoframe_set_checksum()
113 u8 *ptr = buffer; in hdmi_avi_infoframe_pack_only() local
128 ptr[0] = frame->type; in hdmi_avi_infoframe_pack_only()
129 ptr[1] = frame->version; in hdmi_avi_infoframe_pack_only()
130 ptr[2] = frame->length; in hdmi_avi_infoframe_pack_only()
131 ptr[3] = 0; /* checksum */ in hdmi_avi_infoframe_pack_only()
134 ptr += HDMI_INFOFRAME_HEADER_SIZE; in hdmi_avi_infoframe_pack_only()
[all …]
/drivers/gpu/drm/radeon/
Datom.c184 int *ptr, uint32_t *saved, int print) in atom_get_src_int() argument
192 idx = U16(*ptr); in atom_get_src_int()
193 (*ptr) += 2; in atom_get_src_int()
224 idx = U8(*ptr); in atom_get_src_int()
225 (*ptr)++; in atom_get_src_int()
233 idx = U8(*ptr); in atom_get_src_int()
234 (*ptr)++; in atom_get_src_int()
270 idx = U16(*ptr); in atom_get_src_int()
271 (*ptr) += 2; in atom_get_src_int()
281 idx = U8(*ptr); in atom_get_src_int()
[all …]
Datom-bits.h28 static inline uint8_t get_u8(void *bios, int ptr) in get_u8() argument
30 return ((unsigned char *)bios)[ptr]; in get_u8()
32 #define U8(ptr) get_u8(ctx->ctx->bios, (ptr)) argument
33 #define CU8(ptr) get_u8(ctx->bios, (ptr)) argument
34 static inline uint16_t get_u16(void *bios, int ptr) in get_u16() argument
36 return get_u8(bios ,ptr)|(((uint16_t)get_u8(bios, ptr+1))<<8); in get_u16()
38 #define U16(ptr) get_u16(ctx->ctx->bios, (ptr)) argument
39 #define CU16(ptr) get_u16(ctx->bios, (ptr)) argument
40 static inline uint32_t get_u32(void *bios, int ptr) in get_u32() argument
42 return get_u16(bios, ptr)|(((uint32_t)get_u16(bios, ptr+2))<<16); in get_u32()
[all …]
/drivers/gpu/drm/amd/amdgpu/
Datom.c182 int *ptr, uint32_t *saved, int print) in atom_get_src_int() argument
190 idx = U16(*ptr); in atom_get_src_int()
191 (*ptr) += 2; in atom_get_src_int()
222 idx = U8(*ptr); in atom_get_src_int()
223 (*ptr)++; in atom_get_src_int()
231 idx = U8(*ptr); in atom_get_src_int()
232 (*ptr)++; in atom_get_src_int()
268 idx = U16(*ptr); in atom_get_src_int()
269 (*ptr) += 2; in atom_get_src_int()
279 idx = U8(*ptr); in atom_get_src_int()
[all …]
/drivers/gpu/drm/amd/include/
Datom-bits.h28 static inline uint8_t get_u8(void *bios, int ptr) in get_u8() argument
30 return ((unsigned char *)bios)[ptr]; in get_u8()
32 #define U8(ptr) get_u8(ctx->ctx->bios, (ptr)) argument
33 #define CU8(ptr) get_u8(ctx->bios, (ptr)) argument
34 static inline uint16_t get_u16(void *bios, int ptr) in get_u16() argument
36 return get_u8(bios ,ptr)|(((uint16_t)get_u8(bios, ptr+1))<<8); in get_u16()
38 #define U16(ptr) get_u16(ctx->ctx->bios, (ptr)) argument
39 #define CU16(ptr) get_u16(ctx->bios, (ptr)) argument
40 static inline uint32_t get_u32(void *bios, int ptr) in get_u32() argument
42 return get_u16(bios, ptr)|(((uint32_t)get_u16(bios, ptr+2))<<16); in get_u32()
[all …]
/drivers/extcon/
Ddevres.c68 struct extcon_dev **ptr, *edev; in devm_extcon_dev_allocate() local
70 ptr = devres_alloc(devm_extcon_dev_release, sizeof(*ptr), GFP_KERNEL); in devm_extcon_dev_allocate()
71 if (!ptr) in devm_extcon_dev_allocate()
76 devres_free(ptr); in devm_extcon_dev_allocate()
82 *ptr = edev; in devm_extcon_dev_allocate()
83 devres_add(dev, ptr); in devm_extcon_dev_allocate()
120 struct extcon_dev **ptr; in devm_extcon_dev_register() local
123 ptr = devres_alloc(devm_extcon_dev_unreg, sizeof(*ptr), GFP_KERNEL); in devm_extcon_dev_register()
124 if (!ptr) in devm_extcon_dev_register()
129 devres_free(ptr); in devm_extcon_dev_register()
[all …]
/drivers/net/ppp/
Dppp_mppe.h36 u_char *ptr = ci; /* u_char[4] */ \
40 *ptr++ = 0x0; \
42 *ptr++ = MPPE_H_BIT; \
43 *ptr++ = 0; \
44 *ptr++ = 0; \
47 *ptr = 0; \
49 *ptr |= MPPE_S_BIT; \
51 *ptr |= MPPE_L_BIT; \
58 u_char *ptr = ci; /* u_char[4] */ \
63 if (!(ptr[0] & MPPE_H_BIT)) \
[all …]
/drivers/regulator/
Dgpio-regulator.c48 int ptr; in gpio_regulator_get_value() local
50 for (ptr = 0; ptr < data->nr_states; ptr++) in gpio_regulator_get_value()
51 if (data->states[ptr].gpios == data->state) in gpio_regulator_get_value()
52 return data->states[ptr].value; in gpio_regulator_get_value()
62 int ptr, target = 0, state, best_val = INT_MAX; in gpio_regulator_set_voltage() local
64 for (ptr = 0; ptr < data->nr_states; ptr++) in gpio_regulator_set_voltage()
65 if (data->states[ptr].value < best_val && in gpio_regulator_set_voltage()
66 data->states[ptr].value >= min_uV && in gpio_regulator_set_voltage()
67 data->states[ptr].value <= max_uV) { in gpio_regulator_set_voltage()
68 target = data->states[ptr].gpios; in gpio_regulator_set_voltage()
[all …]
/drivers/staging/rtl8192u/ieee80211/
Dieee80211_crypt.c37 struct list_head *ptr, *n; in ieee80211_crypt_deinit_entries() local
40 for (ptr = ieee->crypt_deinit_list.next, n = ptr->next; in ieee80211_crypt_deinit_entries()
41 ptr != &ieee->crypt_deinit_list; ptr = n, n = ptr->next) { in ieee80211_crypt_deinit_entries()
42 entry = list_entry(ptr, struct ieee80211_crypt_data, list); in ieee80211_crypt_deinit_entries()
47 list_del(ptr); in ieee80211_crypt_deinit_entries()
125 struct list_head *ptr; in ieee80211_unregister_crypto_ops() local
132 for (ptr = hcrypt->algs.next; ptr != &hcrypt->algs; ptr = ptr->next) { in ieee80211_unregister_crypto_ops()
134 (struct ieee80211_crypto_alg *)ptr; in ieee80211_unregister_crypto_ops()
156 struct list_head *ptr; in ieee80211_get_crypto_ops() local
163 for (ptr = hcrypt->algs.next; ptr != &hcrypt->algs; ptr = ptr->next) { in ieee80211_get_crypto_ops()
[all …]
/drivers/platform/surface/aggregator/
Dssh_parser.c31 u16 actual = ssh_crc(src->ptr, src->len); in sshp_validate_crc()
43 return src->len >= 2 && get_unaligned_le16(src->ptr) == SSH_MSG_SYN; in sshp_starts_with_syn()
74 if (likely(get_unaligned_le16(src->ptr + i) == SSH_MSG_SYN)) { in sshp_find_syn()
75 rem->ptr = src->ptr + i; in sshp_find_syn()
81 if (unlikely(src->ptr[src->len - 1] == (SSH_MSG_SYN & 0xff))) { in sshp_find_syn()
82 rem->ptr = src->ptr + src->len - 1; in sshp_find_syn()
87 rem->ptr = src->ptr + src->len; in sshp_find_syn()
126 payload->ptr = NULL; in sshp_parse_frame()
141 sf.ptr = source->ptr + sizeof(u16); in sshp_parse_frame()
145 if (unlikely(!sshp_validate_crc(&sf, sf.ptr + sf.len))) { in sshp_parse_frame()
[all …]
Dssh_msgb.h27 u8 *ptr; member
39 static inline void msgb_init(struct msgbuf *msgb, u8 *ptr, size_t cap) in msgb_init() argument
41 msgb->begin = ptr; in msgb_init()
42 msgb->end = ptr + cap; in msgb_init()
43 msgb->ptr = ptr; in msgb_init()
52 return msgb->ptr - msgb->begin; in msgb_bytes_used()
57 *msgb->ptr = value; in __msgb_push_u8()
58 msgb->ptr += sizeof(u8); in __msgb_push_u8()
63 put_unaligned_le16(value, msgb->ptr); in __msgb_push_u16()
64 msgb->ptr += sizeof(u16); in __msgb_push_u16()
[all …]
/drivers/sh/intc/
Daccess.c78 void __iomem *ptr = (void __iomem *)addr; in test_8() local
79 return intc_get_field_from_handle(__raw_readb(ptr), h); in test_8()
85 void __iomem *ptr = (void __iomem *)addr; in test_16() local
86 return intc_get_field_from_handle(__raw_readw(ptr), h); in test_16()
92 void __iomem *ptr = (void __iomem *)addr; in test_32() local
93 return intc_get_field_from_handle(__raw_readl(ptr), h); in test_32()
99 void __iomem *ptr = (void __iomem *)addr; in write_8() local
100 __raw_writeb(intc_set_field_from_handle(0, data, h), ptr); in write_8()
101 (void)__raw_readb(ptr); /* Defeat write posting */ in write_8()
108 void __iomem *ptr = (void __iomem *)addr; in write_16() local
[all …]
/drivers/misc/lkdtm/
Dperms.c109 volatile unsigned long *ptr = (unsigned long *)&rodata; in lkdtm_WRITE_RO() local
111 pr_info("attempting bad rodata write at %px\n", ptr); in lkdtm_WRITE_RO()
112 *ptr ^= 0xabcd1234; in lkdtm_WRITE_RO()
118 volatile unsigned long *ptr = &ro_after_init; in lkdtm_WRITE_RO_AFTER_INIT() local
125 if ((*ptr & 0xAA) != 0xAA) { in lkdtm_WRITE_RO_AFTER_INIT()
126 pr_info("%p was NOT written during init!?\n", ptr); in lkdtm_WRITE_RO_AFTER_INIT()
130 pr_info("attempting bad ro_after_init write at %px\n", ptr); in lkdtm_WRITE_RO_AFTER_INIT()
131 *ptr ^= 0xabcd1234; in lkdtm_WRITE_RO_AFTER_INIT()
138 volatile unsigned char *ptr; in lkdtm_WRITE_KERN() local
142 ptr = dereference_function_descriptor(do_overwritten); in lkdtm_WRITE_KERN()
[all …]
/drivers/gpu/drm/i915/
Di915_utils.h114 #define ptr_mask_bits(ptr, n) ({ \ argument
115 unsigned long __v = (unsigned long)(ptr); \
116 (typeof(ptr))(__v & -BIT(n)); \
119 #define ptr_unmask_bits(ptr, n) ((unsigned long)(ptr) & (BIT(n) - 1)) argument
121 #define ptr_unpack_bits(ptr, bits, n) ({ \ argument
122 unsigned long __v = (unsigned long)(ptr); \
124 (typeof(ptr))(__v & -BIT(n)); \
127 #define ptr_pack_bits(ptr, bits, n) ({ \ argument
130 ((typeof(ptr))((unsigned long)(ptr) | __bits)); \
133 #define ptr_dec(ptr) ({ \ argument
[all …]
/drivers/staging/media/atomisp/pci/base/refcount/src/
Drefcount.c42 static struct ia_css_refcount_entry *refcount_find_entry(ia_css_ptr ptr, in refcount_find_entry() argument
47 if (ptr == 0) in refcount_find_entry()
62 if ((&myrefcount.items[i])->data == ptr) { in refcount_find_entry()
126 ia_css_ptr ia_css_refcount_increment(s32 id, ia_css_ptr ptr) in ia_css_refcount_increment() argument
130 if (ptr == mmgr_NULL) in ia_css_refcount_increment()
131 return ptr; in ia_css_refcount_increment()
133 entry = refcount_find_entry(ptr, false); in ia_css_refcount_increment()
136 "%s(%x) 0x%x\n", __func__, id, ptr); in ia_css_refcount_increment()
139 entry = refcount_find_entry(ptr, true); in ia_css_refcount_increment()
152 if (entry->data == ptr) in ia_css_refcount_increment()
[all …]
/drivers/infiniband/hw/hns/
Dhns_roce_common.h60 #define _hr_reg_enable(ptr, field_type, field_h, field_l) \ argument
62 const field_type *_ptr = ptr; \
68 #define hr_reg_enable(ptr, field) _hr_reg_enable(ptr, field) argument
70 #define _hr_reg_clear(ptr, field_type, field_h, field_l) \ argument
72 const field_type *_ptr = ptr; \
78 #define hr_reg_clear(ptr, field) _hr_reg_clear(ptr, field) argument
80 #define _hr_reg_write_bool(ptr, field_type, field_h, field_l, val) \ argument
82 (val) ? _hr_reg_enable(ptr, field_type, field_h, field_l) : \
83 _hr_reg_clear(ptr, field_type, field_h, field_l); \
86 #define hr_reg_write_bool(ptr, field, val) _hr_reg_write_bool(ptr, field, val) argument
[all …]
/drivers/platform/chrome/
Dcros_ec_spi.c103 static void debug_packet(struct device *dev, const char *name, u8 *ptr, in debug_packet() argument
111 pr_cont(" %02x", ptr[i]); in debug_packet()
196 u8 *ptr, *end; in cros_ec_spi_receive_packet() local
215 ptr = ec_dev->din; in cros_ec_spi_receive_packet()
216 for (end = ptr + EC_MSG_PREAMBLE_COUNT; ptr != end; ptr++) { in cros_ec_spi_receive_packet()
217 if (*ptr == EC_SPI_FRAME_START) { in cros_ec_spi_receive_packet()
219 ptr - ec_dev->din); in cros_ec_spi_receive_packet()
223 if (ptr != end) in cros_ec_spi_receive_packet()
241 todo = end - ++ptr; in cros_ec_spi_receive_packet()
243 memmove(ec_dev->din, ptr, todo); in cros_ec_spi_receive_packet()
[all …]
/drivers/spi/
Dspi-tle62x0.c103 int ptr; in tle62x0_status_show() local
114 for (ptr = 0; ptr < (st->nr_gpio * 2)/8; ptr += 1) { in tle62x0_status_show()
116 fault |= ((unsigned long)buff[ptr]); in tle62x0_status_show()
118 dev_dbg(dev, "byte %d is %02x\n", ptr, buff[ptr]); in tle62x0_status_show()
121 for (ptr = 0; ptr < st->nr_gpio; ptr++) { in tle62x0_status_show()
122 bp += sprintf(bp, "%s ", decode_fault(fault >> (ptr * 2))); in tle62x0_status_show()
229 int ptr; in to_gpio_num() local
231 for (ptr = 0; ptr < ARRAY_SIZE(gpio_attrs); ptr++) { in to_gpio_num()
232 if (gpio_attrs[ptr] == attr) in to_gpio_num()
233 return ptr; in to_gpio_num()
[all …]
/drivers/soc/samsung/
Ds3c-pm-check.c39 typedef u32 *(run_fn_t)(struct resource *ptr, u32 *arg);
46 static void s3c_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg) in s3c_pm_run_res() argument
48 while (ptr != NULL) { in s3c_pm_run_res()
49 if (ptr->child != NULL) in s3c_pm_run_res()
50 s3c_pm_run_res(ptr->child, fn, arg); in s3c_pm_run_res()
52 if ((ptr->flags & IORESOURCE_SYSTEM_RAM) in s3c_pm_run_res()
55 (unsigned long)ptr->start, in s3c_pm_run_res()
56 (unsigned long)ptr->end); in s3c_pm_run_res()
57 arg = (fn)(ptr, arg); in s3c_pm_run_res()
60 ptr = ptr->sibling; in s3c_pm_run_res()
[all …]
/drivers/crypto/bcm/
Dspu.c22 u8 *ptr = buf; in spum_dump_msg_hdr() local
44 packet_log(" MH 0x%08x\n", be32_to_cpup((__be32 *)ptr)); in spum_dump_msg_hdr()
59 ptr += sizeof(spuh->mh) + sizeof(spuh->emh); /* skip emh. unused */ in spum_dump_msg_hdr()
104 ptr += sizeof(struct SCTX); in spum_dump_msg_hdr()
144 packet_dump(" KEY: ", ptr, hash_key_len); in spum_dump_msg_hdr()
145 ptr += hash_key_len; in spum_dump_msg_hdr()
166 packet_dump(" KEY: ", ptr, hash_key_len); in spum_dump_msg_hdr()
167 ptr += hash_key_len; in spum_dump_msg_hdr()
209 packet_dump(" State: ", ptr, hash_state_len); in spum_dump_msg_hdr()
210 ptr += hash_state_len; in spum_dump_msg_hdr()
[all …]
/drivers/staging/media/atomisp/pci/mmu/
Disp_mmu.c203 unsigned int ptr; in mmu_l2_map() local
213 ptr = start; in mmu_l2_map()
215 idx = ISP_PTR_TO_L2_IDX(ptr); in mmu_l2_map()
221 l2_pt, idx, ptr, pte, phys); in mmu_l2_map()
224 free_mmu_map(mmu, start, ptr); in mmu_l2_map()
233 ptr += (1U << ISP_L2PT_OFFSET); in mmu_l2_map()
235 } while (ptr < end && idx < ISP_L2PT_PTES - 1); in mmu_l2_map()
249 unsigned int ptr, l1_aligned; in mmu_l1_map() local
260 ptr = start; in mmu_l1_map()
262 idx = ISP_PTR_TO_L1_IDX(ptr); in mmu_l1_map()
[all …]
/drivers/net/ethernet/mellanox/mlx5/core/lib/
Dmpfs.h55 type *ptr = NULL; \
57 hlist_for_each_entry(ptr, &(hash)[ix], node.hlist) \
58 if (ether_addr_equal(ptr->node.addr, mac)) {\
63 ptr = NULL; \
64 ptr; \
69 type *ptr = NULL; \
71 ptr = kzalloc(sizeof(type), gfp); \
72 if (ptr) { \
73 ether_addr_copy(ptr->node.addr, mac); \
74 hlist_add_head(&ptr->node.hlist, &(hash)[ix]);\
[all …]

12345678910>>...50