Home
last modified time | relevance | path

Searched refs:count (Results 1 – 200 of 5788) sorted by relevance

12345678910>>...29

/linux-4.4.14/arch/parisc/lib/
Dio.c18 void memcpy_toio(volatile void __iomem *dst, const void *src, int count) in memcpy_toio() argument
25 count--; in memcpy_toio()
27 while (count > 3) { in memcpy_toio()
31 count -= 4; in memcpy_toio()
34 while (count--) { in memcpy_toio()
53 void memcpy_fromio(void *dst, const volatile void __iomem *src, int count) in memcpy_fromio() argument
56 if ( (((unsigned long)dst ^ (unsigned long)src) & 1) || (count < 2) ) in memcpy_fromio()
59 if ( (((unsigned long)dst ^ (unsigned long)src) & 2) || (count < 4) ) in memcpy_fromio()
67 count--; in memcpy_fromio()
68 if (count < 2) goto bytecopy; in memcpy_fromio()
[all …]
Diomap.c97 static void ioport_read8r(void __iomem *addr, void *dst, unsigned long count) in ioport_read8r() argument
99 insb(ADDR2PORT(addr), dst, count); in ioport_read8r()
102 static void ioport_read16r(void __iomem *addr, void *dst, unsigned long count) in ioport_read16r() argument
104 insw(ADDR2PORT(addr), dst, count); in ioport_read16r()
107 static void ioport_read32r(void __iomem *addr, void *dst, unsigned long count) in ioport_read32r() argument
109 insl(ADDR2PORT(addr), dst, count); in ioport_read32r()
198 static void iomem_read8r(void __iomem *addr, void *dst, unsigned long count) in iomem_read8r() argument
200 while (count--) { in iomem_read8r()
206 static void iomem_read16r(void __iomem *addr, void *dst, unsigned long count) in iomem_read16r() argument
208 while (count--) { in iomem_read16r()
[all …]
Dchecksum.c43 int odd, count; in do_csum() local
54 count = len >> 1; /* nr of 16-bit words.. */ in do_csum()
55 if (count) { in do_csum()
58 count--; in do_csum()
62 count >>= 1; /* nr of 32-bit words.. */ in do_csum()
63 if (count) { in do_csum()
64 while (count >= 4) { in do_csum()
74 count -= 4; in do_csum()
77 while (count) { in do_csum()
79 count--; in do_csum()
/linux-4.4.14/arch/alpha/kernel/
Dio.c213 void ioread8_rep(void __iomem *port, void *dst, unsigned long count) in ioread8_rep() argument
216 if (!count) in ioread8_rep()
218 count--; in ioread8_rep()
223 while (count >= 4) { in ioread8_rep()
225 count -= 4; in ioread8_rep()
234 while (count) { in ioread8_rep()
235 --count; in ioread8_rep()
241 void insb(unsigned long port, void *dst, unsigned long count) in insb() argument
243 ioread8_rep(ioport_map(port, 1), dst, count); in insb()
256 void ioread16_rep(void __iomem *port, void *dst, unsigned long count) in ioread16_rep() argument
[all …]
/linux-4.4.14/drivers/media/tuners/
Dtuner-types.c73 .count = ARRAY_SIZE(tuner_temic_pal_ranges),
89 .count = ARRAY_SIZE(tuner_philips_pal_i_ranges),
105 .count = ARRAY_SIZE(tuner_philips_ntsc_ranges),
122 .count = ARRAY_SIZE(tuner_philips_secam_ranges),
139 .count = ARRAY_SIZE(tuner_philips_pal_ranges),
156 .count = ARRAY_SIZE(tuner_temic_ntsc_ranges),
172 .count = ARRAY_SIZE(tuner_temic_pal_i_ranges),
188 .count = ARRAY_SIZE(tuner_temic_4036fy5_ntsc_ranges),
204 .count = ARRAY_SIZE(tuner_alps_tsb_1_ranges),
215 .count = ARRAY_SIZE(tuner_alps_tsb_1_ranges),
[all …]
/linux-4.4.14/drivers/pci/hotplug/
Dibmphp_pci.c361 int count; in configure_device() local
374 for (count = 0; address[count]; count++) { /* for 6 BARs */ in configure_device()
389 pci_bus_write_config_dword (ibmphp_pci_bus, devfn, address[count], 0xFFFFFFFF); in configure_device()
390 pci_bus_read_config_dword (ibmphp_pci_bus, devfn, address[count], &bar[count]); in configure_device()
392 if (!bar[count]) /* This BAR is not implemented */ in configure_device()
395 debug ("Device %x BAR %d wants %x\n", func->device, count, bar[count]); in configure_device()
397 if (bar[count] & PCI_BASE_ADDRESS_SPACE_IO) { in configure_device()
401 len[count] = bar[count] & 0xFFFFFFFC; in configure_device()
402 len[count] = ~len[count] + 1; in configure_device()
404 debug ("len[count] in IO %x, count %d\n", len[count], count); in configure_device()
[all …]
/linux-4.4.14/arch/mips/include/asm/mach-generic/
Dide.h60 unsigned int count) in __ide_insw() argument
63 insw(port, addr, count); in __ide_insw()
64 __ide_flush_dcache_range((unsigned long)addr, count * 2); in __ide_insw()
68 static inline void __ide_insl(unsigned long port, void *addr, unsigned int count) in __ide_insl() argument
71 insl(port, addr, count); in __ide_insl()
72 __ide_flush_dcache_range((unsigned long)addr, count * 4); in __ide_insl()
77 unsigned long count) in __ide_outsw() argument
80 outsw(port, addr, count); in __ide_outsw()
81 __ide_flush_dcache_range((unsigned long)addr, count * 2); in __ide_outsw()
86 unsigned long count) in __ide_outsl() argument
[all …]
/linux-4.4.14/arch/alpha/include/asm/
Drwsem.h28 oldcount = sem->count; in __down_read()
29 sem->count += RWSEM_ACTIVE_READ_BIAS; in __down_read()
41 :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp) in __down_read()
42 :"Ir" (RWSEM_ACTIVE_READ_BIAS), "m" (sem->count) : "memory"); in __down_read()
55 res = sem->count; in __down_read_trylock()
61 res = cmpxchg(&sem->count, old, new); in __down_read_trylock()
70 oldcount = sem->count; in __down_write()
71 sem->count += RWSEM_ACTIVE_WRITE_BIAS; in __down_write()
83 :"=&r" (oldcount), "=m" (sem->count), "=&r" (temp) in __down_write()
84 :"Ir" (RWSEM_ACTIVE_WRITE_BIAS), "m" (sem->count) : "memory"); in __down_write()
[all …]
/linux-4.4.14/drivers/platform/chrome/
Dcros_ec_sysfs.c44 int count = 0; in show_ec_reboot() local
46 count += scnprintf(buf + count, PAGE_SIZE - count, in show_ec_reboot()
48 count += scnprintf(buf + count, PAGE_SIZE - count, in show_ec_reboot()
50 return count; in show_ec_reboot()
55 const char *buf, size_t count) in store_ec_reboot() argument
111 count = -EINVAL; in store_ec_reboot()
121 count = ret; in store_ec_reboot()
126 count = -EINVAL; in store_ec_reboot()
130 return count; in store_ec_reboot()
142 int count = 0; in show_ec_version() local
[all …]
/linux-4.4.14/drivers/staging/rtl8188eu/core/
Drtw_debug.c26 off_t offset, int count, in proc_get_drv_version() argument
31 len += snprintf(page + len, count - len, "%s\n", DRIVERVERSION); in proc_get_drv_version()
38 off_t offset, int count, in proc_get_write_reg() argument
46 unsigned long count, void *data) in proc_set_write_reg() argument
53 if (count < 3) { in proc_set_write_reg()
63 return count; in proc_set_write_reg()
80 return count; in proc_set_write_reg()
87 off_t offset, int count, in proc_get_read_reg() argument
102 …len += snprintf(page + len, count - len, "usb_read8(0x%x)=0x%x\n", proc_get_read_addr, usb_read8(p… in proc_get_read_reg()
105 …len += snprintf(page + len, count - len, "usb_read16(0x%x)=0x%x\n", proc_get_read_addr, usb_read16… in proc_get_read_reg()
[all …]
/linux-4.4.14/drivers/gpu/drm/msm/mdp/mdp5/
Dmdp5_cfg.c28 .count = 1,
43 .count = 5,
48 .count = 3,
57 .count = 3,
65 .count = 2,
72 .count = 5,
77 .count = 3,
81 .count = 3,
99 .count = 1,
114 .count = 5,
[all …]
/linux-4.4.14/arch/arm64/kernel/
Dio.c26 void __memcpy_fromio(void *to, const volatile void __iomem *from, size_t count) in __memcpy_fromio() argument
28 while (count && (!IS_ALIGNED((unsigned long)from, 8) || in __memcpy_fromio()
33 count--; in __memcpy_fromio()
36 while (count >= 8) { in __memcpy_fromio()
40 count -= 8; in __memcpy_fromio()
43 while (count) { in __memcpy_fromio()
47 count--; in __memcpy_fromio()
55 void __memcpy_toio(volatile void __iomem *to, const void *from, size_t count) in __memcpy_toio() argument
57 while (count && (!IS_ALIGNED((unsigned long)to, 8) || in __memcpy_toio()
62 count--; in __memcpy_toio()
[all …]
/linux-4.4.14/drivers/scsi/pcmcia/
Dnsp_io.h70 unsigned long count) in nsp_multi_read_1() argument
72 insb(BaseAddr + Register, buf, count); in nsp_multi_read_1()
77 unsigned long count) in nsp_fifo8_read() argument
80 nsp_multi_read_1(base, FIFODATA, buf, count); in nsp_fifo8_read()
89 unsigned long count) in nsp_multi_read_2() argument
91 insw(BaseAddr + Register, buf, count); in nsp_multi_read_2()
96 unsigned long count) in nsp_fifo16_read() argument
99 nsp_multi_read_2(base, FIFODATA, buf, count); in nsp_fifo16_read()
108 unsigned long count) in nsp_multi_read_4() argument
110 insl(BaseAddr + Register, buf, count); in nsp_multi_read_4()
[all …]
/linux-4.4.14/drivers/media/pci/ttpci/
Dav7110_ipack.c19 p->count = 0; in av7110_ipack_reset()
55 if (p->count < 10) in send_ipack()
58 p->buf[4] = (u8)(((p->count - 6) & 0xff00) >> 8); in send_ipack()
59 p->buf[5] = (u8)((p->count - 6) & 0x00ff); in send_ipack()
67 if (ac3_off < p->count) in send_ipack()
69 p->count - ac3_off, &ai, 0); in send_ipack()
71 nframes = (p->count - off - 3 - ac3_off) / in send_ipack()
76 ac3_off += nframes * ai.framesize - p->count; in send_ipack()
80 p->func(p->buf, p->count, p->data); in send_ipack()
85 p->count = 9; in send_ipack()
[all …]
/linux-4.4.14/drivers/video/fbdev/
Datafb_utils.h48 static inline void *fb_memclear_small(void *s, size_t count) in fb_memclear_small() argument
50 if (!count) in fb_memclear_small()
59 : "=a" (s), "=d" (count) in fb_memclear_small()
60 : "d" (0), "0" ((char *)s + count), "1" (count)); in fb_memclear_small()
68 : "=a" (s), "=d" (count) in fb_memclear_small()
69 : "d" (0), "0" (s), "1" (count) in fb_memclear_small()
77 static inline void *fb_memclear(void *s, size_t count) in fb_memclear() argument
79 if (!count) in fb_memclear()
82 if (count < 16) { in fb_memclear()
89 : "=a" (s), "=d" (count) in fb_memclear()
[all …]
/linux-4.4.14/arch/mn10300/include/asm/
Dio.h125 static inline void insb(unsigned long addr, void *buffer, int count) in insb() argument
127 if (count) { in insb()
132 } while (--count); in insb()
136 static inline void insw(unsigned long addr, void *buffer, int count) in insw() argument
138 if (count) { in insw()
143 } while (--count); in insw()
147 static inline void insl(unsigned long addr, void *buffer, int count) in insl() argument
149 if (count) { in insl()
154 } while (--count); in insl()
158 static inline void outsb(unsigned long addr, const void *buffer, int count) in outsb() argument
[all …]
Dspinlock.h122 atomic_t *count = (atomic_t *)rw; in arch_read_lock() local
123 while (atomic_dec_return(count) < 0) in arch_read_lock()
124 atomic_inc(count); in arch_read_lock()
135 atomic_t *count = (atomic_t *)rw; in arch_write_lock() local
136 while (!atomic_sub_and_test(RW_LOCK_BIAS, count)) in arch_write_lock()
137 atomic_add(RW_LOCK_BIAS, count); in arch_write_lock()
148 atomic_t *count = (atomic_t *)rw; in arch_read_unlock() local
149 atomic_inc(count); in arch_read_unlock()
160 atomic_t *count = (atomic_t *)rw; in arch_write_unlock() local
161 atomic_add(RW_LOCK_BIAS, count); in arch_write_unlock()
[all …]
/linux-4.4.14/drivers/tty/
Dtty_ldsem.c79 return atomic_long_add_return(delta, (atomic_long_t *)&sem->count); in ldsem_atomic_update()
89 long tmp = atomic_long_cmpxchg(&sem->count, *old, new); in ldsem_cmpxchg()
112 sem->count = LDSEM_UNLOCKED; in __init_ldsem()
123 long adjust, count; in __ldsem_wake_readers() local
130 count = ldsem_atomic_update(adjust, sem); in __ldsem_wake_readers()
132 if (count > 0) in __ldsem_wake_readers()
134 if (ldsem_cmpxchg(&count, count - adjust, sem)) in __ldsem_wake_readers()
154 long count = ldsem_atomic_update(LDSEM_ACTIVE_BIAS, sem); in writer_trylock() local
156 if ((count & LDSEM_ACTIVE_MASK) == LDSEM_ACTIVE_BIAS) in writer_trylock()
158 if (ldsem_cmpxchg(&count, count - LDSEM_ACTIVE_BIAS, sem)) in writer_trylock()
[all …]
Dn_hdlc.c118 int count; member
127 int count; member
191 char *fp, int count);
416 __FILE__,__LINE__,tbuf,tbuf->count); in n_hdlc_send_frames()
420 actual = tty->ops->write(tty, tbuf->buf, tbuf->count); in n_hdlc_send_frames()
430 actual = tbuf->count; in n_hdlc_send_frames()
432 if (actual == tbuf->count) { in n_hdlc_send_frames()
512 char *flags, int count) in n_hdlc_tty_receive() argument
519 __FILE__,__LINE__, count); in n_hdlc_tty_receive()
532 if ( count>maxframe ) { in n_hdlc_tty_receive()
[all …]
Dehv_bytechan.c157 int ret, count; in byte_channel_spin_send() local
160 count = 1; in byte_channel_spin_send()
162 &count, &data); in byte_channel_spin_send()
220 unsigned int count) in ehv_bc_console_byte_channel_send() argument
225 while (count) { in ehv_bc_console_byte_channel_send()
226 len = min_t(unsigned int, count, EV_BYTE_CHANNEL_MAX_BYTES); in ehv_bc_console_byte_channel_send()
230 count -= len; in ehv_bc_console_byte_channel_send()
248 unsigned int count) in ehv_bc_console_write() argument
254 for (i = 0; i < count; i++) { in ehv_bc_console_write()
340 int count; in ehv_bc_tty_rx_isr() local
[all …]
/linux-4.4.14/drivers/staging/rtl8188eu/include/
Drtw_debug.h121 off_t offset, int count,
125 off_t offset, int count,
129 unsigned long count, void *data);
131 off_t offset, int count,
135 unsigned long count, void *data);
138 off_t offset, int count,
141 off_t offset, int count,
144 off_t offset, int count,
148 off_t offset, int count,
151 off_t offset, int count,
[all …]
/linux-4.4.14/arch/sparc/lib/
DPeeCeeI.c12 void outsb(unsigned long __addr, const void *src, unsigned long count) in outsb() argument
17 while (count--) in outsb()
22 void outsw(unsigned long __addr, const void *src, unsigned long count) in outsw() argument
26 while (count--) { in outsw()
33 void outsl(unsigned long __addr, const void *src, unsigned long count) in outsl() argument
38 if (!count) in outsl()
44 while (count--) { in outsl()
51 while (count--) { in outsl()
63 while (count--) { in outsl()
75 while (count--) { in outsl()
[all …]
/linux-4.4.14/lib/
Dlockref.c43 new.count++; in lockref_get()
49 lockref->count++; in lockref_get()
64 new.count++; in lockref_get_not_zero()
65 if (old.count <= 0) in lockref_get_not_zero()
73 if (lockref->count > 0) { in lockref_get_not_zero()
74 lockref->count++; in lockref_get_not_zero()
91 new.count++; in lockref_get_or_lock()
92 if (old.count <= 0) in lockref_get_or_lock()
99 if (lockref->count <= 0) in lockref_get_or_lock()
101 lockref->count++; in lockref_get_or_lock()
[all …]
Diomap.c40 static int count = 10; in bad_io_access() local
41 if (count) { in bad_io_access()
42 count--; in bad_io_access()
145 static inline void mmio_insb(void __iomem *addr, u8 *dst, int count) in mmio_insb() argument
147 while (--count >= 0) { in mmio_insb()
153 static inline void mmio_insw(void __iomem *addr, u16 *dst, int count) in mmio_insw() argument
155 while (--count >= 0) { in mmio_insw()
161 static inline void mmio_insl(void __iomem *addr, u32 *dst, int count) in mmio_insl() argument
163 while (--count >= 0) { in mmio_insl()
172 static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count) in mmio_outsb() argument
[all …]
Dstring.c112 char *strncpy(char *dest, const char *src, size_t count) in strncpy() argument
116 while (count) { in strncpy()
120 count--; in strncpy()
177 ssize_t strscpy(char *dest, const char *src, size_t count) in strscpy() argument
180 size_t max = count; in strscpy()
183 if (count == 0) in strscpy()
214 count -= sizeof(unsigned long); in strscpy()
218 while (count) { in strscpy()
226 count--; in strscpy()
268 char *strncat(char *dest, const char *src, size_t count) in strncat() argument
[all …]
Dpercpu_counter.c70 fbc->count = amount; in percpu_counter_set()
77 s64 count; in __percpu_counter_add() local
80 count = __this_cpu_read(*fbc->counters) + amount; in __percpu_counter_add()
81 if (count >= batch || count <= -batch) { in __percpu_counter_add()
84 fbc->count += count; in __percpu_counter_add()
85 __this_cpu_sub(*fbc->counters, count - amount); in __percpu_counter_add()
105 ret = fbc->count; in __percpu_counter_sum()
122 fbc->count = amount; in __percpu_counter_init()
187 fbc->count += *pcount; in percpu_counter_hotcpu_callback()
202 s64 count; in __percpu_counter_compare() local
[all …]
/linux-4.4.14/arch/nios2/lib/
Dmemmove.c13 void *memmove(void *d, const void *s, size_t count) in memmove() argument
17 if (!count) in memmove()
24 if ((count < 8) || ((dst ^ src) & 3)) in memmove()
29 count--; in memmove()
35 count -= 2; in memmove()
37 while (count > 3) { in memmove()
41 count -= 4; in memmove()
44 while (count--) in memmove()
47 dst = (unsigned long) d + count; in memmove()
48 src = (unsigned long) s + count; in memmove()
[all …]
/linux-4.4.14/drivers/net/wireless/b43legacy/
Dsysfs.c38 static int get_integer(const char *buf, size_t count) in get_integer() argument
43 if (count == 0) in get_integer()
45 count = min_t(size_t, count, 10); in get_integer()
46 memcpy(tmp, buf, count); in get_integer()
52 static int get_boolean(const char *buf, size_t count) in get_boolean() argument
54 if (count != 0) { in get_boolean()
59 if (count >= 4 && memcmp(buf, "true", 4) == 0) in get_boolean()
61 if (count >= 5 && memcmp(buf, "false", 5) == 0) in get_boolean()
63 if (count >= 3 && memcmp(buf, "yes", 3) == 0) in get_boolean()
65 if (count >= 2 && memcmp(buf, "no", 2) == 0) in get_boolean()
[all …]
/linux-4.4.14/arch/sh/kernel/
Diomap.c80 static inline void mmio_insb(void __iomem *addr, u8 *dst, int count) in mmio_insb() argument
82 while (--count >= 0) { in mmio_insb()
89 static inline void mmio_insw(void __iomem *addr, u16 *dst, int count) in mmio_insw() argument
91 while (--count >= 0) { in mmio_insw()
98 static inline void mmio_insl(void __iomem *addr, u32 *dst, int count) in mmio_insl() argument
100 while (--count >= 0) { in mmio_insl()
107 static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count) in mmio_outsb() argument
109 while (--count >= 0) { in mmio_outsb()
115 static inline void mmio_outsw(void __iomem *addr, const u16 *src, int count) in mmio_outsw() argument
117 while (--count >= 0) { in mmio_outsw()
[all …]
Dio.c19 void memcpy_fromio(void *to, const volatile void __iomem *from, unsigned long count) in memcpy_fromio() argument
26 if ((count >= 0x20) && in memcpy_fromio()
53 : "=&r" (to), "=&r" (count), in memcpy_fromio()
56 : "7"(from), "0" (to), "1" (count) in memcpy_fromio()
62 for (; count > 3; count -= 4) { in memcpy_fromio()
69 for (; count > 0; count--) { in memcpy_fromio()
82 void memcpy_toio(volatile void __iomem *to, const void *from, unsigned long count) in memcpy_toio() argument
85 for ( ; count > 3; count -= 4) { in memcpy_toio()
92 for (; count > 0; count--) { in memcpy_toio()
106 void memset_io(volatile void __iomem *dst, int c, unsigned long count) in memset_io() argument
[all …]
Ddwarf.c152 int shift, count; in dwarf_read_uleb128() local
156 count = 0; in dwarf_read_uleb128()
161 count++; in dwarf_read_uleb128()
172 return count; in dwarf_read_uleb128()
188 int count; in dwarf_read_leb128() local
192 count = 0; in dwarf_read_leb128()
199 count++; in dwarf_read_leb128()
213 return count; in dwarf_read_leb128()
230 int count = 0; in dwarf_read_encoded_value() local
249 count += 4; in dwarf_read_encoded_value()
[all …]
/linux-4.4.14/arch/arm64/lib/
Dmemset.S42 count .req x2 label
66 cmp count, #15
69 tbz count, #3, 1f
72 tbz count, #2, 2f
75 tbz count, #1, 3f
78 tbz count, #0, 4f
95 sub count, count, tmp2
102 cmp count, #64
105 ands tmp1, count, #0x30
120 ands count, count, #15
[all …]
Dmemmove.S42 count .req x2 label
65 add tmp1, src, count
69 add dst, dstin, count
70 add src, src, count
71 cmp count, #16
76 sub count, count, tmp2
99 cmp count, #64
111 ands tmp1, count, #0x30
126 tbz count, #3, 1f
130 tbz count, #2, 2f
[all …]
Dcopy_template.S38 count .req x2 label
55 cmp count, #16
62 sub count, count, tmp2
86 cmp count, #64
97 ands tmp1, count, #0x30
122 tbz count, #3, 1f
126 tbz count, #2, 2f
130 tbz count, #1, 3f
134 tbz count, #0, .Lexitfunc
141 subs count, count, #128
[all …]
/linux-4.4.14/arch/mips/lib/
Diomap.c104 static inline void mmio_insb(void __iomem *addr, u8 *dst, int count) in mmio_insb() argument
106 while (--count >= 0) { in mmio_insb()
113 static inline void mmio_insw(void __iomem *addr, u16 *dst, int count) in mmio_insw() argument
115 while (--count >= 0) { in mmio_insw()
122 static inline void mmio_insl(void __iomem *addr, u32 *dst, int count) in mmio_insl() argument
124 while (--count >= 0) { in mmio_insl()
131 static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count) in mmio_outsb() argument
133 while (--count >= 0) { in mmio_outsb()
139 static inline void mmio_outsw(void __iomem *addr, const u16 *src, int count) in mmio_outsw() argument
141 while (--count >= 0) { in mmio_outsw()
[all …]
/linux-4.4.14/fs/sysv/
Dballoc.c47 unsigned count; in sysv_free_block() local
64 count = fs16_to_cpu(sbi, *sbi->s_bcache_count); in sysv_free_block()
66 if (count > sbi->s_flc_size) { in sysv_free_block()
75 if (count == sbi->s_flc_size || count == 0) { in sysv_free_block()
84 *(__fs16*)bh->b_data = cpu_to_fs16(sbi, count); in sysv_free_block()
85 memcpy(get_chunk(sb,bh), blocks, count * sizeof(sysv_zone_t)); in sysv_free_block()
89 count = 0; in sysv_free_block()
91 sbi->s_bcache[count++] = nr; in sysv_free_block()
93 *sbi->s_bcache_count = cpu_to_fs16(sbi, count); in sysv_free_block()
105 unsigned count; in sysv_new_block() local
[all …]
Dialloc.c107 unsigned count; in sysv_free_inode() local
122 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_free_inode()
123 if (count < sbi->s_fic_size) { in sysv_free_inode()
124 *sv_sb_fic_inode(sb,count++) = cpu_to_fs16(sbi, ino); in sysv_free_inode()
125 *sbi->s_sb_fic_count = cpu_to_fs16(sbi, count); in sysv_free_inode()
141 unsigned count; in sysv_new_inode() local
151 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_new_inode()
152 if (count == 0 || (*sv_sb_fic_inode(sb,count-1) == 0)) { in sysv_new_inode()
153 count = refill_free_cache(sb); in sysv_new_inode()
154 if (count == 0) { in sysv_new_inode()
[all …]
/linux-4.4.14/arch/metag/kernel/
Dptrace.c28 unsigned int pos, unsigned int count, in metag_gp_regs_copyout() argument
36 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in metag_gp_regs_copyout()
41 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in metag_gp_regs_copyout()
50 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in metag_gp_regs_copyout()
55 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in metag_gp_regs_copyout()
60 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in metag_gp_regs_copyout()
68 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in metag_gp_regs_copyout()
73 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in metag_gp_regs_copyout()
78 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in metag_gp_regs_copyout()
85 unsigned int pos, unsigned int count, in metag_gp_regs_copyin() argument
[all …]
/linux-4.4.14/include/asm-generic/
Dmutex-xchg.h26 __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_lock() argument
28 if (unlikely(atomic_xchg(count, 0) != 1)) in __mutex_fastpath_lock()
34 if (likely(atomic_xchg_acquire(count, -1) != 1)) in __mutex_fastpath_lock()
35 fail_fn(count); in __mutex_fastpath_lock()
47 __mutex_fastpath_lock_retval(atomic_t *count) in __mutex_fastpath_lock_retval() argument
49 if (unlikely(atomic_xchg_acquire(count, 0) != 1)) in __mutex_fastpath_lock_retval()
50 if (likely(atomic_xchg(count, -1) != 1)) in __mutex_fastpath_lock_retval()
68 __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_unlock() argument
70 if (unlikely(atomic_xchg_release(count, 1) != 0)) in __mutex_fastpath_unlock()
71 fail_fn(count); in __mutex_fastpath_unlock()
[all …]
Dio.h221 unsigned int count) in readsb() argument
223 if (count) { in readsb()
229 } while (--count); in readsb()
237 unsigned int count) in readsw() argument
239 if (count) { in readsw()
245 } while (--count); in readsw()
253 unsigned int count) in readsl() argument
255 if (count) { in readsl()
261 } while (--count); in readsl()
270 unsigned int count) in readsq() argument
[all …]
Dmutex-dec.h21 __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_lock() argument
23 if (unlikely(atomic_dec_return_acquire(count) < 0)) in __mutex_fastpath_lock()
24 fail_fn(count); in __mutex_fastpath_lock()
36 __mutex_fastpath_lock_retval(atomic_t *count) in __mutex_fastpath_lock_retval() argument
38 if (unlikely(atomic_dec_return_acquire(count) < 0)) in __mutex_fastpath_lock_retval()
57 __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_unlock() argument
59 if (unlikely(atomic_inc_return_release(count) <= 0)) in __mutex_fastpath_unlock()
60 fail_fn(count); in __mutex_fastpath_unlock()
81 __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) in __mutex_fastpath_trylock() argument
83 if (likely(atomic_cmpxchg_acquire(count, 1, 0) == 1)) in __mutex_fastpath_trylock()
Dmutex-null.h13 #define __mutex_fastpath_lock(count, fail_fn) fail_fn(count) argument
14 #define __mutex_fastpath_lock_retval(count) (-1) argument
15 #define __mutex_fastpath_unlock(count, fail_fn) fail_fn(count) argument
16 #define __mutex_fastpath_trylock(count, fail_fn) fail_fn(count) argument
Dide_iops.h8 static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count) in __ide_mm_insw() argument
10 while (count--) { in __ide_mm_insw()
16 static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count) in __ide_mm_insl() argument
18 while (count--) { in __ide_mm_insl()
24 static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count) in __ide_mm_outsw() argument
26 while (count--) { in __ide_mm_outsw()
32 static __inline__ void __ide_mm_outsl(void __iomem * port, void *addr, u32 count) in __ide_mm_outsl() argument
34 while (count--) { in __ide_mm_outsl()
Drwsem.h36 if (unlikely(atomic_long_inc_return_acquire((atomic_long_t *)&sem->count) <= 0)) in __down_read()
44 while ((tmp = sem->count) >= 0) { in __down_read_trylock()
45 if (tmp == cmpxchg_acquire(&sem->count, tmp, in __down_read_trylock()
61 (atomic_long_t *)&sem->count); in __down_write_nested()
75 tmp = cmpxchg_acquire(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
87 tmp = atomic_long_dec_return_release((atomic_long_t *)&sem->count); in __up_read()
98 (atomic_long_t *)&sem->count) < 0)) in __up_write()
107 atomic_long_add(delta, (atomic_long_t *)&sem->count); in rwsem_atomic_add()
125 (atomic_long_t *)&sem->count); in __downgrade_write()
135 return atomic_long_add_return(delta, (atomic_long_t *)&sem->count); in rwsem_atomic_update()
/linux-4.4.14/arch/s390/include/asm/
Drwsem.h62 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_read()
63 : "Q" (sem->count), "i" (RWSEM_ACTIVE_READ_BIAS) in __down_read()
84 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_read_trylock()
85 : "Q" (sem->count), "i" (RWSEM_ACTIVE_READ_BIAS) in __down_read_trylock()
104 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_write_nested()
105 : "Q" (sem->count), "m" (tmp) in __down_write_nested()
130 : "=&d" (old), "=Q" (sem->count) in __down_write_trylock()
131 : "Q" (sem->count), "d" (RWSEM_ACTIVE_WRITE_BIAS) in __down_write_trylock()
149 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __up_read()
150 : "Q" (sem->count), "i" (-RWSEM_ACTIVE_READ_BIAS) in __up_read()
[all …]
Didals.h77 nridaws = idal_nr_words(vaddr, ccw->count); in set_normalized_cda()
83 idal_create_words(idal, vaddr, ccw->count); in set_normalized_cda()
189 ccw->count = ib->size; in idal_buffer_set_cda()
196 idal_buffer_to_user(struct idal_buffer *ib, void __user *to, size_t count) in idal_buffer_to_user() argument
201 BUG_ON(count > ib->size); in idal_buffer_to_user()
202 for (i = 0; count > IDA_BLOCK_SIZE; i++) { in idal_buffer_to_user()
205 return left + count - IDA_BLOCK_SIZE; in idal_buffer_to_user()
207 count -= IDA_BLOCK_SIZE; in idal_buffer_to_user()
209 return copy_to_user(to, ib->data[i], count); in idal_buffer_to_user()
216 idal_buffer_from_user(struct idal_buffer *ib, const void __user *from, size_t count) in idal_buffer_from_user() argument
[all …]
/linux-4.4.14/drivers/media/usb/pvrusb2/
Dpvrusb2-debugifc.c33 unsigned int count) in debugifc_count_whitespace() argument
38 for (scnt = 0; scnt < count; scnt++) { in debugifc_count_whitespace()
50 unsigned int count) in debugifc_count_nonwhitespace() argument
55 for (scnt = 0; scnt < count; scnt++) { in debugifc_count_nonwhitespace()
65 static unsigned int debugifc_isolate_word(const char *buf,unsigned int count, in debugifc_isolate_word() argument
76 scnt = debugifc_count_whitespace(buf,count); in debugifc_isolate_word()
77 consume_cnt += scnt; count -= scnt; buf += scnt; in debugifc_isolate_word()
78 if (!count) goto done; in debugifc_isolate_word()
80 scnt = debugifc_count_nonwhitespace(buf,count); in debugifc_isolate_word()
84 consume_cnt += scnt; count -= scnt; buf += scnt; in debugifc_isolate_word()
[all …]
/linux-4.4.14/arch/alpha/oprofile/
Dop_model_ev4.c24 unsigned long ctl = 0, count, hilo; in ev4_reg_setup() local
48 count = ctr[0].count; in ev4_reg_setup()
49 if (count <= 4096) in ev4_reg_setup()
50 count = 4096, hilo = 1; in ev4_reg_setup()
52 count = 65536, hilo = 0; in ev4_reg_setup()
53 ctr[0].count = count; in ev4_reg_setup()
56 count = ctr[1].count; in ev4_reg_setup()
57 if (count <= 256) in ev4_reg_setup()
58 count = 256, hilo = 1; in ev4_reg_setup()
60 count = 4096, hilo = 0; in ev4_reg_setup()
[all …]
/linux-4.4.14/arch/x86/include/asm/
Dstring_32.h12 extern char *strncpy(char *dest, const char *src, size_t count);
18 extern char *strncat(char *dest, const char *src, size_t count);
24 extern int strncmp(const char *cs, const char *ct, size_t count);
205 extern void *memchr(const void *cs, int c, size_t count);
207 static inline void *__memset_generic(void *s, char c, size_t count) in __memset_generic() argument
213 : "a" (c), "1" (s), "0" (count) in __memset_generic()
219 #define __constant_count_memset(s, c, count) __memset_generic((s), (c), (count)) argument
227 void *__constant_c_memset(void *s, unsigned long c, size_t count) in __constant_c_memset() argument
239 : "a" (c), "q" (count), "0" (count/4), "1" ((long)s) in __constant_c_memset()
246 extern size_t strnlen(const char *s, size_t count);
[all …]
Dmutex_32.h24 #define __mutex_fastpath_lock(count, fail_fn) \ argument
28 typecheck(atomic_t *, count); \
36 : "a" (count) \
49 static inline int __mutex_fastpath_lock_retval(atomic_t *count) in __mutex_fastpath_lock_retval() argument
51 if (unlikely(atomic_dec_return(count) < 0)) in __mutex_fastpath_lock_retval()
70 #define __mutex_fastpath_unlock(count, fail_fn) \ argument
74 typecheck(atomic_t *, count); \
82 : "a" (count) \
100 static inline int __mutex_fastpath_trylock(atomic_t *count, in __mutex_fastpath_trylock() argument
104 if (likely(atomic_cmpxchg(count, 1, 0) == 1)) in __mutex_fastpath_trylock()
Drwsem.h72 : "+m" (sem->count) in __down_read()
93 : "+m" (sem->count), "=&a" (result), "=&r" (tmp) in __down_read_trylock()
114 : "+m" (sem->count), "=d" (tmp) in __down_write_nested()
144 : "+m" (sem->count), "=&a" (result), "=&r" (tmp) in __down_write_trylock()
163 : "+m" (sem->count), "=d" (tmp) in __up_read()
181 : "+m" (sem->count), "=d" (tmp) in __up_write()
201 : "+m" (sem->count) in __downgrade_write()
212 : "+m" (sem->count) in rwsem_atomic_add()
221 return delta + xadd(&sem->count, delta); in rwsem_atomic_update()
/linux-4.4.14/arch/hexagon/mm/
Duaccess.c35 __kernel_size_t __clear_user_hexagon(void __user *dest, unsigned long count) in __clear_user_hexagon() argument
39 while (count > PAGE_SIZE) { in __clear_user_hexagon()
43 return count - (PAGE_SIZE - uncleared); in __clear_user_hexagon()
44 count -= PAGE_SIZE; in __clear_user_hexagon()
47 if (count) in __clear_user_hexagon()
48 count = __copy_to_user_hexagon(dest, &empty_zero_page, count); in __clear_user_hexagon()
50 return count; in __clear_user_hexagon()
53 unsigned long clear_user_hexagon(void __user *dest, unsigned long count) in clear_user_hexagon() argument
55 if (!access_ok(VERIFY_WRITE, dest, count)) in clear_user_hexagon()
56 return count; in clear_user_hexagon()
[all …]
/linux-4.4.14/arch/sparc/kernel/
Dptrace_32.c50 unsigned int pos, unsigned int count, in genregs32_get() argument
63 count /= sizeof(reg); in genregs32_get()
66 for (; count > 0 && pos < 16; count--) in genregs32_get()
71 for (; count > 0 && pos < 32; count--) { in genregs32_get()
76 for (; count > 0 && pos < 16; count--) { in genregs32_get()
83 for (; count > 0 && pos < 32; count--) { in genregs32_get()
89 while (count > 0) { in genregs32_get()
116 count--; in genregs32_get()
120 count *= sizeof(reg); in genregs32_get()
122 return user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in genregs32_get()
[all …]
Dptrace_64.c209 unsigned int pos, unsigned int count, in genregs64_get() argument
218 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs64_get()
221 if (!ret && count && pos < (32 * sizeof(u64))) { in genregs64_get()
226 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs64_get()
234 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs64_get()
243 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs64_get()
250 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in genregs64_get()
259 unsigned int pos, unsigned int count, in genregs64_set() argument
268 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs64_set()
271 if (!ret && count && pos < (32 * sizeof(u64))) { in genregs64_set()
[all …]
/linux-4.4.14/drivers/gpu/drm/savage/
Dsavage_state.c117 if(start <= reg && start+count > reg) \
120 if(start <= reg && start+count > reg) { \
129 unsigned int start, unsigned int count, in savage_verify_state_s3d() argument
133 start + count - 1 > SAVAGE_DESTTEXRWWATERMARK_S3D) { in savage_verify_state_s3d()
135 start, start + count - 1); in savage_verify_state_s3d()
146 start + count > SAVAGE_TEXPALADDR_S3D) { in savage_verify_state_s3d()
159 unsigned int start, unsigned int count, in savage_verify_state_s4() argument
165 start + count - 1 > SAVAGE_TEXBLENDCOLOR_S4) { in savage_verify_state_s4()
167 start, start + count - 1); in savage_verify_state_s4()
178 start + count > SAVAGE_TEXPALADDR_S4) { in savage_verify_state_s4()
[all …]
/linux-4.4.14/drivers/acpi/acpica/
Dnsprepkg.c56 union acpi_operand_object **elements, u32 count);
89 u32 count; in acpi_ns_check_package() local
101 return_object->package.count)); in acpi_ns_check_package()
113 count = return_object->package.count; in acpi_ns_check_package()
119 if (!count) { in acpi_ns_check_package()
147 if (count < expected_count) { in acpi_ns_check_package()
149 } else if (count > expected_count) { in acpi_ns_check_package()
153 info->full_pathname, count, in acpi_ns_check_package()
175 for (i = 0; i < count; i++) { in acpi_ns_check_package()
194 expected_count = package->ret_info3.count; in acpi_ns_check_package()
[all …]
Dutbuffer.c68 void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset) in acpi_ut_dump_buffer() argument
80 if ((count < 4) || (count & 0x01)) { in acpi_ut_dump_buffer()
86 while (i < count) { in acpi_ut_dump_buffer()
95 if (i + j >= count) { in acpi_ut_dump_buffer()
148 if (i + j >= count) { in acpi_ut_dump_buffer()
198 acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id) in acpi_ut_debug_dump_buffer() argument
208 acpi_ut_dump_buffer(buffer, count, display, 0); in acpi_ut_debug_dump_buffer()
234 u8 *buffer, u32 count, u32 display, u32 base_offset) in acpi_ut_dump_buffer_to_file() argument
247 if ((count < 4) || (count & 0x01)) { in acpi_ut_dump_buffer_to_file()
253 while (i < count) { in acpi_ut_dump_buffer_to_file()
[all …]
/linux-4.4.14/kernel/locking/
Drwsem-xadd.c83 sem->count = RWSEM_UNLOCKED_VALUE; in __init_rwsem()
216 long count, adjustment = -RWSEM_ACTIVE_READ_BIAS; in rwsem_down_read_failed() local
231 count = rwsem_atomic_update(adjustment, sem); in rwsem_down_read_failed()
238 if (count == RWSEM_WAITING_BIAS || in rwsem_down_read_failed()
239 (count > RWSEM_WAITING_BIAS && in rwsem_down_read_failed()
258 static inline bool rwsem_try_write_lock(long count, struct rw_semaphore *sem) in rwsem_try_write_lock() argument
264 if (count == RWSEM_WAITING_BIAS && in rwsem_try_write_lock()
265 cmpxchg_acquire(&sem->count, RWSEM_WAITING_BIAS, in rwsem_try_write_lock()
282 long old, count = READ_ONCE(sem->count); in rwsem_try_write_lock_unqueued() local
285 if (!(count == 0 || count == RWSEM_WAITING_BIAS)) in rwsem_try_write_lock_unqueued()
[all …]
Dsemaphore.c58 if (likely(sem->count > 0)) in down()
59 sem->count--; in down()
81 if (likely(sem->count > 0)) in down_interruptible()
82 sem->count--; in down_interruptible()
107 if (likely(sem->count > 0)) in down_killable()
108 sem->count--; in down_killable()
133 int count; in down_trylock() local
136 count = sem->count - 1; in down_trylock()
137 if (likely(count >= 0)) in down_trylock()
138 sem->count = count; in down_trylock()
[all …]
/linux-4.4.14/drivers/video/fbdev/core/
Dfb_sys_fops.c16 ssize_t fb_sys_read(struct fb_info *info, char __user *buf, size_t count, in fb_sys_read() argument
35 if (count >= total_size) in fb_sys_read()
36 count = total_size; in fb_sys_read()
38 if (count + p > total_size) in fb_sys_read()
39 count = total_size - p; in fb_sys_read()
46 if (copy_to_user(buf, src, count)) in fb_sys_read()
50 *ppos += count; in fb_sys_read()
52 return (err) ? err : count; in fb_sys_read()
57 size_t count, loff_t *ppos) in fb_sys_write() argument
75 if (count > total_size) { in fb_sys_write()
[all …]
/linux-4.4.14/drivers/isdn/hisax/
Dhscx_irq.c53 hscx_empty_fifo(struct BCState *bcs, int count) in hscx_empty_fifo() argument
61 if (bcs->hw.hscx.rcvidx + count > HSCX_BUFMAX) { in hscx_empty_fifo()
69 bcs->hw.hscx.rcvidx += count; in hscx_empty_fifo()
70 READHSCXFIFO(cs, bcs->hw.hscx.hscx, ptr, count); in hscx_empty_fifo()
76 bcs->hw.hscx.hscx ? 'B' : 'A', count); in hscx_empty_fifo()
77 QuickHex(t, ptr, count); in hscx_empty_fifo()
86 int more, count; in hscx_fill_fifo() local
101 count = fifo_size; in hscx_fill_fifo()
103 count = bcs->tx_skb->len; in hscx_fill_fifo()
107 skb_pull(bcs->tx_skb, count); in hscx_fill_fifo()
[all …]
Djade_irq.c43 jade_empty_fifo(struct BCState *bcs, int count) in jade_empty_fifo() argument
51 if (bcs->hw.hscx.rcvidx + count > HSCX_BUFMAX) { in jade_empty_fifo()
59 bcs->hw.hscx.rcvidx += count; in jade_empty_fifo()
60 READJADEFIFO(cs, bcs->hw.hscx.hscx, ptr, count); in jade_empty_fifo()
66 bcs->hw.hscx.hscx ? 'B' : 'A', count); in jade_empty_fifo()
67 QuickHex(t, ptr, count); in jade_empty_fifo()
76 int more, count; in jade_fill_fifo() local
91 count = fifo_size; in jade_fill_fifo()
93 count = bcs->tx_skb->len; in jade_fill_fifo()
97 skb_pull(bcs->tx_skb, count); in jade_fill_fifo()
[all …]
Dipacx.c39 static void dch_empty_fifo(struct IsdnCardState *cs, int count);
45 static void bch_empty_fifo(struct BCState *bcs, int count);
236 dch_empty_fifo(struct IsdnCardState *cs, int count) in dch_empty_fifo() argument
244 if ((cs->rcvidx + count) >= MAX_DFRAME_LEN_L1) { in dch_empty_fifo()
253 cs->rcvidx += count; in dch_empty_fifo()
255 cs->readisacfifo(cs, ptr, count); in dch_empty_fifo()
261 t += sprintf(t, "dch_empty_fifo() cnt %d", count); in dch_empty_fifo()
262 QuickHex(t, ptr, count); in dch_empty_fifo()
273 int count; in dch_fill_fifo() local
280 count = cs->tx_skb->len; in dch_fill_fifo()
[all …]
/linux-4.4.14/drivers/misc/mic/cosm/
Dcosm_sysfs.c104 const char *buf, size_t count) in state_store() argument
128 count = rc; in state_store()
129 return count; in state_store()
161 const char *buf, size_t count) in heartbeat_enable_store() argument
179 ret = count; in heartbeat_enable_store()
204 const char *buf, size_t count) in cmdline_store() argument
214 cdev->cmdline = kmalloc(count + 1, GFP_KERNEL); in cmdline_store()
216 count = -ENOMEM; in cmdline_store()
220 strncpy(cdev->cmdline, buf, count); in cmdline_store()
222 if (cdev->cmdline[count - 1] == '\n') in cmdline_store()
[all …]
/linux-4.4.14/drivers/staging/dgnc/
Ddgnc_sysfs.c52 const char *buf, size_t count) in dgnc_driver_pollrate_store() argument
66 return count; in dgnc_driver_pollrate_store()
110 int count = 0; in dgnc_vpd_show() local
115 count += sprintf(buf + count, in dgnc_vpd_show()
119 count += sprintf(buf + count, "\n%04X ", i * 2); in dgnc_vpd_show()
120 count += sprintf(buf + count, "%02X ", bd->vpd[i]); in dgnc_vpd_show()
122 count += sprintf(buf + count, "\n"); in dgnc_vpd_show()
124 return count; in dgnc_vpd_show()
132 int count = 0; in dgnc_serial_number_show() local
137 count += sprintf(buf + count, "<UNKNOWN>\n"); in dgnc_serial_number_show()
[all …]
/linux-4.4.14/include/linux/
Dvt_buffer.h27 static inline void scr_memsetw(u16 *s, u16 c, unsigned int count) in scr_memsetw() argument
29 count /= 2; in scr_memsetw()
30 while (count--) in scr_memsetw()
36 static inline void scr_memcpyw(u16 *d, const u16 *s, unsigned int count) in scr_memcpyw() argument
38 count /= 2; in scr_memcpyw()
39 while (count--) in scr_memcpyw()
45 static inline void scr_memmovew(u16 *d, const u16 *s, unsigned int count) in scr_memmovew() argument
48 scr_memcpyw(d, s, count); in scr_memmovew()
50 count /= 2; in scr_memmovew()
51 d += count; in scr_memmovew()
[all …]
Dregset.h60 unsigned int pos, unsigned int count,
81 unsigned int pos, unsigned int count,
220 static inline int user_regset_copyout(unsigned int *pos, unsigned int *count, in user_regset_copyout() argument
225 if (*count == 0) in user_regset_copyout()
229 unsigned int copy = (end_pos < 0 ? *count in user_regset_copyout()
230 : min(*count, end_pos - *pos)); in user_regset_copyout()
240 *count -= copy; in user_regset_copyout()
245 static inline int user_regset_copyin(unsigned int *pos, unsigned int *count, in user_regset_copyin() argument
250 if (*count == 0) in user_regset_copyin()
254 unsigned int copy = (end_pos < 0 ? *count in user_regset_copyin()
[all …]
Duio.h31 size_t count; member
61 .iov_len = min(iter->count, in iov_iter_iovec()
69 (iter).count && \
91 unsigned long nr_segs, size_t count);
93 unsigned long nr_segs, size_t count);
95 unsigned long nr_segs, size_t count);
106 return i->count; in iov_iter_count()
128 static inline void iov_iter_truncate(struct iov_iter *i, u64 count) in iov_iter_truncate() argument
136 if (i->count > count) in iov_iter_truncate()
137 i->count = count; in iov_iter_truncate()
[all …]
/linux-4.4.14/drivers/s390/char/
Dsclp_tty.c76 if (tty->count > 1) in sclp_tty_close()
95 int count; in sclp_tty_write_room() local
98 count = 0; in sclp_tty_write_room()
100 count = sclp_buffer_space(sclp_ttybuf) / sizeof(struct msg_buf); in sclp_tty_write_room()
102 count += NR_EMPTY_MSG_PER_SCCB; in sclp_tty_write_room()
104 return count; in sclp_tty_write_room()
135 int count; in __sclp_ttybuf_emit() local
140 count = sclp_tty_buffer_count++; in __sclp_ttybuf_emit()
142 if (count) in __sclp_ttybuf_emit()
172 static int sclp_tty_write_string(const unsigned char *str, int count, int may_fail) in sclp_tty_write_string() argument
[all …]
Dsclp_vt220.c310 const unsigned char *msg, int count, int convertlf) in sclp_vt220_add_msg() argument
318 if (count > sclp_vt220_space_left(request)) in sclp_vt220_add_msg()
319 count = sclp_vt220_space_left(request); in sclp_vt220_add_msg()
320 if (count <= 0) in sclp_vt220_add_msg()
329 (from < count) && (to < sclp_vt220_space_left(request)); in sclp_vt220_add_msg()
348 memcpy(buffer, (const void *) msg, count); in sclp_vt220_add_msg()
349 sccb->header.length += count; in sclp_vt220_add_msg()
350 sccb->evbuf.length += count; in sclp_vt220_add_msg()
351 return count; in sclp_vt220_add_msg()
404 __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, in __sclp_vt220_write() argument
[all …]
Dcon3215.c84 int count; /* number of bytes in output buffer */ member
161 ccw->count = 160; in raw3215_mk_read_req()
175 int len, count, ix, lines; in raw3215_mk_write_req() local
177 if (raw->count <= raw->written) in raw3215_mk_write_req()
192 req->start = (raw->head - raw->count + raw->written) & in raw3215_mk_write_req()
223 count = len; in raw3215_mk_write_req()
224 if (ix + count > RAW3215_BUFFER_SIZE) in raw3215_mk_write_req()
225 count = RAW3215_BUFFER_SIZE - ix; in raw3215_mk_write_req()
226 ccw->count = count; in raw3215_mk_write_req()
227 len -= count; in raw3215_mk_write_req()
[all …]
/linux-4.4.14/drivers/net/ethernet/8390/
Dmac8390.c137 static void sane_block_input(struct net_device *dev, int count,
139 static void sane_block_output(struct net_device *dev, int count,
144 int from, int count);
146 const void *from, int count);
151 static void dayna_block_input(struct net_device *dev, int count,
153 static void dayna_block_output(struct net_device *dev, int count,
164 static void slow_sane_block_input(struct net_device *dev, int count,
166 static void slow_sane_block_output(struct net_device *dev, int count,
168 static void word_memcpy_tocard(unsigned long tp, const void *fp, int count);
169 static void word_memcpy_fromcard(void *tp, unsigned long fp, int count);
[all …]
/linux-4.4.14/drivers/oprofile/
Doprofile_files.c31 size_t count, loff_t *offset) in timeout_read() argument
34 buf, count, offset); in timeout_read()
39 size_t count, loff_t *offset) in timeout_write() argument
47 retval = oprofilefs_ulong_from_user(&val, buf, count); in timeout_write()
55 return count; in timeout_write()
68 static ssize_t depth_read(struct file *file, char __user *buf, size_t count, loff_t *offset) in depth_read() argument
70 return oprofilefs_ulong_to_user(oprofile_backtrace_depth, buf, count, in depth_read()
75 static ssize_t depth_write(struct file *file, char const __user *buf, size_t count, loff_t *offset) in depth_write() argument
86 retval = oprofilefs_ulong_from_user(&val, buf, count); in depth_write()
94 return count; in depth_write()
[all …]
/linux-4.4.14/arch/frv/kernel/
Duaccess.c20 long strncpy_from_user(char *dst, const char __user *src, long count) in strncpy_from_user() argument
26 BUG_ON(count < 0); in strncpy_from_user()
39 if ((unsigned long) count > max) { in strncpy_from_user()
40 memset(dst + max, 0, count - max); in strncpy_from_user()
41 count = max; in strncpy_from_user()
45 for (; count > 0; count--, p++, src++) { in strncpy_from_user()
57 if (count > 0) in strncpy_from_user()
58 memset(p, 0, count); /* clear remainder of buffer [security] */ in strncpy_from_user()
72 long strnlen_user(const char __user *src, long count) in strnlen_user() argument
78 BUG_ON(count < 0); in strnlen_user()
[all …]
/linux-4.4.14/arch/s390/lib/
Dspinlock.c44 int count; in arch_spin_lock_wait() local
60 count = spin_retry; in arch_spin_lock_wait()
65 } while (owner && count-- > 0); in arch_spin_lock_wait()
82 int count; in arch_spin_lock_wait_flags() local
100 count = spin_retry; in arch_spin_lock_wait_flags()
105 } while (owner && count-- > 0); in arch_spin_lock_wait_flags()
122 int count; in arch_spin_trylock_retry() local
124 for (count = spin_retry; count > 0; count--) { in arch_spin_trylock_retry()
140 int count = spin_retry; in _raw_read_lock_wait() local
147 if (count-- <= 0) { in _raw_read_lock_wait()
[all …]
/linux-4.4.14/drivers/w1/slaves/
Dw1_ds28e04.c67 static inline size_t w1_f1C_fix_count(loff_t off, size_t count, size_t size) in w1_f1C_fix_count() argument
72 if ((off + count) > size) in w1_f1C_fix_count()
75 return count; in w1_f1C_fix_count()
123 loff_t off, size_t count) in eeprom_read() argument
129 count = w1_f1C_fix_count(off, count, W1_EEPROM_SIZE); in eeprom_read()
130 if (count == 0) in eeprom_read()
137 max_page = (off + count - 1) >> W1_PAGE_BITS; in eeprom_read()
140 count = -EIO; in eeprom_read()
144 memcpy(buf, &data->memory[off], count); in eeprom_read()
146 count = w1_f1C_read(sl, off, count, buf); in eeprom_read()
[all …]
Dw1_ds2431.c48 static inline size_t w1_f2d_fix_count(loff_t off, size_t count, size_t size) in w1_f2d_fix_count() argument
53 if ((off + count) > size) in w1_f2d_fix_count()
56 return count; in w1_f2d_fix_count()
66 static int w1_f2d_readblock(struct w1_slave *sl, int off, int count, char *buf) in w1_f2d_readblock() argument
81 w1_read_block(sl->master, buf, count); in w1_f2d_readblock()
87 w1_read_block(sl->master, cmp, count); in w1_f2d_readblock()
89 if (!memcmp(cmp, buf, count)) in w1_f2d_readblock()
101 loff_t off, size_t count) in eeprom_read() argument
104 int todo = count; in eeprom_read()
106 count = w1_f2d_fix_count(off, count, W1_F2D_EEPROM_SIZE); in eeprom_read()
[all …]
Dw1_ds2433.c56 static inline size_t w1_f23_fix_count(loff_t off, size_t count, size_t size) in w1_f23_fix_count() argument
61 if ((off + count) > size) in w1_f23_fix_count()
64 return count; in w1_f23_fix_count()
98 loff_t off, size_t count) in eeprom_read() argument
108 if ((count = w1_f23_fix_count(off, count, W1_EEPROM_SIZE)) == 0) in eeprom_read()
116 max_page = (off + count - 1) >> W1_PAGE_BITS; in eeprom_read()
119 count = -EIO; in eeprom_read()
123 memcpy(buf, &data->memory[off], count); in eeprom_read()
129 count = -EIO; in eeprom_read()
137 w1_read_block(sl->master, buf, count); in eeprom_read()
[all …]
Dw1_ds2408.c77 size_t count) in state_read() argument
81 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in state_read()
82 if (count != 1 || off != 0) in state_read()
89 loff_t off, size_t count) in output_read() argument
93 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in output_read()
94 if (count != 1 || off != 0) in output_read()
102 loff_t off, size_t count) in activity_read() argument
106 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in activity_read()
107 if (count != 1 || off != 0) in activity_read()
115 loff_t off, size_t count) in cond_search_mask_read() argument
[all …]
Dw1_ds2760.c26 static int w1_ds2760_io(struct device *dev, char *buf, int addr, size_t count, in w1_ds2760_io() argument
37 count = 0; in w1_ds2760_io()
40 if (addr + count > DS2760_DATA_SIZE) in w1_ds2760_io()
41 count = DS2760_DATA_SIZE - addr; in w1_ds2760_io()
47 count = w1_read_block(sl->master, buf, count); in w1_ds2760_io()
51 w1_write_block(sl->master, buf, count); in w1_ds2760_io()
59 return count; in w1_ds2760_io()
62 int w1_ds2760_read(struct device *dev, char *buf, int addr, size_t count) in w1_ds2760_read() argument
64 return w1_ds2760_io(dev, buf, addr, count, 0); in w1_ds2760_read()
67 int w1_ds2760_write(struct device *dev, char *buf, int addr, size_t count) in w1_ds2760_write() argument
[all …]
/linux-4.4.14/arch/hexagon/include/asm/
Dio.h208 int count) in memcpy_fromio() argument
210 memcpy(dst, (void *) src, count); in memcpy_fromio()
214 int count) in memcpy_toio() argument
216 memcpy((void *) dst, src, count); in memcpy_toio()
270 static inline void insb(unsigned long port, void *buffer, int count) in insb() argument
272 if (count) { in insb()
277 } while (--count); in insb()
281 static inline void insw(unsigned long port, void *buffer, int count) in insw() argument
283 if (count) { in insw()
288 } while (--count); in insw()
[all …]
/linux-4.4.14/arch/arm/mach-ixp4xx/include/mach/
Dio.h98 const u8 *vaddr, int count) in __indirect_writesb() argument
100 while (count--) in __indirect_writesb()
121 const u16 *vaddr, int count) in __indirect_writesw() argument
123 while (count--) in __indirect_writesw()
140 const u32 *vaddr, int count) in __indirect_writesl() argument
142 while (count--) in __indirect_writesl()
163 u8 *vaddr, u32 count) in __indirect_readsb() argument
165 while (count--) in __indirect_readsb()
186 u16 *vaddr, u32 count) in __indirect_readsw() argument
188 while (count--) in __indirect_readsw()
[all …]
/linux-4.4.14/arch/s390/oprofile/
Dinit.c125 size_t count, loff_t *offset) in hwsampler_read() argument
127 return oprofilefs_ulong_to_user(hwsampler_enabled, buf, count, offset); in hwsampler_read()
131 size_t count, loff_t *offset) in hwsampler_write() argument
139 retval = oprofilefs_ulong_from_user(&val, buf, count); in hwsampler_write()
156 return count; in hwsampler_write()
173 size_t count, loff_t *offset) in hw_interval_read() argument
176 count, offset); in hw_interval_read()
180 size_t count, loff_t *offset) in hw_interval_write() argument
187 retval = oprofilefs_ulong_from_user(&val, buf, count); in hw_interval_write()
197 return count; in hw_interval_write()
[all …]
/linux-4.4.14/arch/ia64/include/asm/
Dmutex.h22 __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_lock() argument
24 if (unlikely(ia64_fetchadd4_acq(count, -1) != 1)) in __mutex_fastpath_lock()
25 fail_fn(count); in __mutex_fastpath_lock()
37 __mutex_fastpath_lock_retval(atomic_t *count) in __mutex_fastpath_lock_retval() argument
39 if (unlikely(ia64_fetchadd4_acq(count, -1) != 1)) in __mutex_fastpath_lock_retval()
58 __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_unlock() argument
60 int ret = ia64_fetchadd4_rel(count, 1); in __mutex_fastpath_unlock()
62 fail_fn(count); in __mutex_fastpath_unlock()
83 __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) in __mutex_fastpath_trylock() argument
85 if (cmpxchg_acq(count, 1, 0) == 1) in __mutex_fastpath_trylock()
Drwsem.h43 long result = ia64_fetchadd8_acq((unsigned long *)&sem->count, 1); in __down_read()
58 old = sem->count; in __down_write()
60 } while (cmpxchg_acq(&sem->count, old, new) != old); in __down_write()
72 long result = ia64_fetchadd8_rel((unsigned long *)&sem->count, -1); in __up_read()
87 old = sem->count; in __up_write()
89 } while (cmpxchg_rel(&sem->count, old, new) != old); in __up_write()
102 while ((tmp = sem->count) >= 0) { in __down_read_trylock()
103 if (tmp == cmpxchg_acq(&sem->count, tmp, tmp+1)) { in __down_read_trylock()
116 long tmp = cmpxchg_acq(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
130 old = sem->count; in __downgrade_write()
[all …]
/linux-4.4.14/include/trace/events/
Dcma.h13 unsigned int count, unsigned int align),
15 TP_ARGS(pfn, page, count, align),
20 __field(unsigned int, count)
27 __entry->count = count;
34 __entry->count,
41 unsigned int count),
43 TP_ARGS(pfn, page, count),
48 __field(unsigned int, count)
54 __entry->count = count;
60 __entry->count)
/linux-4.4.14/arch/tile/include/asm/
Dio.h322 static inline void insb(unsigned long addr, void *buffer, int count) in insb() argument
324 if (count) { in insb()
329 } while (--count); in insb()
333 static inline void insw(unsigned long addr, void *buffer, int count) in insw() argument
335 if (count) { in insw()
340 } while (--count); in insw()
344 static inline void insl(unsigned long addr, void *buffer, int count) in insl() argument
346 if (count) { in insl()
351 } while (--count); in insl()
355 static inline void outsb(unsigned long addr, const void *buffer, int count) in outsb() argument
[all …]
/linux-4.4.14/drivers/misc/eeprom/
Dat24.c165 unsigned offset, size_t count) in at24_eeprom_read() argument
193 if (count > io_limit) in at24_eeprom_read()
194 count = io_limit; in at24_eeprom_read()
198 if (count > I2C_SMBUS_BLOCK_MAX) in at24_eeprom_read()
199 count = I2C_SMBUS_BLOCK_MAX; in at24_eeprom_read()
220 msg[1].len = count; in at24_eeprom_read()
233 count, buf); in at24_eeprom_read()
237 status = count; in at24_eeprom_read()
240 count, offset, status, jiffies); in at24_eeprom_read()
242 if (status == count) in at24_eeprom_read()
[all …]
Dat25.c70 size_t count in at25_ee_read() argument
82 if ((offset + count) > at25->bin.size) in at25_ee_read()
83 count = at25->bin.size - offset; in at25_ee_read()
84 if (unlikely(!count)) in at25_ee_read()
85 return count; in at25_ee_read()
114 t[1].len = count; in at25_ee_read()
128 count, offset, (int) status); in at25_ee_read()
131 return status ? status : count; in at25_ee_read()
137 char *buf, loff_t off, size_t count) in at25_bin_read() argument
145 return at25_ee_read(at25, buf, off, count); in at25_bin_read()
[all …]
/linux-4.4.14/drivers/char/
Dmem.c50 static inline int valid_phys_addr_range(phys_addr_t addr, size_t count) in valid_phys_addr_range() argument
52 return addr + count <= __pa(high_memory); in valid_phys_addr_range()
99 size_t count, loff_t *ppos) in read_mem() argument
108 if (!valid_phys_addr_range(p, count)) in read_mem()
114 sz = size_inside_page(p, count); in read_mem()
120 count -= sz; in read_mem()
126 while (count > 0) { in read_mem()
129 sz = size_inside_page(p, count); in read_mem()
131 if (!range_is_allowed(p >> PAGE_SHIFT, count)) in read_mem()
150 count -= sz; in read_mem()
[all …]
/linux-4.4.14/drivers/input/touchscreen/
Dintel-mid-touch.c174 int count; in mrstouch_ts_bias_set() local
182 for (count = 0; count <= 3; count++) { in mrstouch_ts_bias_set()
183 reg[count] = chan++; in mrstouch_ts_bias_set()
184 data[count] = bias | (start + count); in mrstouch_ts_bias_set()
245 int err, count; in mrstouch_fs_adc_read_prepare() local
258 for (count = 0; count <= 3; count++) { in mrstouch_fs_adc_read_prepare()
259 reg[count] = chan++; in mrstouch_fs_adc_read_prepare()
260 data[count] = 0x2A; in mrstouch_fs_adc_read_prepare()
262 reg[count] = chan++; /* Dummy */ in mrstouch_fs_adc_read_prepare()
263 data[count] = 0; in mrstouch_fs_adc_read_prepare()
[all …]
/linux-4.4.14/drivers/net/ethernet/amd/xgbe/
Dxgbe-debugfs.c124 static ssize_t xgbe_common_read(char __user *buffer, size_t count, in xgbe_common_read() argument
137 if (count < strlen(buf)) { in xgbe_common_read()
142 len = simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf)); in xgbe_common_read()
148 static ssize_t xgbe_common_write(const char __user *buffer, size_t count, in xgbe_common_write() argument
158 if (count >= sizeof(workarea)) in xgbe_common_write()
162 buffer, count); in xgbe_common_write()
175 size_t count, loff_t *ppos) in xgmac_reg_addr_read() argument
179 return xgbe_common_read(buffer, count, ppos, pdata->debugfs_xgmac_reg); in xgmac_reg_addr_read()
184 size_t count, loff_t *ppos) in xgmac_reg_addr_write() argument
188 return xgbe_common_write(buffer, count, ppos, in xgmac_reg_addr_write()
[all …]
/linux-4.4.14/arch/m32r/platforms/m32104ut/
Dio.c90 static inline void _ne_insb(void *portp, void *addr, unsigned long count) in _ne_insb() argument
94 while (count--) in _ne_insb()
189 void _insb(unsigned int port, void *addr, unsigned long count) in _insb() argument
192 _ne_insb(PORT2ADDR_NE(port), addr, count); in _insb()
196 while (count--) in _insb()
201 void _insw(unsigned int port, void *addr, unsigned long count) in _insw() argument
212 while (count--) in _insw()
217 count, 1); in _insw()
222 while (count--) in _insw()
227 while (count--) in _insw()
[all …]
/linux-4.4.14/arch/powerpc/kernel/
Dio.c31 void _insb(const volatile u8 __iomem *port, void *buf, long count) in _insb() argument
36 if (unlikely(count <= 0)) in _insb()
43 } while (--count != 0); in _insb()
48 void _outsb(volatile u8 __iomem *port, const void *buf, long count) in _outsb() argument
52 if (unlikely(count <= 0)) in _outsb()
57 } while (--count != 0); in _outsb()
62 void _insw_ns(const volatile u16 __iomem *port, void *buf, long count) in _insw_ns() argument
67 if (unlikely(count <= 0)) in _insw_ns()
74 } while (--count != 0); in _insw_ns()
79 void _outsw_ns(volatile u16 __iomem *port, const void *buf, long count) in _outsw_ns() argument
[all …]
Diomap.c76 void ioread8_rep(void __iomem *addr, void *dst, unsigned long count) in ioread8_rep() argument
78 readsb(addr, dst, count); in ioread8_rep()
80 void ioread16_rep(void __iomem *addr, void *dst, unsigned long count) in ioread16_rep() argument
82 readsw(addr, dst, count); in ioread16_rep()
84 void ioread32_rep(void __iomem *addr, void *dst, unsigned long count) in ioread32_rep() argument
86 readsl(addr, dst, count); in ioread32_rep()
92 void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite8_rep() argument
94 writesb(addr, src, count); in iowrite8_rep()
96 void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) in iowrite16_rep() argument
98 writesw(addr, src, count); in iowrite16_rep()
[all …]
/linux-4.4.14/drivers/ssb/
Dhost_soc.c41 size_t count, u16 offset, u8 reg_width) in ssb_host_soc_block_read() argument
53 while (count) { in ssb_host_soc_block_read()
56 count--; in ssb_host_soc_block_read()
63 SSB_WARN_ON(count & 1); in ssb_host_soc_block_read()
64 while (count) { in ssb_host_soc_block_read()
67 count -= 2; in ssb_host_soc_block_read()
74 SSB_WARN_ON(count & 3); in ssb_host_soc_block_read()
75 while (count) { in ssb_host_soc_block_read()
78 count -= 4; in ssb_host_soc_block_read()
114 size_t count, u16 offset, u8 reg_width) in ssb_host_soc_block_write() argument
[all …]
/linux-4.4.14/arch/m32r/platforms/oaks32r/
Dio.c51 static inline void _ne_insb(void *portp, void *addr, unsigned long count) in _ne_insb() argument
54 while (count--) in _ne_insb()
150 void _insb(unsigned int port, void *addr, unsigned long count) in _insb() argument
153 _ne_insb(PORT2ADDR_NE(port), addr, count); in _insb()
157 while (count--) in _insb()
162 void _insw(unsigned int port, void *addr, unsigned long count) in _insw() argument
169 while (count--) in _insw()
173 while (count--) in _insw()
178 void _insl(unsigned int port, void *addr, unsigned long count) in _insl() argument
184 while (count--) in _insl()
[all …]
/linux-4.4.14/scripts/genksyms/
Dlex.l141 int token, count = 0;
196 count = 0;
200 count = 0;
204 count = 0;
229 count = 1;
237 count = 1;
257 ++count;
260 if (--count == 0)
277 ++count;
280 if (--count == 0)
[all …]
/linux-4.4.14/drivers/remoteproc/
Dremoteproc_debugfs.c48 size_t count, loff_t *ppos) in rproc_trace_read() argument
53 return simple_read_from_buffer(userbuf, count, ppos, trace->va, len); in rproc_trace_read()
76 size_t count, loff_t *ppos) in rproc_state_read() argument
88 return simple_read_from_buffer(userbuf, count, ppos, buf, i); in rproc_state_read()
99 size_t count, loff_t *ppos) in rproc_name_read() argument
108 return simple_read_from_buffer(userbuf, count, ppos, buf, i); in rproc_name_read()
119 size_t count, loff_t *ppos) in rproc_recovery_read() argument
124 return simple_read_from_buffer(userbuf, count, ppos, buf, strlen(buf)); in rproc_recovery_read()
153 size_t count, loff_t *ppos) in rproc_recovery_write() argument
159 if (count < 1 || count > sizeof(buf)) in rproc_recovery_write()
[all …]
/linux-4.4.14/arch/tile/lib/
Dchecksum.c21 int odd, count; in do_csum() local
32 count = len >> 1; /* nr of 16-bit words.. */ in do_csum()
33 if (count) { in do_csum()
36 count--; in do_csum()
40 count >>= 1; /* nr of 32-bit words.. */ in do_csum()
41 if (count) { in do_csum()
46 count--; in do_csum()
50 count >>= 1; /* nr of 64-bit words.. */ in do_csum()
57 BUG_ON(count >= 65530); in do_csum()
59 while (count) { in do_csum()
[all …]
/linux-4.4.14/fs/
Deventfd.c36 __u64 count; member
59 if (ULLONG_MAX - ctx->count < n) in eventfd_signal()
60 n = ULLONG_MAX - ctx->count; in eventfd_signal()
61 ctx->count += n; in eventfd_signal()
121 u64 count; in eventfd_poll() local
125 count = ctx->count; in eventfd_poll()
127 if (count > 0) in eventfd_poll()
129 if (count == ULLONG_MAX) in eventfd_poll()
131 if (ULLONG_MAX - 1 > count) in eventfd_poll()
139 *cnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count; in eventfd_ctx_do_read()
[all …]
Dseq_file.c23 m->count = m->size; in seq_set_overflow()
108 m->count = m->from = 0; in traverse()
128 m->count = 0; in traverse()
132 if (pos + m->count > offset) { in traverse()
134 m->count -= m->from; in traverse()
138 pos += m->count; in traverse()
139 m->count = 0; in traverse()
154 m->count = 0; in traverse()
201 m->count = 0; in seq_read()
215 if (m->count) { in seq_read()
[all …]
/linux-4.4.14/fs/ufs/
Dutil.c23 u64 count = 0; in _ubh_bread_() local
26 count = size >> uspi->s_fshift; in _ubh_bread_()
27 if (count > UFS_MAXFRAG) in _ubh_bread_()
33 ubh->count = count; in _ubh_bread_()
34 for (i = 0; i < count; i++) in _ubh_bread_()
51 u64 count = 0; in ubh_bread_uspi() local
54 count = size >> uspi->s_fshift; in ubh_bread_uspi()
55 if (count <= 0 || count > UFS_MAXFRAG) in ubh_bread_uspi()
58 USPI_UBH(uspi)->count = count; in ubh_bread_uspi()
59 for (i = 0; i < count; i++) in ubh_bread_uspi()
[all …]
Dballoc.c37 void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count) in ufs_free_fragments() argument
50 (unsigned long long)fragment, count); in ufs_free_fragments()
52 if (ufs_fragnum(fragment) + count > uspi->s_fpg) in ufs_free_fragments()
73 end_bit = bit + count; in ufs_free_fragments()
85 fs32_add(sb, &ucg->cg_cs.cs_nffree, count); in ufs_free_fragments()
86 uspi->cs_total.cs_nffree += count; in ufs_free_fragments()
87 fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); in ufs_free_fragments()
132 void ufs_free_blocks(struct inode *inode, u64 fragment, unsigned count) in ufs_free_blocks() argument
145 (unsigned long long)fragment, count); in ufs_free_blocks()
147 if ((fragment & uspi->s_fpbmask) || (count & uspi->s_fpbmask)) { in ufs_free_blocks()
[all …]
/linux-4.4.14/arch/x86/lib/
Dcsum-partial_64.c36 unsigned odd, count; in do_csum() local
47 count = len >> 1; /* nr of 16-bit words.. */ in do_csum()
48 if (count) { in do_csum()
51 count--; in do_csum()
55 count >>= 1; /* nr of 32-bit words.. */ in do_csum()
56 if (count) { in do_csum()
61 count--; in do_csum()
65 count >>= 1; /* nr of 64-bit words.. */ in do_csum()
69 count64 = count >> 3; in do_csum()
88 count %= 8; in do_csum()
[all …]
Dstring_32.c32 char *strncpy(char *dest, const char *src, size_t count) in strncpy() argument
45 : "0" (src), "1" (dest), "2" (count) : "memory"); in strncpy()
70 char *strncat(char *dest, const char *src, size_t count) in strncat() argument
86 : "0" (src), "1" (dest), "2" (0), "3" (0xffffffffu), "g" (count) in strncat()
117 int strncmp(const char *cs, const char *ct, size_t count) in strncmp() argument
134 : "1" (cs), "2" (ct), "3" (count) in strncmp()
179 void *memchr(const void *cs, int c, size_t count) in memchr() argument
183 if (!count) in memchr()
191 : "a" (c), "0" (cs), "1" (count) in memchr()
216 size_t strnlen(const char *s, size_t count) in strnlen() argument
[all …]
/linux-4.4.14/arch/powerpc/platforms/powernv/
Dopal-nvram.c29 static ssize_t opal_nvram_read(char *buf, size_t count, loff_t *index) in opal_nvram_read() argument
37 if ((off + count) > nvram_size) in opal_nvram_read()
38 count = nvram_size - off; in opal_nvram_read()
39 rc = opal_read_nvram(__pa(buf), count, off); in opal_nvram_read()
42 *index += count; in opal_nvram_read()
43 return count; in opal_nvram_read()
46 static ssize_t opal_nvram_write(char *buf, size_t count, loff_t *index) in opal_nvram_write() argument
54 if ((off + count) > nvram_size) in opal_nvram_write()
55 count = nvram_size - off; in opal_nvram_write()
58 rc = opal_write_nvram(__pa(buf), count, off); in opal_nvram_write()
[all …]
/linux-4.4.14/fs/configfs/
Dfile.c45 size_t count; member
69 ssize_t count; in fill_read_buffer() local
76 count = attr->show(item, buffer->page); in fill_read_buffer()
79 BUG_ON(count > (ssize_t)SIMPLE_ATTR_SIZE); in fill_read_buffer()
80 if (count >= 0) in fill_read_buffer()
81 buffer->count = count; in fill_read_buffer()
83 ret = count; in fill_read_buffer()
107 configfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos) in configfs_read_file() argument
118 __func__, count, *ppos, buffer->page); in configfs_read_file()
119 retval = simple_read_from_buffer(buf, count, ppos, buffer->page, in configfs_read_file()
[all …]
/linux-4.4.14/arch/sparc/include/asm/
Dide.h35 static inline void __ide_insw(void __iomem *port, void *dst, u32 count) in __ide_insw() argument
38 unsigned long end = (unsigned long)dst + (count << 1); in __ide_insw()
45 count--; in __ide_insw()
48 while(count >= 2) { in __ide_insw()
54 count -= 2; in __ide_insw()
57 if(count) in __ide_insw()
65 static inline void __ide_outsw(void __iomem *port, const void *src, u32 count) in __ide_outsw() argument
68 unsigned long end = (unsigned long)src + (count << 1); in __ide_outsw()
75 count--; in __ide_outsw()
78 while(count >= 2) { in __ide_outsw()
[all …]
Drwsem.h28 if (unlikely(atomic64_inc_return((atomic64_t *)(&sem->count)) <= 0L)) in __down_read()
36 while ((tmp = sem->count) >= 0L) { in __down_read_trylock()
37 if (tmp == cmpxchg(&sem->count, tmp, in __down_read_trylock()
53 (atomic64_t *)(&sem->count)); in __down_write_nested()
67 tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
79 tmp = atomic64_dec_return((atomic64_t *)(&sem->count)); in __up_read()
90 (atomic64_t *)(&sem->count)) < 0L)) in __up_write()
99 atomic64_add(delta, (atomic64_t *)(&sem->count)); in rwsem_atomic_add()
109 tmp = atomic64_add_return(-RWSEM_WAITING_BIAS, (atomic64_t *)(&sem->count)); in __downgrade_write()
119 return atomic64_add_return(delta, (atomic64_t *)(&sem->count)); in rwsem_atomic_update()
/linux-4.4.14/arch/m32r/include/asm/
Dio.h178 #define ioread8_rep(p, dst, count) insb((unsigned long)(p), (dst), (count)) argument
179 #define ioread16_rep(p, dst, count) insw((unsigned long)(p), (dst), (count)) argument
180 #define ioread32_rep(p, dst, count) insl((unsigned long)(p), (dst), (count)) argument
182 #define iowrite8_rep(p, src, count) outsb((unsigned long)(p), (src), (count)) argument
183 #define iowrite16_rep(p, src, count) outsw((unsigned long)(p), (src), (count)) argument
184 #define iowrite32_rep(p, src, count) outsl((unsigned long)(p), (src), (count)) argument
196 memset_io(volatile void __iomem *addr, unsigned char val, int count) in memset_io() argument
198 memset((void __force *) addr, val, count); in memset_io()
202 memcpy_fromio(void *dst, volatile void __iomem *src, int count) in memcpy_fromio() argument
204 memcpy(dst, (void __force *) src, count); in memcpy_fromio()
[all …]
/linux-4.4.14/arch/m32r/platforms/mappi/
Dio.c211 void _insb(unsigned int port, void *addr, unsigned long count) in _insb() argument
218 while (count--) in _insb()
223 count, 1); in _insb()
226 count, 1); in _insb()
230 while (count--) in _insb()
235 void _insw(unsigned int port, void *addr, unsigned long count) in _insw() argument
242 while (count--) in _insw()
247 count, 1); in _insw()
250 count, 1); in _insw()
254 while (count--) in _insw()
[all …]
/linux-4.4.14/arch/sh/include/asm/
Dmutex-llsc.h22 __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_lock() argument
32 : "r" (&(count)->counter) in __mutex_fastpath_lock()
36 fail_fn(count); in __mutex_fastpath_lock()
40 __mutex_fastpath_lock_retval(atomic_t *count) in __mutex_fastpath_lock_retval() argument
50 : "r" (&(count)->counter) in __mutex_fastpath_lock_retval()
60 __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_unlock() argument
70 : "r" (&(count)->counter) in __mutex_fastpath_unlock()
74 fail_fn(count); in __mutex_fastpath_unlock()
88 __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) in __mutex_fastpath_trylock() argument
104 : "r" (&count->counter) in __mutex_fastpath_trylock()
Drwsem.h27 if (atomic_inc_return((atomic_t *)(&sem->count)) > 0) in __down_read()
37 while ((tmp = sem->count) >= 0) { in __down_read_trylock()
38 if (tmp == cmpxchg(&sem->count, tmp, in __down_read_trylock()
55 (atomic_t *)(&sem->count)); in __down_write()
66 tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
80 tmp = atomic_dec_return((atomic_t *)(&sem->count)); in __up_read()
92 (atomic_t *)(&sem->count)) < 0) in __up_write()
101 atomic_add(delta, (atomic_t *)(&sem->count)); in rwsem_atomic_add()
112 tmp = atomic_add_return(-RWSEM_WAITING_BIAS, (atomic_t *)(&sem->count)); in __downgrade_write()
128 return atomic_add_return(delta, (atomic_t *)(&sem->count)); in rwsem_atomic_update()
/linux-4.4.14/arch/arm/boot/compressed/
Dstring.c43 void *memmove(void *__dest, __const void *__src, size_t count) in memmove() argument
52 return memcpy(__dest, __src, count); in memmove()
54 while (count--) in memmove()
55 d[count] = s[count]; in memmove()
68 int memcmp(const void *cs, const void *ct, size_t count) in memcmp() argument
70 const unsigned char *su1 = cs, *su2 = ct, *end = su1 + count; in memcmp()
96 void *memchr(const void *s, int c, size_t count) in memchr() argument
100 while (count--) in memchr()
116 void *memset(void *s, int c, size_t count) in memset() argument
119 while (count--) in memset()
[all …]
/linux-4.4.14/crypto/
Dtestmgr.c81 unsigned int count; member
88 unsigned int count; member
95 unsigned int count; member
102 unsigned int count; member
108 unsigned int count; member
113 unsigned int count; member
118 unsigned int count; member
123 unsigned int count; member
1549 desc->suite.aead.enc.count); in alg_test_aead()
1556 desc->suite.aead.dec.count); in alg_test_aead()
[all …]
/linux-4.4.14/arch/m32r/platforms/m32700ut/
Dio.c98 static inline void _ne_insb(void *portp, void *addr, unsigned long count) in _ne_insb() argument
102 while (count--) in _ne_insb()
262 void _insb(unsigned int port, void *addr, unsigned long count) in _insb() argument
265 _ne_insb(PORT2ADDR_NE(port), addr, count); in _insb()
270 while (count--) in _insb()
277 count, 1); in _insb()
283 while (count--) in _insb()
288 void _insw(unsigned int port, void *addr, unsigned long count) in _insw() argument
299 while (count--) in _insw()
304 count, 1); in _insw()
[all …]
/linux-4.4.14/arch/m32r/platforms/mappi3/
Dio.c109 static inline void _ne_insb(void *portp, void * addr, unsigned long count) in _ne_insb() argument
113 while (count--) in _ne_insb()
276 void _insb(unsigned int port, void * addr, unsigned long count) in _insb() argument
279 _ne_insb(PORT2ADDR_NE(port), addr, count); in _insb()
285 while (count--) in _insb()
292 count, 1); in _insb()
298 while (count--) in _insb()
303 void _insw(unsigned int port, void * addr, unsigned long count) in _insw() argument
310 while (count--) in _insw()
315 count, 1); in _insw()
[all …]
/linux-4.4.14/arch/m32r/platforms/mappi2/
Dio.c94 static inline void _ne_insb(void *portp, void * addr, unsigned long count) in _ne_insb() argument
98 while (count--) in _ne_insb()
258 void _insb(unsigned int port, void * addr, unsigned long count) in _insb() argument
261 _ne_insb(PORT2ADDR_NE(port), addr, count); in _insb()
266 while (count--) in _insb()
273 count, 1); in _insb()
279 while (count--) in _insb()
284 void _insw(unsigned int port, void * addr, unsigned long count) in _insw() argument
291 while (count--) in _insw()
296 count, 1); in _insw()
[all …]
/linux-4.4.14/arch/m32r/platforms/opsput/
Dio.c98 static inline void _ne_insb(void *portp, void *addr, unsigned long count) in _ne_insb() argument
102 while (count--) in _ne_insb()
262 void _insb(unsigned int port, void *addr, unsigned long count) in _insb() argument
265 _ne_insb(PORT2ADDR_NE(port), addr, count); in _insb()
270 while (count--) in _insb()
277 count, 1); in _insb()
283 while (count--) in _insb()
288 void _insw(unsigned int port, void *addr, unsigned long count) in _insw() argument
299 while (count--) in _insw()
304 count, 1); in _insw()
[all …]
/linux-4.4.14/arch/powerpc/platforms/pseries/
Devent_sources.c27 int i, index, count = 0; in request_event_sources_irqs() local
41 if (count > 15) in request_event_sources_irqs()
43 virqs[count] = irq_create_mapping(NULL, *(opicprop++)); in request_event_sources_irqs()
44 if (virqs[count] == NO_IRQ) { in request_event_sources_irqs()
51 count++; in request_event_sources_irqs()
60 if (count > 15) in request_event_sources_irqs()
62 virqs[count] = irq_create_of_mapping(&oirq); in request_event_sources_irqs()
63 if (virqs[count] == NO_IRQ) { in request_event_sources_irqs()
70 count++; in request_event_sources_irqs()
75 for (i = 0; i < count; i++) { in request_event_sources_irqs()
Dscanlog.c47 size_t count, loff_t *ppos) in scanlog_read() argument
54 if (count > RTAS_DATA_BUF_SIZE) in scanlog_read()
55 count = RTAS_DATA_BUF_SIZE; in scanlog_read()
57 if (count < 1024) { in scanlog_read()
62 printk(KERN_ERR "scanlog: cannot perform a small read (%ld)\n", count); in scanlog_read()
66 if (!access_ok(VERIFY_WRITE, buf, count)) in scanlog_read()
74 (u32) __pa(rtas_data_buf), (u32) count); in scanlog_read()
114 size_t count, loff_t *ppos) in scanlog_write() argument
119 if (count > 19) count = 19; in scanlog_write()
120 if (copy_from_user (stkbuf, buf, count)) { in scanlog_write()
[all …]
/linux-4.4.14/drivers/scsi/aacraid/
Dcommctrl.c200 fibctx->count = 0; in open_getadapter_fib()
299 fibctx->count--; in next_getadapter_fib()
356 fibctx->count--; in aac_close_fib_context()
508 if(copy_from_user(&fibsize, &user_srb->count,sizeof(u32))){ in aac_send_raw_srb()
560 if (user_srbcmd->sg.count > ARRAY_SIZE(sg_list)) { in aac_send_raw_srb()
562 le32_to_cpu(srbcmd->sg.count))); in aac_send_raw_srb()
567 ((user_srbcmd->sg.count & 0xff) * sizeof(struct sgentry)); in aac_send_raw_srb()
568 actual_fibsize64 = actual_fibsize + (user_srbcmd->sg.count & 0xff) * in aac_send_raw_srb()
576 actual_fibsize, actual_fibsize64, user_srbcmd->sg.count, in aac_send_raw_srb()
582 if ((data_dir == DMA_NONE) && user_srbcmd->sg.count) { in aac_send_raw_srb()
[all …]
/linux-4.4.14/arch/m32r/kernel/
Dtime.c69 unsigned long count; in m32r_gettimeoffset() local
72 count = inl(M32R_MFT2CUT_PORTL); in m32r_gettimeoffset()
75 count = 0; in m32r_gettimeoffset()
77 count = (latch - count) * TICK_SIZE; in m32r_gettimeoffset()
78 elapsed_time = DIV_ROUND_CLOSEST(count, latch); in m32r_gettimeoffset()
82 unsigned long count; in m32r_gettimeoffset() local
87 count = inl(M32R_MFT2CUT_PORTL); in m32r_gettimeoffset()
89 if (jiffies == p_jiffies && count > p_count) in m32r_gettimeoffset()
90 count = 0; in m32r_gettimeoffset()
93 p_count = count; in m32r_gettimeoffset()
[all …]
/linux-4.4.14/arch/arm/plat-samsung/
Dpm-common.c31 void s3c_pm_do_save(struct sleep_save *ptr, int count) in s3c_pm_do_save() argument
33 for (; count > 0; count--, ptr++) { in s3c_pm_do_save()
50 void s3c_pm_do_restore(const struct sleep_save *ptr, int count) in s3c_pm_do_restore() argument
52 for (; count > 0; count--, ptr++) { in s3c_pm_do_restore()
71 void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count) in s3c_pm_do_restore_core() argument
73 for (; count > 0; count--, ptr++) in s3c_pm_do_restore_core()
/linux-4.4.14/arch/powerpc/include/asm/
Dmutex.h75 __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_lock() argument
77 if (unlikely(__mutex_dec_return_lock(count) < 0)) in __mutex_fastpath_lock()
78 fail_fn(count); in __mutex_fastpath_lock()
90 __mutex_fastpath_lock_retval(atomic_t *count) in __mutex_fastpath_lock_retval() argument
92 if (unlikely(__mutex_dec_return_lock(count) < 0)) in __mutex_fastpath_lock_retval()
107 __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) in __mutex_fastpath_unlock() argument
109 if (unlikely(__mutex_inc_return_unlock(count) <= 0)) in __mutex_fastpath_unlock()
110 fail_fn(count); in __mutex_fastpath_unlock()
125 __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) in __mutex_fastpath_trylock() argument
127 if (likely(__mutex_cmpxchg_lock(count, 1, 0) == 1)) in __mutex_fastpath_trylock()
/linux-4.4.14/arch/powerpc/boot/
Ddiv64.S78 srw r4,r4,r5 # LSW = count > 31 ? 0 : LSW >> count
80 slw r6,r3,r6 # t1 = count > 31 ? 0 : MSW << (32-count)
81 rlwinm r8,r7,0,32 # t3 = (count < 32) ? 32 : 0
82 sraw r7,r3,r7 # t2 = MSW >> (count-32)
84 slw r7,r7,r8 # t2 = (count < 32) ? 0 : t2
85 sraw r3,r3,r5 # MSW = MSW >> count
92 slw r3,r3,r5 # MSW = count > 31 ? 0 : MSW << count
94 srw r6,r4,r6 # t1 = count > 31 ? 0 : LSW >> (32-count)
95 slw r7,r4,r7 # t2 = count < 32 ? 0 : LSW << (count-32)
97 slw r4,r4,r5 # LSW = LSW << count
[all …]
/linux-4.4.14/arch/s390/mm/
Dmaccess.c21 unsigned long aligned, offset, count; in s390_kernel_write_odd() local
27 count = size - 1; in s390_kernel_write_odd()
36 : "+&a" (aligned), "+&a" (count), "=m" (tmp) in s390_kernel_write_odd()
70 static int __memcpy_real(void *dest, void *src, size_t count) in __memcpy_real() argument
73 register unsigned long _len1 asm("3") = (unsigned long) count; in __memcpy_real()
75 register unsigned long _len2 asm("5") = (unsigned long) count; in __memcpy_real()
94 int memcpy_real(void *dest, void *src, size_t count) in memcpy_real() argument
99 if (!count) in memcpy_real()
103 rc = __memcpy_real(dest, src, count); in memcpy_real()
111 void memcpy_absolute(void *dest, void *src, size_t count) in memcpy_absolute() argument
[all …]
/linux-4.4.14/drivers/net/wireless/libertas/
Ddebugfs.c25 size_t count, loff_t *ppos) in write_file_dummy() argument
33 size_t count, loff_t *ppos) in lbs_dev_info() argument
48 res = simple_read_from_buffer(userbuf, count, ppos, buf, pos); in lbs_dev_info()
55 const char __user *user_buf, size_t count, in lbs_sleepparams_write() argument
67 buf_size = min(count, len - 1); in lbs_sleepparams_write()
86 ret = count; in lbs_sleepparams_write()
96 size_t count, loff_t *ppos) in lbs_sleepparams_read() argument
116 ret = simple_read_from_buffer(userbuf, count, ppos, buf, pos); in lbs_sleepparams_read()
124 const char __user *user_buf, size_t count, in lbs_host_sleep_write() argument
135 buf_size = min(count, len - 1); in lbs_host_sleep_write()
[all …]
/linux-4.4.14/drivers/md/persistent-data/
Ddm-btree-spine.c130 s->count = 0; in init_ro_spine()
139 for (i = 0; i < s->count; i++) { in exit_ro_spine()
150 if (s->count == 2) { in ro_step()
153 s->count--; in ro_step()
156 r = bn_read_lock(s->info, new_child, s->nodes + s->count); in ro_step()
158 s->count++; in ro_step()
165 BUG_ON(!s->count); in ro_pop()
166 --s->count; in ro_pop()
167 unlock_block(s->info, s->nodes[s->count]); in ro_pop()
174 BUG_ON(!s->count); in ro_node()
[all …]
/linux-4.4.14/tools/perf/util/intel-pt-decoder/
Dintel-pt-pkt-decoder.c77 int count; in intel_pt_get_long_tnt() local
84 for (count = 47; count; count--) { in intel_pt_get_long_tnt()
91 packet->count = count; in intel_pt_get_long_tnt()
132 unsigned int count = (52 - 5) >> 3; in intel_pt_get_vmcs() local
134 if (count < 1 || count > 7) in intel_pt_get_vmcs()
137 if (len < count + 2) in intel_pt_get_vmcs()
141 packet->count = count; in intel_pt_get_vmcs()
142 memcpy_le64(&packet->payload, buf + 2, count); in intel_pt_get_vmcs()
144 return count + 2; in intel_pt_get_vmcs()
184 packet->count = buf[5] | ((buf[6] & BIT(0)) << 8); in intel_pt_get_tma()
[all …]
/linux-4.4.14/sound/core/
Dmemory.c38 int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count) in copy_to_user_fromio() argument
41 return copy_to_user(dst, (const void __force*)src, count) ? -EFAULT : 0; in copy_to_user_fromio()
44 while (count) { in copy_to_user_fromio()
45 size_t c = count; in copy_to_user_fromio()
51 count -= c; in copy_to_user_fromio()
71 int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count) in copy_from_user_toio() argument
74 return copy_from_user((void __force *)dst, src, count) ? -EFAULT : 0; in copy_from_user_toio()
77 while (count) { in copy_from_user_toio()
78 size_t c = count; in copy_from_user_toio()
84 count -= c; in copy_from_user_toio()
/linux-4.4.14/drivers/net/wireless/b43/
Dsysfs.c36 static int get_integer(const char *buf, size_t count) in get_integer() argument
41 if (count == 0) in get_integer()
43 count = min_t(size_t, count, 10); in get_integer()
44 memcpy(tmp, buf, count); in get_integer()
55 ssize_t count = 0; in b43_attr_interfmode_show() local
69 count = in b43_attr_interfmode_show()
74 count = in b43_attr_interfmode_show()
79 count = in b43_attr_interfmode_show()
89 return count; in b43_attr_interfmode_show()
94 const char *buf, size_t count) in b43_attr_interfmode_store() argument
[all …]
/linux-4.4.14/drivers/staging/sm750fb/
Dddk750_hwi2c.c95 unsigned char count, i; in hw_i2c_write_data() local
114 count = length - 1; in hw_i2c_write_data()
116 count = MAX_HWI2C_FIFO - 1; in hw_i2c_write_data()
117 POKE32(I2C_BYTE_COUNT, count); in hw_i2c_write_data()
120 for (i = 0; i <= count; i++) in hw_i2c_write_data()
132 length -= (count + 1); in hw_i2c_write_data()
135 total_bytes += (count + 1); in hw_i2c_write_data()
162 unsigned char count, i; in hw_i2c_read_data() local
181 count = length - 1; in hw_i2c_read_data()
183 count = MAX_HWI2C_FIFO - 1; in hw_i2c_read_data()
[all …]
/linux-4.4.14/sound/oss/
Dmsnd.c121 int count = 0; in msnd_fifo_write_io() local
123 while ((count < len) && (f->len != f->n)) { in msnd_fifo_write_io()
128 nwritten = len - count; in msnd_fifo_write_io()
134 if (nwritten > len - count) in msnd_fifo_write_io()
135 nwritten = len - count; in msnd_fifo_write_io()
140 count += nwritten; in msnd_fifo_write_io()
147 return count; in msnd_fifo_write_io()
152 int count = 0; in msnd_fifo_write() local
154 while ((count < len) && (f->len != f->n)) { in msnd_fifo_write()
159 nwritten = len - count; in msnd_fifo_write()
[all …]
/linux-4.4.14/fs/ext4/
Dblock_validity.c25 unsigned int count; member
46 if ((entry1->start_blk + entry1->count) == entry2->start_blk) in can_merge()
58 unsigned int count) in add_system_zone() argument
69 else if (start_blk >= (entry->start_blk + entry->count)) in add_system_zone()
72 if (start_blk + count > (entry->start_blk + in add_system_zone()
73 entry->count)) in add_system_zone()
74 entry->count = (start_blk + count - in add_system_zone()
89 new_entry->count = count; in add_system_zone()
102 new_entry->count += entry->count; in add_system_zone()
113 new_entry->count += entry->count; in add_system_zone()
[all …]
/linux-4.4.14/drivers/block/paride/
Dfriq.c77 static void friq_read_block_int( PIA *pi, char * buf, int count, int regr ) in friq_read_block_int() argument
84 for (k=0;k<count;k++) { in friq_read_block_int()
95 for (k=0;k<count;k++) { in friq_read_block_int()
104 for (k=0;k<count-2;k++) buf[k] = r4(); in friq_read_block_int()
106 buf[count-2] = r4(); in friq_read_block_int()
107 buf[count-1] = r4(); in friq_read_block_int()
112 for (k=0;k<(count/2)-1;k++) ((u16 *)buf)[k] = r4w(); in friq_read_block_int()
114 buf[count-2] = r4(); in friq_read_block_int()
115 buf[count-1] = r4(); in friq_read_block_int()
120 for (k=0;k<(count/4)-1;k++) ((u32 *)buf)[k] = r4l(); in friq_read_block_int()
[all …]
Dfrpw.c74 static void frpw_read_block_int( PIA *pi, char * buf, int count, int regr ) in frpw_read_block_int() argument
81 for (k=0;k<count;k++) { in frpw_read_block_int()
92 for (k=0;k<count;k++) { in frpw_read_block_int()
101 for (k=0;k<count;k++) buf[k] = r4(); in frpw_read_block_int()
107 for (k=0;k<count-2;k++) buf[k] = r4(); in frpw_read_block_int()
109 buf[count-2] = r4(); in frpw_read_block_int()
110 buf[count-1] = r4(); in frpw_read_block_int()
115 for (k=0;k<(count/2)-1;k++) ((u16 *)buf)[k] = r4w(); in frpw_read_block_int()
117 buf[count-2] = r4(); in frpw_read_block_int()
118 buf[count-1] = r4(); in frpw_read_block_int()
[all …]
Depia.c136 static void epia_read_block( PIA *pi, char * buf, int count ) in epia_read_block() argument
144 for (k=0;k<count;k++) { in epia_read_block()
156 for (k=0;k<count;k++) { in epia_read_block()
167 for (k=0;k<count;k++) { in epia_read_block()
175 case 3: if (count > 512) WR(0x84,3); in epia_read_block()
177 for (k=0;k<count;k++) buf[k] = r4(); in epia_read_block()
181 case 4: if (count > 512) WR(0x84,3); in epia_read_block()
183 for (k=0;k<count/2;k++) ((u16 *)buf)[k] = r4w(); in epia_read_block()
187 case 5: if (count > 512) WR(0x84,3); in epia_read_block()
189 for (k=0;k<count/4;k++) ((u32 *)buf)[k] = r4l(); in epia_read_block()
[all …]
Depat.c97 static void epat_read_block( PIA *pi, char * buf, int count ) in epat_read_block() argument
105 for(k=0;k<count;k++) { in epat_read_block()
106 if (k == count-1) w0(0xfd); in epat_read_block()
118 for(k=0;k<count;k++) { in epat_read_block()
119 if (k == count-1) w0(0xfd); in epat_read_block()
130 for(k=0;k<count-1;k++) { in epat_read_block()
135 w2(0x26); w2(0x27); buf[count-1] = r0(); in epat_read_block()
140 for(k=0;k<count-1;k++) buf[k] = r4(); in epat_read_block()
141 w2(4); w3(0xa0); w2(0x24); buf[count-1] = r4(); in epat_read_block()
146 for(k=0;k<(count/2)-1;k++) ((u16 *)buf)[k] = r4w(); in epat_read_block()
[all …]
/linux-4.4.14/drivers/staging/rdma/ipath/
Dipath_diag.c60 size_t count, loff_t *off);
62 size_t count, loff_t *off);
75 size_t count, loff_t *off);
139 const void __iomem *caddr, size_t count) in ipath_read_umem64() argument
142 const u64 __iomem *reg_end = reg_addr + (count / sizeof(u64)); in ipath_read_umem64()
176 const void __user *uaddr, size_t count) in ipath_write_umem64() argument
179 const u64 __iomem *reg_end = reg_addr + (count / sizeof(u64)); in ipath_write_umem64()
214 const void __iomem *caddr, size_t count) in ipath_read_umem32() argument
217 const u32 __iomem *reg_end = reg_addr + (count / sizeof(u32)); in ipath_read_umem32()
254 const void __user *uaddr, size_t count) in ipath_write_umem32() argument
[all …]
/linux-4.4.14/sound/firewire/fireworks/
Dfireworks_hwdep.c28 long count = 0; in hwdep_read_resp_buf() local
65 count += till_end; in hwdep_read_resp_buf()
72 return count; in hwdep_read_resp_buf()
76 hwdep_read_locked(struct snd_efw *efw, char __user *buf, long count, in hwdep_read_locked() argument
87 count = min_t(long, count, sizeof(event.lock_status)); in hwdep_read_locked()
89 if (copy_to_user(buf, &event, count)) in hwdep_read_locked()
92 return count; in hwdep_read_locked()
96 hwdep_read(struct snd_hwdep *hwdep, char __user *buf, long count, in hwdep_read() argument
115 count = hwdep_read_locked(efw, buf, count, offset); in hwdep_read()
117 count = hwdep_read_resp_buf(efw, buf, count, offset); in hwdep_read()
[all …]
/linux-4.4.14/drivers/misc/altera-stapl/
Daltera-jtag.c131 u32 count, u32 start_index, in altera_set_dr_pre() argument
138 if (count > js->dr_pre) { in altera_set_dr_pre()
140 js->dr_pre_data = (u8 *)alt_malloc((count + 7) >> 3); in altera_set_dr_pre()
144 js->dr_pre = count; in altera_set_dr_pre()
146 js->dr_pre = count; in altera_set_dr_pre()
149 for (i = 0; i < count; ++i) { in altera_set_dr_pre()
169 int altera_set_ir_pre(struct altera_jtag *js, u32 count, u32 start_index, in altera_set_ir_pre() argument
176 if (count > js->ir_pre) { in altera_set_ir_pre()
178 js->ir_pre_data = (u8 *)alt_malloc((count + 7) >> 3); in altera_set_ir_pre()
182 js->ir_pre = count; in altera_set_ir_pre()
[all …]
/linux-4.4.14/drivers/misc/
Dlkdtm.c158 static int count = DEFAULT_COUNT; variable
242 static enum ctype parse_cp_type(const char *what, size_t count) in parse_cp_type() argument
280 count = cpoint_count; in lkdtm_parse_commandline()
544 count--; in lkdtm_handler()
546 cp_name_to_str(cpoint), cp_type_to_str(cptype), count); in lkdtm_handler()
548 if (count == 0) { in lkdtm_handler()
550 count = cpoint_count; in lkdtm_handler()
622 const char __user *user_buf, size_t count, loff_t *off) in do_register_entry() argument
627 if (count >= PAGE_SIZE) in do_register_entry()
633 if (copy_from_user(buf, user_buf, count)) { in do_register_entry()
[all …]
/linux-4.4.14/security/smack/
Dsmackfs.c469 size_t count, loff_t *ppos, in smk_write_rules_list() argument
491 if (count < SMK_OLOADLEN || count > SMK_LOADLEN) in smk_write_rules_list()
494 if (count >= PAGE_SIZE) { in smk_write_rules_list()
495 count = PAGE_SIZE - 1; in smk_write_rules_list()
500 data = kmalloc(count + 1, GFP_KERNEL); in smk_write_rules_list()
504 if (copy_from_user(data, buf, count) != 0) { in smk_write_rules_list()
514 while (count > 0 && (data[count - 1] != '\n')) in smk_write_rules_list()
515 --count; in smk_write_rules_list()
516 if (count == 0) { in smk_write_rules_list()
522 data[count] = '\0'; in smk_write_rules_list()
[all …]
/linux-4.4.14/arch/m32r/platforms/usrv/
Dio.c150 void _insb(unsigned int port, void * addr, unsigned long count) in _insb() argument
153 pcc_ioread_byte(0, port, addr, sizeof(unsigned char), count, 1); in _insb()
157 while (count--) in _insb()
162 void _insw(unsigned int port, void * addr, unsigned long count) in _insw() argument
168 pcc_ioread_word(0, port, addr, sizeof(unsigned short), count, in _insw()
172 while (count--) in _insw()
177 void _insl(unsigned int port, void * addr, unsigned long count) in _insl() argument
183 while (count--) in _insl()
187 void _outsb(unsigned int port, const void * addr, unsigned long count) in _outsb() argument
194 count, 1); in _outsb()
[all …]
/linux-4.4.14/kernel/
Dksysfs.c49 const char *buf, size_t count) in uevent_helper_store() argument
51 if (count+1 > UEVENT_HELPER_PATH_LEN) in uevent_helper_store()
53 memcpy(uevent_helper, buf, count); in uevent_helper_store()
54 uevent_helper[count] = '\0'; in uevent_helper_store()
55 if (count && uevent_helper[count-1] == '\n') in uevent_helper_store()
56 uevent_helper[count-1] = '\0'; in uevent_helper_store()
57 return count; in uevent_helper_store()
70 const char *buf, size_t count) in profiling_store() argument
88 return count; in profiling_store()
115 const char *buf, size_t count) in kexec_crash_size_store() argument
[all …]
/linux-4.4.14/drivers/bcma/
Dhost_soc.c51 size_t count, u16 offset, u8 reg_width) in bcma_host_soc_block_read() argument
59 while (count) { in bcma_host_soc_block_read()
62 count--; in bcma_host_soc_block_read()
69 WARN_ON(count & 1); in bcma_host_soc_block_read()
70 while (count) { in bcma_host_soc_block_read()
73 count -= 2; in bcma_host_soc_block_read()
80 WARN_ON(count & 3); in bcma_host_soc_block_read()
81 while (count) { in bcma_host_soc_block_read()
84 count -= 4; in bcma_host_soc_block_read()
95 size_t count, u16 offset, u8 reg_width) in bcma_host_soc_block_write() argument
[all …]
/linux-4.4.14/drivers/vfio/pci/
Dvfio_pci_rdwr.c31 loff_t off, size_t count, size_t x_start, in do_io_rw() argument
36 while (count) { in do_io_rw()
40 fillable = min(count, (size_t)(x_start - off)); in do_io_rw()
42 fillable = count; in do_io_rw()
96 filled = min(count, (size_t)(x_end - off)); in do_io_rw()
107 count -= filled; in do_io_rw()
117 size_t count, loff_t *ppos, bool iswrite) in vfio_pci_bar_rw() argument
135 count = min(count, (size_t)(end - pos)); in vfio_pci_bar_rw()
169 done = do_io_rw(io, buf, pos, count, x_start, x_end, iswrite); in vfio_pci_bar_rw()
181 size_t count, loff_t *ppos, bool iswrite) in vfio_pci_vga_rw() argument
[all …]
Dvfio_pci_config.c117 int (*readfn)(struct vfio_pci_device *vdev, int pos, int count,
119 int (*writefn)(struct vfio_pci_device *vdev, int pos, int count,
129 __le32 *val, int count) in vfio_user_config_read() argument
134 switch (count) { in vfio_user_config_read()
160 __le32 val, int count) in vfio_user_config_write() argument
165 switch (count) { in vfio_user_config_write()
181 int count, struct perm_bits *perm, in vfio_default_config_read() argument
186 memcpy(val, vdev->vconfig + pos, count); in vfio_default_config_read()
188 memcpy(&virt, perm->virt + offset, count); in vfio_default_config_read()
191 if (cpu_to_le32(~0U >> (32 - (count * 8))) != virt) { in vfio_default_config_read()
[all …]
/linux-4.4.14/arch/ia64/lib/
Dcsum_partial_copy.c36 int odd, count; in do_csum_c() local
47 count = len >> 1; /* nr of 16-bit words.. */ in do_csum_c()
48 if (count) { in do_csum_c()
51 count--; in do_csum_c()
55 count >>= 1; /* nr of 32-bit words.. */ in do_csum_c()
56 if (count) { in do_csum_c()
59 count--; in do_csum_c()
63 count >>= 1; /* nr of 64-bit words.. */ in do_csum_c()
64 if (count) { in do_csum_c()
68 count--; in do_csum_c()
[all …]
/linux-4.4.14/arch/blackfin/include/asm/
Dio.h22 extern void outsb(unsigned long port, const void *addr, unsigned long count);
23 extern void outsw(unsigned long port, const void *addr, unsigned long count);
24 extern void outsw_8(unsigned long port, const void *addr, unsigned long count);
25 extern void outsl(unsigned long port, const void *addr, unsigned long count);
30 extern void insb(unsigned long port, void *addr, unsigned long count);
31 extern void insw(unsigned long port, void *addr, unsigned long count);
32 extern void insw_8(unsigned long port, void *addr, unsigned long count);
33 extern void insl(unsigned long port, void *addr, unsigned long count);
34 extern void insl_16(unsigned long port, void *addr, unsigned long count);
/linux-4.4.14/arch/powerpc/sysdev/
Dmmio_nvram.c37 static ssize_t mmio_nvram_read(char *buf, size_t count, loff_t *index) in mmio_nvram_read() argument
43 if (*index + count > mmio_nvram_len) in mmio_nvram_read()
44 count = mmio_nvram_len - *index; in mmio_nvram_read()
48 memcpy_fromio(buf, mmio_nvram_start + *index, count); in mmio_nvram_read()
52 *index += count; in mmio_nvram_read()
53 return count; in mmio_nvram_read()
73 static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index) in mmio_nvram_write() argument
79 if (*index + count > mmio_nvram_len) in mmio_nvram_write()
80 count = mmio_nvram_len - *index; in mmio_nvram_write()
84 memcpy_toio(mmio_nvram_start + *index, buf, count); in mmio_nvram_write()
[all …]
/linux-4.4.14/drivers/net/wireless/ti/wlcore/
Ddebugfs.c44 int wl1271_format_buffer(char __user *userbuf, size_t count, in wl1271_format_buffer() argument
55 return simple_read_from_buffer(userbuf, count, ppos, buf, res); in wl1271_format_buffer()
91 size_t count, loff_t *ppos) in tx_queue_len_read() argument
101 return simple_read_from_buffer(userbuf, count, ppos, buf, res); in tx_queue_len_read()
143 size_t count, loff_t *ppos) \
146 return wl1271_format_buffer(user_buf, count, \
153 size_t count, loff_t *ppos) \
159 ret = kstrtoul_from_user(user_buf, count, 10, &value); \
176 return count; \
194 size_t count, loff_t *ppos) in gpio_power_read() argument
[all …]
/linux-4.4.14/drivers/media/pci/bt8xx/
Dbttv-vbi.c77 (((fmt)->count[0] + (fmt)->count[1]) * (fmt)->samples_per_line)
83 unsigned int *count, unsigned int *size) in vbi_buffer_setup() argument
88 if (0 == *count) in vbi_buffer_setup()
89 *count = vbibufs; in vbi_buffer_setup()
97 fh->vbi_fmt.fmt.count[0], in vbi_buffer_setup()
98 fh->vbi_fmt.fmt.count[1]); in vbi_buffer_setup()
131 if (fh->vbi_fmt.fmt.count[0] > 0) in vbi_buffer_prepare()
134 if (fh->vbi_fmt.fmt.count[1] > 0) in vbi_buffer_prepare()
142 buf->vbi_count[0] != fh->vbi_fmt.fmt.count[0] || in vbi_buffer_prepare()
143 buf->vbi_count[1] != fh->vbi_fmt.fmt.count[1]) { in vbi_buffer_prepare()
[all …]
/linux-4.4.14/drivers/acpi/
Dcustom_method.c23 size_t count, loff_t *ppos) in cm_write() argument
34 if (count <= sizeof(struct acpi_table_header)) in cm_write()
49 (*ppos + count > max_size) || in cm_write()
50 (*ppos + count < count) || in cm_write()
51 (count > uncopied_bytes)) in cm_write()
54 if (copy_from_user(buf + (*ppos), user_buf, count)) { in cm_write()
60 uncopied_bytes -= count; in cm_write()
61 *ppos += count; in cm_write()
72 return count; in cm_write()
/linux-4.4.14/drivers/crypto/
Dpadlock-sha.c73 uint32_t *dst, size_t count) in padlock_output_block() argument
75 while (count--) in padlock_output_block()
80 unsigned int count, u8 *out) in padlock_sha1_finup() argument
100 if (state.count + count > ULONG_MAX) in padlock_sha1_finup()
101 return crypto_shash_finup(&dctx->fallback, in, count, out); in padlock_sha1_finup()
103 leftover = ((state.count - 1) & (SHA1_BLOCK_SIZE - 1)) + 1; in padlock_sha1_finup()
106 if (count > space) { in padlock_sha1_finup()
111 count -= space; in padlock_sha1_finup()
114 memcpy(state.buffer + leftover, in, count); in padlock_sha1_finup()
116 count += leftover; in padlock_sha1_finup()
[all …]
/linux-4.4.14/fs/hfs/
Dextent.c77 u16 count; in hfs_ext_find_block() local
80 count = be16_to_cpu(ext->count); in hfs_ext_find_block()
81 if (off < count) in hfs_ext_find_block()
83 off -= count; in hfs_ext_find_block()
92 u16 count = 0; in hfs_ext_block_count() local
95 count += be16_to_cpu(ext->count); in hfs_ext_block_count()
96 return count; in hfs_ext_block_count()
105 if (ext->count) in hfs_ext_lastblock()
107 return be16_to_cpu(ext->block) + be16_to_cpu(ext->count); in hfs_ext_lastblock()
212 be16_to_cpu(extent[i].count)); in hfs_dump_extent()
[all …]
/linux-4.4.14/drivers/s390/cio/
Dqdio_main.c127 int start, int count, int auto_ack) in qdio_do_eqbs() argument
129 int rc, tmp_count = count, tmp_start = start, nr = q->nr, retried = 0; in qdio_do_eqbs()
141 return count - tmp_count; in qdio_do_eqbs()
159 return count - tmp_count; in qdio_do_eqbs()
163 DBF_ERROR("%3d%3d%2d", count, tmp_count, nr); in qdio_do_eqbs()
165 q->nr, q->first_to_kick, count, q->irq_ptr->int_parm); in qdio_do_eqbs()
181 int count) in qdio_do_sqbs() argument
184 int tmp_count = count, tmp_start = start; in qdio_do_sqbs()
188 if (!count) in qdio_do_sqbs()
199 return count - tmp_count; in qdio_do_sqbs()
[all …]
Dfcx.c102 u32 count = 0; in calc_dcw_count() local
108 count += dcw->count; in calc_dcw_count()
113 return count; in calc_dcw_count()
129 data_count += tidaw[i].count; in calc_cbc_size()
157 u32 count; in tcw_finalize() local
168 count = calc_dcw_count(tccb); in tcw_finalize()
170 count += calc_cbc_size(tidaw, num_tidaws); in tcw_finalize()
172 tcw->input_count = count; in tcw_finalize()
174 tcw->output_count = count; in tcw_finalize()
175 tcat->count = ALIGN(count, 4) + 4; in tcw_finalize()
[all …]
/linux-4.4.14/arch/xtensa/include/asm/
Drwsem.h32 if (atomic_add_return(1,(atomic_t *)(&sem->count)) > 0) in __down_read()
42 while ((tmp = sem->count) >= 0) { in __down_read_trylock()
43 if (tmp == cmpxchg(&sem->count, tmp, in __down_read_trylock()
60 (atomic_t *)(&sem->count)); in __down_write()
71 tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
85 tmp = atomic_sub_return(1,(atomic_t *)(&sem->count)); in __up_read()
97 (atomic_t *)(&sem->count)) < 0) in __up_write()
106 atomic_add(delta, (atomic_t *)(&sem->count)); in rwsem_atomic_add()
117 tmp = atomic_add_return(-RWSEM_WAITING_BIAS, (atomic_t *)(&sem->count)); in __downgrade_write()
128 return atomic_add_return(delta, (atomic_t *)(&sem->count)); in rwsem_atomic_update()
/linux-4.4.14/drivers/clocksource/
Di8253.c33 int count; in i8253_read() local
52 count = inb_p(PIT_CH0); /* read the latched count */ in i8253_read()
53 count |= inb_p(PIT_CH0) << 8; in i8253_read()
56 if (count > PIT_LATCH) { in i8253_read()
60 count = PIT_LATCH - 1; in i8253_read()
76 if (count > old_count && jifs == old_jifs) in i8253_read()
77 count = old_count; in i8253_read()
79 old_count = count; in i8253_read()
84 count = (PIT_LATCH - 1) - count; in i8253_read()
86 return (cycle_t)(jifs * PIT_LATCH) + count; in i8253_read()
/linux-4.4.14/arch/m32r/lib/
Dusercopy.c41 #define __do_strncpy_from_user(dst,src,count,res) \ argument
66 : "=&r"(res), "=&r"(count), "=&r" (__d0), "=&r" (__d1), \
68 : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), \
75 #define __do_strncpy_from_user(dst,src,count,res) \ argument
103 : "=&r"(res), "=&r"(count), "=&r" (__d0), "=&r" (__d1), \
105 : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), \
113 __strncpy_from_user(char *dst, const char __user *src, long count) in __strncpy_from_user() argument
116 __do_strncpy_from_user(dst, src, count, res); in __strncpy_from_user()
121 strncpy_from_user(char *dst, const char __user *src, long count) in strncpy_from_user() argument
125 __do_strncpy_from_user(dst, src, count, res); in strncpy_from_user()
/linux-4.4.14/arch/tile/kernel/vdso/
Dvgettimeofday.c66 unsigned count; in do_realtime() local
70 count = raw_read_seqcount_begin(&vdso->tb_seq); in do_realtime()
75 } while (unlikely(read_seqcount_retry(&vdso->tb_seq, count))); in do_realtime()
85 unsigned count; in do_monotonic() local
89 count = raw_read_seqcount_begin(&vdso->tb_seq); in do_monotonic()
94 } while (unlikely(read_seqcount_retry(&vdso->tb_seq, count))); in do_monotonic()
105 unsigned count; in do_realtime_coarse() local
108 count = raw_read_seqcount_begin(&vdso->tb_seq); in do_realtime_coarse()
111 } while (unlikely(read_seqcount_retry(&vdso->tb_seq, count))); in do_realtime_coarse()
119 unsigned count; in do_monotonic_coarse() local
[all …]
/linux-4.4.14/drivers/infiniband/hw/qib/
Dqib_diag.c134 size_t count, loff_t *off);
136 size_t count, loff_t *off);
152 size_t count, loff_t *off);
340 u32 regoffs, size_t count) in qib_read_umem64() argument
352 if (count >= limit) in qib_read_umem64()
353 count = limit; in qib_read_umem64()
354 reg_end = reg_addr + (count / sizeof(u64)); in qib_read_umem64()
384 const void __user *uaddr, size_t count) in qib_write_umem64() argument
396 if (count >= limit) in qib_write_umem64()
397 count = limit; in qib_write_umem64()
[all …]
Dqib_fs.c105 size_t count, loff_t *ppos) in driver_stats_read() argument
108 return simple_read_from_buffer(buf, count, ppos, &qib_stats, in driver_stats_read()
133 size_t count, loff_t *ppos) in driver_names_read() argument
135 return simple_read_from_buffer(buf, count, ppos, qib_statnames, in driver_names_read()
146 size_t count, loff_t *ppos) in dev_counters_read() argument
153 return simple_read_from_buffer(buf, count, ppos, counters, avail); in dev_counters_read()
158 size_t count, loff_t *ppos) in dev_names_read() argument
165 return simple_read_from_buffer(buf, count, ppos, names, avail); in dev_names_read()
180 size_t count, loff_t *ppos) in portnames_read() argument
187 return simple_read_from_buffer(buf, count, ppos, names, avail); in portnames_read()
[all …]
/linux-4.4.14/arch/parisc/include/asm/
Dide.h23 static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count) in __ide_mm_insw() argument
25 while (count--) { in __ide_mm_insw()
31 static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count) in __ide_mm_insl() argument
33 while (count--) { in __ide_mm_insl()
39 static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count) in __ide_mm_outsw() argument
41 while (count--) { in __ide_mm_outsw()
47 static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count) in __ide_mm_outsl() argument
49 while (count--) { in __ide_mm_outsl()
/linux-4.4.14/fs/xfs/libxfs/
Dxfs_attr_leaf.c127 ASSERT(!to->count && !to->usedbytes); in xfs_attr3_leaf_firstused_from_disk()
181 to->count = be16_to_cpu(hdr3->count); in xfs_attr3_leaf_hdr_from_disk()
195 to->count = be16_to_cpu(from->hdr.count); in xfs_attr3_leaf_hdr_from_disk()
223 hdr3->count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
238 to->hdr.count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
276 if (ichdr.count == 0) in xfs_attr3_leaf_verify()
518 hdr->count = 0; in xfs_attr_shortform_create()
547 for (i = 0; i < sf->hdr.count; sfe = XFS_ATTR_SF_NEXTENTRY(sfe), i++) { in xfs_attr_shortform_add()
570 sf->hdr.count++; in xfs_attr_shortform_add()
615 end = sf->hdr.count; in xfs_attr_shortform_remove()
[all …]
/linux-4.4.14/arch/m68k/lib/
Dmemset.c10 void *memset(void *s, int c, size_t count) in memset() argument
15 if (!count) in memset()
24 count--; in memset()
26 if (count > 2 && (long)s & 2) { in memset()
30 count -= 2; in memset()
32 temp = count >> 2; in memset()
63 if (count & 2) { in memset()
68 if (count & 1) { in memset()
/linux-4.4.14/arch/mips/kernel/
Drtlx.c240 ssize_t rtlx_read(int index, void __user *buff, size_t count) in rtlx_read() argument
256 count = min(count, in rtlx_read()
261 fl = min(count, (size_t)lx->buffer_size - lx->lx_read); in rtlx_read()
268 if (count - fl) in rtlx_read()
269 failed = copy_to_user(buff + fl, lx->lx_buffer, count - fl); in rtlx_read()
272 count -= failed; in rtlx_read()
275 lx->lx_read = (lx->lx_read + count) % lx->buffer_size; in rtlx_read()
279 return count; in rtlx_read()
282 ssize_t rtlx_write(int index, const void __user *buffer, size_t count) in rtlx_write() argument
299 count = min_t(size_t, count, write_spacefree(rt_read, rt->rt_write, in rtlx_write()
[all …]
/linux-4.4.14/drivers/gpu/host1x/hw/
Dhost1x02_hardware.h94 static inline u32 host1x_opcode_incr(unsigned offset, unsigned count) in host1x_opcode_incr() argument
96 return (1 << 28) | (offset << 16) | count; in host1x_opcode_incr()
99 static inline u32 host1x_opcode_nonincr(unsigned offset, unsigned count) in host1x_opcode_nonincr() argument
101 return (2 << 28) | (offset << 16) | count; in host1x_opcode_nonincr()
125 static inline u32 host1x_opcode_gather(unsigned count) in host1x_opcode_gather() argument
127 return (6 << 28) | count; in host1x_opcode_gather()
130 static inline u32 host1x_opcode_gather_nonincr(unsigned offset, unsigned count) in host1x_opcode_gather_nonincr() argument
132 return (6 << 28) | (offset << 16) | BIT(15) | count; in host1x_opcode_gather_nonincr()
135 static inline u32 host1x_opcode_gather_incr(unsigned offset, unsigned count) in host1x_opcode_gather_incr() argument
137 return (6 << 28) | (offset << 16) | BIT(15) | BIT(14) | count; in host1x_opcode_gather_incr()
Dhost1x04_hardware.h94 static inline u32 host1x_opcode_incr(unsigned offset, unsigned count) in host1x_opcode_incr() argument
96 return (1 << 28) | (offset << 16) | count; in host1x_opcode_incr()
99 static inline u32 host1x_opcode_nonincr(unsigned offset, unsigned count) in host1x_opcode_nonincr() argument
101 return (2 << 28) | (offset << 16) | count; in host1x_opcode_nonincr()
125 static inline u32 host1x_opcode_gather(unsigned count) in host1x_opcode_gather() argument
127 return (6 << 28) | count; in host1x_opcode_gather()
130 static inline u32 host1x_opcode_gather_nonincr(unsigned offset, unsigned count) in host1x_opcode_gather_nonincr() argument
132 return (6 << 28) | (offset << 16) | BIT(15) | count; in host1x_opcode_gather_nonincr()
135 static inline u32 host1x_opcode_gather_incr(unsigned offset, unsigned count) in host1x_opcode_gather_incr() argument
137 return (6 << 28) | (offset << 16) | BIT(15) | BIT(14) | count; in host1x_opcode_gather_incr()
Dhost1x01_hardware.h95 static inline u32 host1x_opcode_incr(unsigned offset, unsigned count) in host1x_opcode_incr() argument
97 return (1 << 28) | (offset << 16) | count; in host1x_opcode_incr()
100 static inline u32 host1x_opcode_nonincr(unsigned offset, unsigned count) in host1x_opcode_nonincr() argument
102 return (2 << 28) | (offset << 16) | count; in host1x_opcode_nonincr()
126 static inline u32 host1x_opcode_gather(unsigned count) in host1x_opcode_gather() argument
128 return (6 << 28) | count; in host1x_opcode_gather()
131 static inline u32 host1x_opcode_gather_nonincr(unsigned offset, unsigned count) in host1x_opcode_gather_nonincr() argument
133 return (6 << 28) | (offset << 16) | BIT(15) | count; in host1x_opcode_gather_nonincr()
136 static inline u32 host1x_opcode_gather_incr(unsigned offset, unsigned count) in host1x_opcode_gather_incr() argument
138 return (6 << 28) | (offset << 16) | BIT(15) | BIT(14) | count; in host1x_opcode_gather_incr()
/linux-4.4.14/mm/
Dcma.c53 return cma->count << PAGE_SHIFT; in cma_get_size()
85 unsigned int count) in cma_clear_bitmap() argument
90 bitmap_count = cma_bitmap_pages_to_bits(cma, count); in cma_clear_bitmap()
101 unsigned i = cma->count >> pageblock_order; in cma_activate_area()
141 cma->count = 0; in cma_activate_area()
201 cma->count = size >> PAGE_SHIFT; in cma_init_reserved_mem()
364 struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align) in cma_alloc() argument
373 if (!cma || !cma->count) in cma_alloc()
377 count, align); in cma_alloc()
379 if (!count) in cma_alloc()
[all …]
Dpage_counter.c24 new = atomic_long_sub_return(nr_pages, &counter->count); in page_counter_cancel()
43 new = atomic_long_add_return(nr_pages, &c->count); in page_counter_charge()
84 new = atomic_long_add_return(nr_pages, &c->count); in page_counter_try_charge()
86 atomic_long_sub(nr_pages, &c->count); in page_counter_try_charge()
138 long count; in page_counter_limit() local
151 count = atomic_long_read(&counter->count); in page_counter_limit()
153 if (count > limit) in page_counter_limit()
158 if (atomic_long_read(&counter->count) <= count) in page_counter_limit()
/linux-4.4.14/drivers/spi/
Dspi-altera.c55 int count; member
105 static inline unsigned int hw_txbyte(struct altera_spi *hw, int count) in hw_txbyte() argument
110 return hw->tx[count]; in hw_txbyte()
112 return (hw->tx[count * 2] in hw_txbyte()
113 | (hw->tx[count * 2 + 1] << 8)); in hw_txbyte()
125 hw->count = 0; in altera_spi_txrx()
142 while (hw->count < hw->len) { in altera_spi_txrx()
145 writel(hw_txbyte(hw, hw->count), in altera_spi_txrx()
156 hw->rx[hw->count] = rxd; in altera_spi_txrx()
159 hw->rx[hw->count * 2] = rxd; in altera_spi_txrx()
[all …]
/linux-4.4.14/arch/arm/kernel/
Dio.c44 void _memcpy_fromio(void *to, const volatile void __iomem *from, size_t count) in _memcpy_fromio() argument
47 while (count) { in _memcpy_fromio()
48 count--; in _memcpy_fromio()
60 void _memcpy_toio(volatile void __iomem *to, const void *from, size_t count) in _memcpy_toio() argument
63 while (count) { in _memcpy_toio()
64 count--; in _memcpy_toio()
76 void _memset_io(volatile void __iomem *dst, int c, size_t count) in _memset_io() argument
78 while (count) { in _memset_io()
79 count--; in _memset_io()
/linux-4.4.14/drivers/pci/
Dpci-sysfs.c66 const char *buf, size_t count) in broken_parity_status_store() argument
76 return count; in broken_parity_status_store()
170 const char *buf, size_t count) in enable_store() argument
191 return result < 0 ? result : count; in enable_store()
207 size_t count) in numa_node_store() argument
230 return count; in numa_node_store()
270 const char *buf, size_t count) in msi_bus_store() argument
291 return count; in msi_bus_store()
301 return count; in msi_bus_store()
306 size_t count) in bus_rescan_store() argument
[all …]
/linux-4.4.14/drivers/bluetooth/
Dbtmrvl_debugfs.c35 const char __user *ubuf, size_t count, loff_t *ppos) in btmrvl_hscfgcmd_write() argument
43 if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) in btmrvl_hscfgcmd_write()
57 return count; in btmrvl_hscfgcmd_write()
61 size_t count, loff_t *ppos) in btmrvl_hscfgcmd_read() argument
70 return simple_read_from_buffer(userbuf, count, ppos, buf, ret); in btmrvl_hscfgcmd_read()
81 size_t count, loff_t *ppos) in btmrvl_pscmd_write() argument
89 if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) in btmrvl_pscmd_write()
103 return count; in btmrvl_pscmd_write()
108 size_t count, loff_t *ppos) in btmrvl_pscmd_read() argument
116 return simple_read_from_buffer(userbuf, count, ppos, buf, ret); in btmrvl_pscmd_read()
[all …]
/linux-4.4.14/drivers/base/regmap/
Dtrace.h68 TP_PROTO(struct regmap *map, unsigned int reg, int count),
70 TP_ARGS(map, reg, count),
75 __field( int, count )
81 __entry->count = count;
86 (int)__entry->count)
91 TP_PROTO(struct regmap *map, unsigned int reg, int count),
93 TP_ARGS(map, reg, count)
98 TP_PROTO(struct regmap *map, unsigned int reg, int count),
100 TP_ARGS(map, reg, count)
105 TP_PROTO(struct regmap *map, unsigned int reg, int count),
[all …]
/linux-4.4.14/security/tomoyo/
Dsecurityfs_if.c40 size_t count, loff_t *ppos) in tomoyo_write_self() argument
44 if (!count || count >= TOMOYO_EXEC_TMPSIZE - 10) in tomoyo_write_self()
46 data = kzalloc(count + 1, GFP_NOFS); in tomoyo_write_self()
49 if (copy_from_user(data, buf, count)) { in tomoyo_write_self()
92 return error ? error : count; in tomoyo_write_self()
106 size_t count, loff_t *ppos) in tomoyo_read_self() argument
111 if (pos >= len || !count) in tomoyo_read_self()
114 if (count < len) in tomoyo_read_self()
115 len = count; in tomoyo_read_self()
179 static ssize_t tomoyo_read(struct file *file, char __user *buf, size_t count, in tomoyo_read() argument
[all …]
/linux-4.4.14/drivers/net/ethernet/intel/ixgbe/
Dixgbe_debugfs.c45 size_t count, loff_t *ppos) in ixgbe_dbg_reg_ops_read() argument
61 if (count < strlen(buf)) { in ixgbe_dbg_reg_ops_read()
66 len = simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf)); in ixgbe_dbg_reg_ops_read()
81 size_t count, loff_t *ppos) in ixgbe_dbg_reg_ops_write() argument
89 if (count >= sizeof(ixgbe_dbg_reg_ops_buf)) in ixgbe_dbg_reg_ops_write()
96 count); in ixgbe_dbg_reg_ops_write()
129 return count; in ixgbe_dbg_reg_ops_write()
150 size_t count, loff_t *ppos) in ixgbe_dbg_netdev_ops_read() argument
166 if (count < strlen(buf)) { in ixgbe_dbg_netdev_ops_read()
171 len = simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf)); in ixgbe_dbg_netdev_ops_read()
[all …]
/linux-4.4.14/drivers/media/rc/
Dir-xmp-decoder.c56 data->state, data->count, TO_US(ev.duration), TO_STR(ev.pulse)); in ir_xmp_decode()
65 data->count = 0; in ir_xmp_decode()
90 if (data->count != 16) { in ir_xmp_decode()
92 data->count, ev.duration); in ir_xmp_decode()
158 if (data->count == 16) { in ir_xmp_decode()
160 data->count, ev.duration); in ir_xmp_decode()
166 data->count = 8; in ir_xmp_decode()
169 else if (data->count != 8) in ir_xmp_decode()
171 data->count, ev.duration); in ir_xmp_decode()
178 if (data->count == 16) { in ir_xmp_decode()
[all …]
/linux-4.4.14/samples/seccomp/
Dbpf-helper.c19 struct sock_filter *filter, size_t count) in bpf_resolve_jumps() argument
22 __u8 insn = count - 1; in bpf_resolve_jumps()
24 if (count < 1) in bpf_resolve_jumps()
68 if (labels->count == BPF_LABELS_MAX) { in seccomp_bpf_label()
72 if (labels->count == 0) { in seccomp_bpf_label()
75 labels->count++; in seccomp_bpf_label()
78 end = begin + labels->count; in seccomp_bpf_label()
85 labels->count++; in seccomp_bpf_label()
89 void seccomp_bpf_print(struct sock_filter *filter, size_t count) in seccomp_bpf_print() argument
91 struct sock_filter *end = filter + count; in seccomp_bpf_print()
/linux-4.4.14/tools/testing/selftests/ftrace/test.d/ftrace/
Dfgraph-filter-stack.tc61 count=`cat trace | grep '()' | grep -v schedule | wc -l`
63 if [ $count -ne 0 ]; then
68 count=`cat trace | grep 'schedule()' | wc -l`
69 if [ $count -eq 0 ]; then
78 count=`cat trace | grep '()' | grep -v schedule | wc -l`
80 if [ $count -ne 0 ]; then
84 count=`cat trace | grep 'schedule()' | wc -l`
85 if [ $count -eq 0 ]; then
/linux-4.4.14/drivers/parisc/
Dpdc_stable.c112 ssize_t (*store)(struct pdcspath_entry *entry, const char *buf, size_t count);
277 pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t count) in pdcspath_hwpath_write() argument
285 if (!entry || !buf || !count) in pdcspath_hwpath_write()
289 count = min_t(size_t, count, sizeof(in)-1); in pdcspath_hwpath_write()
290 strncpy(in, buf, count); in pdcspath_hwpath_write()
291 in[count] = '\0'; in pdcspath_hwpath_write()
344 return count; in pdcspath_hwpath_write()
393 pdcspath_layer_write(struct pdcspath_entry *entry, const char *buf, size_t count) in pdcspath_layer_write() argument
399 if (!entry || !buf || !count) in pdcspath_layer_write()
403 count = min_t(size_t, count, sizeof(in)-1); in pdcspath_layer_write()
[all …]
/linux-4.4.14/arch/openrisc/kernel/
Dptrace.c53 unsigned int pos, unsigned int count, in genregs_get() argument
60 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, 0, 4); in genregs_get()
63 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get()
66 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get()
69 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, in genregs_get()
72 ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, in genregs_get()
83 unsigned int pos, unsigned int count, in genregs_set() argument
90 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, 4); in genregs_set()
93 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set()
97 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, in genregs_set()
[all …]
/linux-4.4.14/drivers/media/pci/cx18/
Dcx18-io.c27 void cx18_memset_io(struct cx18 *cx, void __iomem *addr, int val, size_t count) in cx18_memset_io() argument
34 if ((count > 0) && ((unsigned long)dst & 1)) { in cx18_memset_io()
36 count--; in cx18_memset_io()
39 if ((count > 1) && ((unsigned long)dst & 2)) { in cx18_memset_io()
41 count -= 2; in cx18_memset_io()
44 while (count > 3) { in cx18_memset_io()
46 count -= 4; in cx18_memset_io()
49 if (count > 1) { in cx18_memset_io()
51 count -= 2; in cx18_memset_io()
54 if (count > 0) in cx18_memset_io()
/linux-4.4.14/drivers/media/usb/au0828/
Dau0828-i2c.c56 int count; in i2c_wait_read_ack() local
58 for (count = 0; count < I2C_WAIT_RETRY; count++) { in i2c_wait_read_ack()
64 if (I2C_WAIT_RETRY == count) in i2c_wait_read_ack()
79 int count; in i2c_wait_read_done() local
81 for (count = 0; count < I2C_WAIT_RETRY; count++) { in i2c_wait_read_done()
87 if (I2C_WAIT_RETRY == count) in i2c_wait_read_done()
102 int count; in i2c_wait_write_done() local
104 for (count = 0; count < I2C_WAIT_RETRY; count++) { in i2c_wait_write_done()
110 if (I2C_WAIT_RETRY == count) in i2c_wait_write_done()
125 int count; in i2c_wait_done() local
[all …]
/linux-4.4.14/drivers/misc/ibmasm/
Dibmasmfs.c264 static ssize_t command_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset) in command_file_read() argument
273 if (count == 0 || count > IBMASM_CMD_MAX_BUFFER_SIZE) in command_file_read()
291 len = min(count, cmd->buffer_size); in command_file_read()
301 static ssize_t command_file_write(struct file *file, const char __user *ubuff, size_t count, loff_t… in command_file_write() argument
309 if (count == 0 || count > IBMASM_CMD_MAX_BUFFER_SIZE) in command_file_write()
318 cmd = ibmasm_new_command(command_data->sp, count); in command_file_write()
322 if (copy_from_user(cmd->buffer, ubuff, count)) { in command_file_write()
339 return count; in command_file_write()
373 static ssize_t event_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset) in event_file_read() argument
383 if (count == 0 || count > IBMASM_EVENT_MAX_SIZE) in event_file_read()
[all …]
/linux-4.4.14/drivers/staging/lustre/lustre/mdc/
Dmdc_reint.c77 int count; in mdc_resource_get_unused() local
96 count = ldlm_cancel_resource_local(res, cancels, &policy, in mdc_resource_get_unused()
100 return count; in mdc_resource_get_unused()
111 int count = 0, rc; in mdc_setattr() local
122 count = mdc_resource_get_unused(exp, &op_data->op_fid1, in mdc_setattr()
127 ldlm_lock_list_put(&cancels, l_bl_ast, count); in mdc_setattr()
137 rc = mdc_prep_elc_req(exp, req, MDS_REINT, &cancels, count); in mdc_setattr()
212 int count, resends = 0; in mdc_create() local
231 count = 0; in mdc_create()
234 count = mdc_resource_get_unused(exp, &op_data->op_fid1, in mdc_create()
[all …]
/linux-4.4.14/drivers/thermal/
Dfair_share.c36 int count = 0; in get_trip_level() local
43 for (count = 0; count < tz->trips; count++) { in get_trip_level()
44 tz->ops->get_trip_temp(tz, count, &trip_temp); in get_trip_level()
53 if (count > 0) { in get_trip_level()
54 tz->ops->get_trip_type(tz, count - 1, &trip_type); in get_trip_level()
55 trace_thermal_zone_trip(tz, count - 1, trip_type); in get_trip_level()
58 return count; in get_trip_level()
/linux-4.4.14/fs/proc/
Dpage.c29 size_t count, loff_t *ppos) in kpagecount_read() argument
39 count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); in kpagecount_read()
40 if (src & KPMMASK || count & KPMMASK) in kpagecount_read()
43 while (count > 0) { in kpagecount_read()
60 count -= KPMSIZE; in kpagecount_read()
197 size_t count, loff_t *ppos) in kpageflags_read() argument
206 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); in kpageflags_read()
207 if (src & KPMMASK || count & KPMMASK) in kpageflags_read()
210 while (count > 0) { in kpageflags_read()
223 count -= KPMSIZE; in kpageflags_read()
[all …]
/linux-4.4.14/drivers/staging/lustre/lustre/fid/
Dlproc_fid.c62 ldebugfs_fid_write_common(const char __user *buffer, size_t count, in ldebugfs_fid_write_common() argument
71 if (count >= sizeof(kernbuf)) in ldebugfs_fid_write_common()
74 if (copy_from_user(kernbuf, buffer, count)) in ldebugfs_fid_write_common()
77 kernbuf[count] = 0; in ldebugfs_fid_write_common()
79 if (count == 5 && strcmp(kernbuf, "clear") == 0) { in ldebugfs_fid_write_common()
81 return count; in ldebugfs_fid_write_common()
92 return count; in ldebugfs_fid_write_common()
99 size_t count, loff_t *off) in ldebugfs_fid_space_seq_write() argument
108 rc = ldebugfs_fid_write_common(buffer, count, &seq->lcs_space); in ldebugfs_fid_space_seq_write()
117 return count; in ldebugfs_fid_space_seq_write()
[all …]
/linux-4.4.14/kernel/trace/
Dtrace_selftest.c61 static int trace_test_buffer(struct trace_buffer *buf, unsigned long *count) in trace_test_buffer() argument
89 if (count) in trace_test_buffer()
90 *count = cnt; in trace_test_buffer()
328 unsigned long count; in trace_selftest_startup_dynamic_tracing() local
363 ret = trace_test_buffer(&tr->trace_buffer, &count); in trace_selftest_startup_dynamic_tracing()
367 if (count) { in trace_selftest_startup_dynamic_tracing()
384 ret = trace_test_buffer(&tr->trace_buffer, &count); in trace_selftest_startup_dynamic_tracing()
390 if (!ret && count != 1) { in trace_selftest_startup_dynamic_tracing()
392 printk(KERN_CONT ".. filter failed count=%ld ..", count); in trace_selftest_startup_dynamic_tracing()
654 unsigned long count; in trace_selftest_startup_function() local
[all …]
/linux-4.4.14/drivers/net/hamradio/
D6pack.c167 int actual, count; in sp_encaps() local
194 count = encode_sixpack(p, sp->xbuff, len, sp->tx_delay); in sp_encaps()
223 actual = sp->tty->ops->write(sp->tty, sp->xbuff, count); in sp_encaps()
224 sp->xleft = count - actual; in sp_encaps()
229 sp->xleft = count; in sp_encaps()
231 sp->status2 = count; in sp_encaps()
340 int count; in sp_bump() local
343 count = sp->rcount + 1; in sp_bump()
345 sp->dev->stats.rx_bytes += count; in sp_bump()
347 if ((skb = dev_alloc_skb(count)) == NULL) in sp_bump()
[all …]
/linux-4.4.14/drivers/net/wireless/mwifiex/
Ddebugfs.c75 size_t count, loff_t *ppos) in mwifiex_info_read() argument
146 ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page, in mwifiex_info_read()
165 size_t count, loff_t *ppos) in mwifiex_device_dump_read() argument
200 size_t count, loff_t *ppos) in mwifiex_getlog_read() argument
256 ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page, in mwifiex_getlog_read()
276 size_t count, loff_t *ppos) in mwifiex_histogram_read() argument
344 ret = simple_read_from_buffer(ubuf, count, ppos, (char *)page, in mwifiex_histogram_read()
352 size_t count, loff_t *ppos) in mwifiex_histogram_write() argument
412 size_t count, loff_t *ppos) in mwifiex_debug_read() argument
429 ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page, in mwifiex_debug_read()
[all …]
/linux-4.4.14/drivers/staging/rdma/hfi1/
Ddebugfs.c335 size_t count, loff_t *ppos) in dev_counters_read() argument
345 rval = simple_read_from_buffer(buf, count, ppos, counters, avail); in dev_counters_read()
352 size_t count, loff_t *ppos) in dev_names_read() argument
362 rval = simple_read_from_buffer(buf, count, ppos, names, avail); in dev_names_read()
379 size_t count, loff_t *ppos) in portnames_read() argument
390 rval = simple_read_from_buffer(buf, count, ppos, names, avail); in portnames_read()
397 size_t count, loff_t *ppos) in portcntrs_debugfs_read() argument
409 rval = simple_read_from_buffer(buf, count, ppos, counters, avail); in portcntrs_debugfs_read()
418 size_t count, loff_t *ppos) in qsfp_debugfs_dump() argument
434 ret = simple_read_from_buffer(buf, count, ppos, tmp, ret); in qsfp_debugfs_dump()
[all …]
/linux-4.4.14/security/integrity/evm/
Devm_secfs.c35 size_t count, loff_t *ppos) in evm_read_key() argument
44 rc = simple_read_from_buffer(buf, count, ppos, temp, strlen(temp)); in evm_read_key()
62 size_t count, loff_t *ppos) in evm_write_key() argument
70 if (count >= sizeof(temp) || count == 0) in evm_write_key()
73 if (copy_from_user(temp, buf, count) != 0) in evm_write_key()
76 temp[count] = '\0'; in evm_write_key()
87 return count; in evm_write_key()
/linux-4.4.14/arch/arm/mach-omap2/
Domap-pm-noop.c125 int count; in omap_pm_get_dev_context_loss_count() local
131 count = omap_device_get_context_loss_count(pdev); in omap_pm_get_dev_context_loss_count()
136 count = dummy_context_loss_counter; in omap_pm_get_dev_context_loss_count()
139 count++; in omap_pm_get_dev_context_loss_count()
145 count &= INT_MAX; in omap_pm_get_dev_context_loss_count()
146 dummy_context_loss_counter = count; in omap_pm_get_dev_context_loss_count()
151 dev_name(dev), count); in omap_pm_get_dev_context_loss_count()
153 return count; in omap_pm_get_dev_context_loss_count()

12345678910>>...29