/linux-4.1.27/arch/s390/include/uapi/asm/ |
H A D | swab.h | 19 __u64 result; __arch_swab64p() local 21 asm volatile("lrvg %0,%1" : "=d" (result) : "m" (*x)); __arch_swab64p() 22 return result; __arch_swab64p() 28 __u64 result; __arch_swab64() local 30 asm volatile("lrvgr %0,%1" : "=d" (result) : "d" (x)); __arch_swab64() 31 return result; __arch_swab64() 44 __u32 result; __arch_swab32p() local 52 : "=&d" (result) : "Q" (*x) : "cc"); __arch_swab32p() 55 : "=d" (result) : "m" (*x)); __arch_swab32p() 57 return result; __arch_swab32p() 64 __u32 result; __arch_swab32() local 66 asm volatile("lrvr %0,%1" : "=d" (result) : "d" (x)); __arch_swab32() 67 return result; __arch_swab32() 74 __u16 result; __arch_swab16p() local 80 : "=&d" (result) : "Q" (*x) : "cc"); __arch_swab16p() 83 : "=d" (result) : "m" (*x)); __arch_swab16p() 85 return result; __arch_swab16p()
|
/linux-4.1.27/include/linux/ |
H A D | adfs_fs.h | 13 unsigned int result = 0; adfs_checkbblk() local 17 result = (result & 0xff) + (result >> 8); adfs_checkbblk() 18 result = result + *--p; adfs_checkbblk() 21 return (result & 0xff) != ptr[511]; adfs_checkbblk()
|
H A D | mii.h | 111 u32 result = 0; ethtool_adv_to_mii_adv_t() local 114 result |= ADVERTISE_10HALF; ethtool_adv_to_mii_adv_t() 116 result |= ADVERTISE_10FULL; ethtool_adv_to_mii_adv_t() 118 result |= ADVERTISE_100HALF; ethtool_adv_to_mii_adv_t() 120 result |= ADVERTISE_100FULL; ethtool_adv_to_mii_adv_t() 122 result |= ADVERTISE_PAUSE_CAP; ethtool_adv_to_mii_adv_t() 124 result |= ADVERTISE_PAUSE_ASYM; ethtool_adv_to_mii_adv_t() 126 return result; ethtool_adv_to_mii_adv_t() 138 u32 result = 0; mii_adv_to_ethtool_adv_t() local 141 result |= ADVERTISED_10baseT_Half; mii_adv_to_ethtool_adv_t() 143 result |= ADVERTISED_10baseT_Full; mii_adv_to_ethtool_adv_t() 145 result |= ADVERTISED_100baseT_Half; mii_adv_to_ethtool_adv_t() 147 result |= ADVERTISED_100baseT_Full; mii_adv_to_ethtool_adv_t() 149 result |= ADVERTISED_Pause; mii_adv_to_ethtool_adv_t() 151 result |= ADVERTISED_Asym_Pause; mii_adv_to_ethtool_adv_t() 153 return result; mii_adv_to_ethtool_adv_t() 166 u32 result = 0; ethtool_adv_to_mii_ctrl1000_t() local 169 result |= ADVERTISE_1000HALF; ethtool_adv_to_mii_ctrl1000_t() 171 result |= ADVERTISE_1000FULL; ethtool_adv_to_mii_ctrl1000_t() 173 return result; ethtool_adv_to_mii_ctrl1000_t() 186 u32 result = 0; mii_ctrl1000_to_ethtool_adv_t() local 189 result |= ADVERTISED_1000baseT_Half; mii_ctrl1000_to_ethtool_adv_t() 191 result |= ADVERTISED_1000baseT_Full; mii_ctrl1000_to_ethtool_adv_t() 193 return result; mii_ctrl1000_to_ethtool_adv_t() 206 u32 result = 0; mii_lpa_to_ethtool_lpa_t() local 209 result |= ADVERTISED_Autoneg; mii_lpa_to_ethtool_lpa_t() 211 return result | mii_adv_to_ethtool_adv_t(lpa); mii_lpa_to_ethtool_lpa_t() 224 u32 result = 0; mii_stat1000_to_ethtool_lpa_t() local 227 result |= ADVERTISED_1000baseT_Half; mii_stat1000_to_ethtool_lpa_t() 229 result |= ADVERTISED_1000baseT_Full; mii_stat1000_to_ethtool_lpa_t() 231 return result; mii_stat1000_to_ethtool_lpa_t() 244 u32 result = 0; ethtool_adv_to_mii_adv_x() local 247 result |= ADVERTISE_1000XHALF; ethtool_adv_to_mii_adv_x() 249 result |= ADVERTISE_1000XFULL; ethtool_adv_to_mii_adv_x() 251 result |= ADVERTISE_1000XPAUSE; ethtool_adv_to_mii_adv_x() 253 result |= ADVERTISE_1000XPSE_ASYM; ethtool_adv_to_mii_adv_x() 255 return result; ethtool_adv_to_mii_adv_x() 268 u32 result = 0; mii_adv_to_ethtool_adv_x() local 271 result |= ADVERTISED_1000baseT_Half; mii_adv_to_ethtool_adv_x() 273 result |= ADVERTISED_1000baseT_Full; mii_adv_to_ethtool_adv_x() 275 result |= ADVERTISED_Pause; mii_adv_to_ethtool_adv_x() 277 result |= ADVERTISED_Asym_Pause; mii_adv_to_ethtool_adv_x() 279 return result; mii_adv_to_ethtool_adv_x() 292 u32 result = 0; mii_lpa_to_ethtool_lpa_x() local 295 result |= ADVERTISED_Autoneg; mii_lpa_to_ethtool_lpa_x() 297 return result | mii_adv_to_ethtool_adv_x(lpa); mii_lpa_to_ethtool_lpa_x()
|
H A D | parser.h | 29 int match_int(substring_t *, int *result); 30 int match_octal(substring_t *, int *result); 31 int match_hex(substring_t *, int *result);
|
/linux-4.1.27/arch/tile/lib/ |
H A D | checksum.c | 22 unsigned long result = 0; do_csum() local 28 result = (*buff << 8); do_csum() 35 result += *(const unsigned short *)buff; do_csum() 45 result = __insn_v2sadau(result, w, 0); do_csum() 64 result = __insn_v2sadau(result, w, 0); do_csum() 66 result = __insn_sadah_u(result, w, 0); do_csum() 72 result = __insn_v2sadau(result, w, 0); do_csum() 78 result += *(const unsigned short *) buff; do_csum() 83 result += *buff; do_csum() 84 result = csum_long(result); do_csum() 86 result = swab16(result); do_csum() 88 return result; do_csum()
|
/linux-4.1.27/drivers/iio/imu/inv_mpu6050/ |
H A D | inv_mpu_trigger.c | 45 int result; inv_mpu6050_set_enable() local 48 result = inv_mpu6050_set_power_itg(st, true); inv_mpu6050_set_enable() 49 if (result) inv_mpu6050_set_enable() 50 return result; inv_mpu6050_set_enable() 53 result = inv_mpu6050_switch_engine(st, true, inv_mpu6050_set_enable() 55 if (result) inv_mpu6050_set_enable() 56 return result; inv_mpu6050_set_enable() 59 result = inv_mpu6050_switch_engine(st, true, inv_mpu6050_set_enable() 61 if (result) inv_mpu6050_set_enable() 62 return result; inv_mpu6050_set_enable() 64 result = inv_reset_fifo(indio_dev); inv_mpu6050_set_enable() 65 if (result) inv_mpu6050_set_enable() 66 return result; inv_mpu6050_set_enable() 68 result = inv_mpu6050_write_reg(st, st->reg->fifo_en, 0); inv_mpu6050_set_enable() 69 if (result) inv_mpu6050_set_enable() 70 return result; inv_mpu6050_set_enable() 72 result = inv_mpu6050_write_reg(st, st->reg->int_enable, 0); inv_mpu6050_set_enable() 73 if (result) inv_mpu6050_set_enable() 74 return result; inv_mpu6050_set_enable() 76 result = inv_mpu6050_write_reg(st, st->reg->user_ctrl, 0); inv_mpu6050_set_enable() 77 if (result) inv_mpu6050_set_enable() 78 return result; inv_mpu6050_set_enable() 80 result = inv_mpu6050_switch_engine(st, false, inv_mpu6050_set_enable() 82 if (result) inv_mpu6050_set_enable() 83 return result; inv_mpu6050_set_enable() 85 result = inv_mpu6050_switch_engine(st, false, inv_mpu6050_set_enable() 87 if (result) inv_mpu6050_set_enable() 88 return result; inv_mpu6050_set_enable() 89 result = inv_mpu6050_set_power_itg(st, false); inv_mpu6050_set_enable() 90 if (result) inv_mpu6050_set_enable() 91 return result; inv_mpu6050_set_enable()
|
H A D | inv_mpu_core.c | 163 int result; inv_mpu6050_switch_engine() local 169 result = i2c_smbus_read_i2c_block_data(st->client, inv_mpu6050_switch_engine() 171 if (result != 1) inv_mpu6050_switch_engine() 172 return result; inv_mpu6050_switch_engine() 181 result = inv_mpu6050_write_reg(st, st->reg->pwr_mgmt_1, mgmt_1); inv_mpu6050_switch_engine() 182 if (result) inv_mpu6050_switch_engine() 183 return result; inv_mpu6050_switch_engine() 186 result = i2c_smbus_read_i2c_block_data(st->client, inv_mpu6050_switch_engine() 188 if (result != 1) inv_mpu6050_switch_engine() 189 return result; inv_mpu6050_switch_engine() 194 result = inv_mpu6050_write_reg(st, st->reg->pwr_mgmt_2, d); inv_mpu6050_switch_engine() 195 if (result) inv_mpu6050_switch_engine() 196 return result; inv_mpu6050_switch_engine() 204 result = inv_mpu6050_write_reg(st, inv_mpu6050_switch_engine() 206 if (result) inv_mpu6050_switch_engine() 207 return result; inv_mpu6050_switch_engine() 216 int result = 0; inv_mpu6050_set_power_itg() local 221 result = inv_mpu6050_write_reg(st, st->reg->pwr_mgmt_1, inv_mpu6050_set_power_itg() 223 if (!result) inv_mpu6050_set_power_itg() 228 result = inv_mpu6050_write_reg(st, st->reg->pwr_mgmt_1, inv_mpu6050_set_power_itg() 232 if (result) inv_mpu6050_set_power_itg() 233 return result; inv_mpu6050_set_power_itg() 252 int result; inv_mpu6050_init_config() local 256 result = inv_mpu6050_set_power_itg(st, true); inv_mpu6050_init_config() 257 if (result) inv_mpu6050_init_config() 258 return result; inv_mpu6050_init_config() 260 result = inv_mpu6050_write_reg(st, st->reg->gyro_config, d); inv_mpu6050_init_config() 261 if (result) inv_mpu6050_init_config() 262 return result; inv_mpu6050_init_config() 265 result = inv_mpu6050_write_reg(st, st->reg->lpf, d); inv_mpu6050_init_config() 266 if (result) inv_mpu6050_init_config() 267 return result; inv_mpu6050_init_config() 270 result = inv_mpu6050_write_reg(st, st->reg->sample_rate_div, d); inv_mpu6050_init_config() 271 if (result) inv_mpu6050_init_config() 272 return result; inv_mpu6050_init_config() 275 result = inv_mpu6050_write_reg(st, st->reg->accl_config, d); inv_mpu6050_init_config() 276 if (result) inv_mpu6050_init_config() 277 return result; inv_mpu6050_init_config() 281 result = inv_mpu6050_set_power_itg(st, false); inv_mpu6050_init_config() 283 return result; inv_mpu6050_init_config() 289 int ind, result; inv_mpu6050_sensor_show() local 293 result = i2c_smbus_read_i2c_block_data(st->client, reg + ind, 2, inv_mpu6050_sensor_show() 295 if (result != 2) inv_mpu6050_sensor_show() 312 int ret, result; inv_mpu6050_read_raw() local 315 result = 0; inv_mpu6050_read_raw() 318 result = inv_mpu6050_set_power_itg(st, true); inv_mpu6050_read_raw() 319 if (result) inv_mpu6050_read_raw() 327 result = inv_mpu6050_switch_engine(st, true, inv_mpu6050_read_raw() 329 if (result) inv_mpu6050_read_raw() 336 result = inv_mpu6050_switch_engine(st, false, inv_mpu6050_read_raw() 338 if (result) inv_mpu6050_read_raw() 345 result = inv_mpu6050_switch_engine(st, true, inv_mpu6050_read_raw() 347 if (result) inv_mpu6050_read_raw() 354 result = inv_mpu6050_switch_engine(st, false, inv_mpu6050_read_raw() 356 if (result) inv_mpu6050_read_raw() 372 result |= inv_mpu6050_set_power_itg(st, false); inv_mpu6050_read_raw() 374 if (result) inv_mpu6050_read_raw() 375 return result; inv_mpu6050_read_raw() 415 int result, i; inv_mpu6050_write_gyro_scale() local 421 result = inv_mpu6050_write_reg(st, inv_mpu6050_write_gyro_scale() 423 if (result) inv_mpu6050_write_gyro_scale() 424 return result; inv_mpu6050_write_gyro_scale() 453 int result, i; inv_mpu6050_write_accel_scale() local 459 result = inv_mpu6050_write_reg(st, inv_mpu6050_write_accel_scale() 461 if (result) inv_mpu6050_write_accel_scale() 462 return result; inv_mpu6050_write_accel_scale() 478 int result; inv_mpu6050_write_raw() local 484 result = -EBUSY; inv_mpu6050_write_raw() 487 result = inv_mpu6050_set_power_itg(st, true); inv_mpu6050_write_raw() 488 if (result) inv_mpu6050_write_raw() 495 result = inv_mpu6050_write_gyro_scale(st, val2); inv_mpu6050_write_raw() 498 result = inv_mpu6050_write_accel_scale(st, val2); inv_mpu6050_write_raw() 501 result = -EINVAL; inv_mpu6050_write_raw() 506 result = -EINVAL; inv_mpu6050_write_raw() 511 result |= inv_mpu6050_set_power_itg(st, false); inv_mpu6050_write_raw() 514 return result; inv_mpu6050_write_raw() 532 int i, h, result; inv_mpu6050_set_lpf() local 540 result = inv_mpu6050_write_reg(st, st->reg->lpf, data); inv_mpu6050_set_lpf() 541 if (result) inv_mpu6050_set_lpf() 542 return result; inv_mpu6050_set_lpf() 556 int result; inv_mpu6050_fifo_rate_store() local 570 result = -EBUSY; inv_mpu6050_fifo_rate_store() 573 result = inv_mpu6050_set_power_itg(st, true); inv_mpu6050_fifo_rate_store() 574 if (result) inv_mpu6050_fifo_rate_store() 578 result = inv_mpu6050_write_reg(st, st->reg->sample_rate_div, d); inv_mpu6050_fifo_rate_store() 579 if (result) inv_mpu6050_fifo_rate_store() 583 result = inv_mpu6050_set_lpf(st, fifo_rate); inv_mpu6050_fifo_rate_store() 584 if (result) inv_mpu6050_fifo_rate_store() 588 result |= inv_mpu6050_set_power_itg(st, false); inv_mpu6050_fifo_rate_store() 590 if (result) inv_mpu6050_fifo_rate_store() 591 return result; inv_mpu6050_fifo_rate_store() 727 int result; inv_check_and_setup_chip() local 734 result = inv_mpu6050_write_reg(st, st->reg->pwr_mgmt_1, inv_check_and_setup_chip() 736 if (result) inv_check_and_setup_chip() 737 return result; inv_check_and_setup_chip() 743 result = inv_mpu6050_set_power_itg(st, false); inv_check_and_setup_chip() 744 if (result) inv_check_and_setup_chip() 745 return result; inv_check_and_setup_chip() 746 result = inv_mpu6050_set_power_itg(st, true); inv_check_and_setup_chip() 747 if (result) inv_check_and_setup_chip() 748 return result; inv_check_and_setup_chip() 750 result = inv_mpu6050_switch_engine(st, false, inv_check_and_setup_chip() 752 if (result) inv_check_and_setup_chip() 753 return result; inv_check_and_setup_chip() 754 result = inv_mpu6050_switch_engine(st, false, inv_check_and_setup_chip() 756 if (result) inv_check_and_setup_chip() 757 return result; inv_check_and_setup_chip() 775 int result; inv_mpu_probe() local 792 result = inv_check_and_setup_chip(st, id); inv_mpu_probe() 793 if (result) inv_mpu_probe() 794 return result; inv_mpu_probe() 796 result = inv_mpu6050_init_config(indio_dev); inv_mpu_probe() 797 if (result) { inv_mpu_probe() 800 return result; inv_mpu_probe() 816 result = iio_triggered_buffer_setup(indio_dev, inv_mpu_probe() 820 if (result) { inv_mpu_probe() 822 result); inv_mpu_probe() 823 return result; inv_mpu_probe() 825 result = inv_mpu6050_probe_trigger(indio_dev); inv_mpu_probe() 826 if (result) { inv_mpu_probe() 827 dev_err(&st->client->dev, "trigger probe fail %d\n", result); inv_mpu_probe() 833 result = iio_device_register(indio_dev); inv_mpu_probe() 834 if (result) { inv_mpu_probe() 835 dev_err(&st->client->dev, "IIO register fail %d\n", result); inv_mpu_probe() 846 result = -ENODEV; inv_mpu_probe() 850 result = inv_mpu_acpi_create_mux_client(st); inv_mpu_probe() 851 if (result) inv_mpu_probe() 864 return result; inv_mpu_probe()
|
H A D | inv_mpu_ring.c | 39 int result; inv_reset_fifo() local 44 result = inv_mpu6050_write_reg(st, st->reg->int_enable, 0); inv_reset_fifo() 45 if (result) { inv_reset_fifo() 46 dev_err(&st->client->dev, "int_enable failed %d\n", result); inv_reset_fifo() 47 return result; inv_reset_fifo() 50 result = inv_mpu6050_write_reg(st, st->reg->fifo_en, 0); inv_reset_fifo() 51 if (result) inv_reset_fifo() 54 result = inv_mpu6050_write_reg(st, st->reg->user_ctrl, 0); inv_reset_fifo() 55 if (result) inv_reset_fifo() 59 result = inv_mpu6050_write_reg(st, st->reg->user_ctrl, inv_reset_fifo() 61 if (result) inv_reset_fifo() 70 result = inv_mpu6050_write_reg(st, st->reg->int_enable, inv_reset_fifo() 72 if (result) inv_reset_fifo() 73 return result; inv_reset_fifo() 76 result = inv_mpu6050_write_reg(st, st->reg->user_ctrl, inv_reset_fifo() 78 if (result) inv_reset_fifo() 86 result = inv_mpu6050_write_reg(st, st->reg->fifo_en, d); inv_reset_fifo() 87 if (result) inv_reset_fifo() 93 dev_err(&st->client->dev, "reset fifo failed %d\n", result); inv_reset_fifo() 94 result = inv_mpu6050_write_reg(st, st->reg->int_enable, inv_reset_fifo() 97 return result; inv_reset_fifo() 126 int result; inv_mpu6050_read_fifo() local 146 result = i2c_smbus_read_i2c_block_data(st->client, inv_mpu6050_read_fifo() 149 if (result != INV_MPU6050_FIFO_COUNT_BYTE) inv_mpu6050_read_fifo() 164 result = i2c_smbus_read_i2c_block_data(st->client, inv_mpu6050_read_fifo() 167 if (result != bytes_per_datum) inv_mpu6050_read_fifo() 170 result = kfifo_out(&st->timestamps, ×tamp, 1); inv_mpu6050_read_fifo() 172 if (0 == result) inv_mpu6050_read_fifo() 175 result = iio_push_to_buffers_with_timestamp(indio_dev, data, inv_mpu6050_read_fifo() 177 if (result) inv_mpu6050_read_fifo()
|
/linux-4.1.27/fs/hpfs/ |
H A D | namei.c | 31 struct inode *result; hpfs_mkdir() local 53 result = new_inode(dir->i_sb); hpfs_mkdir() 54 if (!result) hpfs_mkdir() 56 hpfs_init_inode(result); hpfs_mkdir() 57 result->i_ino = fno; hpfs_mkdir() 58 hpfs_i(result)->i_parent_dir = dir->i_ino; hpfs_mkdir() 59 hpfs_i(result)->i_dno = dno; hpfs_mkdir() 60 result->i_ctime.tv_sec = result->i_mtime.tv_sec = result->i_atime.tv_sec = local_to_gmt(dir->i_sb, le32_to_cpu(dee.creation_date)); hpfs_mkdir() 61 result->i_ctime.tv_nsec = 0; hpfs_mkdir() 62 result->i_mtime.tv_nsec = 0; hpfs_mkdir() 63 result->i_atime.tv_nsec = 0; hpfs_mkdir() 64 hpfs_i(result)->i_ea_size = 0; hpfs_mkdir() 65 result->i_mode |= S_IFDIR; hpfs_mkdir() 66 result->i_op = &hpfs_dir_iops; hpfs_mkdir() 67 result->i_fop = &hpfs_dir_ops; hpfs_mkdir() 68 result->i_blocks = 4; hpfs_mkdir() 69 result->i_size = 2048; hpfs_mkdir() 70 set_nlink(result, 2); hpfs_mkdir() 72 result->i_mode &= ~0222; hpfs_mkdir() 103 insert_inode_hash(result); hpfs_mkdir() 105 if (!uid_eq(result->i_uid, current_fsuid()) || hpfs_mkdir() 106 !gid_eq(result->i_gid, current_fsgid()) || hpfs_mkdir() 107 result->i_mode != (mode | S_IFDIR)) { hpfs_mkdir() 108 result->i_uid = current_fsuid(); hpfs_mkdir() 109 result->i_gid = current_fsgid(); hpfs_mkdir() 110 result->i_mode = mode | S_IFDIR; hpfs_mkdir() 111 hpfs_write_inode_nolock(result); hpfs_mkdir() 114 d_instantiate(dentry, result); hpfs_mkdir() 118 iput(result); hpfs_mkdir() 134 struct inode *result = NULL; hpfs_create() local 155 result = new_inode(dir->i_sb); hpfs_create() 156 if (!result) hpfs_create() 159 hpfs_init_inode(result); hpfs_create() 160 result->i_ino = fno; hpfs_create() 161 result->i_mode |= S_IFREG; hpfs_create() 162 result->i_mode &= ~0111; hpfs_create() 163 result->i_op = &hpfs_file_iops; hpfs_create() 164 result->i_fop = &hpfs_file_ops; hpfs_create() 165 set_nlink(result, 1); hpfs_create() 166 hpfs_i(result)->i_parent_dir = dir->i_ino; hpfs_create() 167 result->i_ctime.tv_sec = result->i_mtime.tv_sec = result->i_atime.tv_sec = local_to_gmt(dir->i_sb, le32_to_cpu(dee.creation_date)); hpfs_create() 168 result->i_ctime.tv_nsec = 0; hpfs_create() 169 result->i_mtime.tv_nsec = 0; hpfs_create() 170 result->i_atime.tv_nsec = 0; hpfs_create() 171 hpfs_i(result)->i_ea_size = 0; hpfs_create() 173 result->i_mode &= ~0222; hpfs_create() 174 result->i_blocks = 1; hpfs_create() 175 result->i_size = 0; hpfs_create() 176 result->i_data.a_ops = &hpfs_aops; hpfs_create() 177 hpfs_i(result)->mmu_private = 0; hpfs_create() 192 insert_inode_hash(result); hpfs_create() 194 if (!uid_eq(result->i_uid, current_fsuid()) || hpfs_create() 195 !gid_eq(result->i_gid, current_fsgid()) || hpfs_create() 196 result->i_mode != (mode | S_IFREG)) { hpfs_create() 197 result->i_uid = current_fsuid(); hpfs_create() 198 result->i_gid = current_fsgid(); hpfs_create() 199 result->i_mode = mode | S_IFREG; hpfs_create() 200 hpfs_write_inode_nolock(result); hpfs_create() 203 d_instantiate(dentry, result); hpfs_create() 208 iput(result); hpfs_create() 226 struct inode *result = NULL; hpfs_mknod() local 244 result = new_inode(dir->i_sb); hpfs_mknod() 245 if (!result) hpfs_mknod() 248 hpfs_init_inode(result); hpfs_mknod() 249 result->i_ino = fno; hpfs_mknod() 250 hpfs_i(result)->i_parent_dir = dir->i_ino; hpfs_mknod() 251 result->i_ctime.tv_sec = result->i_mtime.tv_sec = result->i_atime.tv_sec = local_to_gmt(dir->i_sb, le32_to_cpu(dee.creation_date)); hpfs_mknod() 252 result->i_ctime.tv_nsec = 0; hpfs_mknod() 253 result->i_mtime.tv_nsec = 0; hpfs_mknod() 254 result->i_atime.tv_nsec = 0; hpfs_mknod() 255 hpfs_i(result)->i_ea_size = 0; hpfs_mknod() 256 result->i_uid = current_fsuid(); hpfs_mknod() 257 result->i_gid = current_fsgid(); hpfs_mknod() 258 set_nlink(result, 1); hpfs_mknod() 259 result->i_size = 0; hpfs_mknod() 260 result->i_blocks = 1; hpfs_mknod() 261 init_special_inode(result, mode, rdev); hpfs_mknod() 275 insert_inode_hash(result); hpfs_mknod() 277 hpfs_write_inode_nolock(result); hpfs_mknod() 279 d_instantiate(dentry, result); hpfs_mknod() 284 iput(result); hpfs_mknod() 302 struct inode *result; hpfs_symlink() local 320 result = new_inode(dir->i_sb); hpfs_symlink() 321 if (!result) hpfs_symlink() 323 result->i_ino = fno; hpfs_symlink() 324 hpfs_init_inode(result); hpfs_symlink() 325 hpfs_i(result)->i_parent_dir = dir->i_ino; hpfs_symlink() 326 result->i_ctime.tv_sec = result->i_mtime.tv_sec = result->i_atime.tv_sec = local_to_gmt(dir->i_sb, le32_to_cpu(dee.creation_date)); hpfs_symlink() 327 result->i_ctime.tv_nsec = 0; hpfs_symlink() 328 result->i_mtime.tv_nsec = 0; hpfs_symlink() 329 result->i_atime.tv_nsec = 0; hpfs_symlink() 330 hpfs_i(result)->i_ea_size = 0; hpfs_symlink() 331 result->i_mode = S_IFLNK | 0777; hpfs_symlink() 332 result->i_uid = current_fsuid(); hpfs_symlink() 333 result->i_gid = current_fsgid(); hpfs_symlink() 334 result->i_blocks = 1; hpfs_symlink() 335 set_nlink(result, 1); hpfs_symlink() 336 result->i_size = strlen(symlink); hpfs_symlink() 337 result->i_op = &page_symlink_inode_operations; hpfs_symlink() 338 result->i_data.a_ops = &hpfs_symlink_aops; hpfs_symlink() 350 hpfs_set_ea(result, fnode, "SYMLINK", symlink, strlen(symlink)); hpfs_symlink() 354 insert_inode_hash(result); hpfs_symlink() 356 hpfs_write_inode_nolock(result); hpfs_symlink() 358 d_instantiate(dentry, result); hpfs_symlink() 362 iput(result); hpfs_symlink()
|
H A D | dir.c | 183 * *result to the corresponding inode. 204 struct inode *result = NULL; hpfs_lookup() local 238 result = iget_locked(dir->i_sb, ino); hpfs_lookup() 239 if (!result) { hpfs_lookup() 243 if (result->i_state & I_NEW) { hpfs_lookup() 244 hpfs_init_inode(result); hpfs_lookup() 246 hpfs_read_inode(result); hpfs_lookup() 248 hpfs_read_inode(result); hpfs_lookup() 250 result->i_mode |= S_IFREG; hpfs_lookup() 251 result->i_mode &= ~0111; hpfs_lookup() 252 result->i_op = &hpfs_file_iops; hpfs_lookup() 253 result->i_fop = &hpfs_file_ops; hpfs_lookup() 254 set_nlink(result, 1); hpfs_lookup() 256 unlock_new_inode(result); hpfs_lookup() 258 hpfs_result = hpfs_i(result); hpfs_lookup() 262 hpfs_error(result->i_sb, "ACLs or XPERM found. This is probably HPFS386. This driver doesn't support it now. Send me some info on these structures"); hpfs_lookup() 271 if (!result->i_ctime.tv_sec) { hpfs_lookup() 272 if (!(result->i_ctime.tv_sec = local_to_gmt(dir->i_sb, le32_to_cpu(de->creation_date)))) hpfs_lookup() 273 result->i_ctime.tv_sec = 1; hpfs_lookup() 274 result->i_ctime.tv_nsec = 0; hpfs_lookup() 275 result->i_mtime.tv_sec = local_to_gmt(dir->i_sb, le32_to_cpu(de->write_date)); hpfs_lookup() 276 result->i_mtime.tv_nsec = 0; hpfs_lookup() 277 result->i_atime.tv_sec = local_to_gmt(dir->i_sb, le32_to_cpu(de->read_date)); hpfs_lookup() 278 result->i_atime.tv_nsec = 0; hpfs_lookup() 281 result->i_mode &= ~0222; hpfs_lookup() 283 if (result->i_size == -1) { hpfs_lookup() 284 result->i_size = le32_to_cpu(de->file_size); hpfs_lookup() 285 result->i_data.a_ops = &hpfs_aops; hpfs_lookup() 286 hpfs_i(result)->mmu_private = result->i_size; hpfs_lookup() 293 result->i_blocks = 1 + ((result->i_size + 511) >> 9); hpfs_lookup() 307 d_add(dentry, result); hpfs_lookup()
|
/linux-4.1.27/arch/ia64/lib/ |
H A D | csum_partial_copy.c | 37 unsigned long result = (unsigned long)psum; do_csum_c() local 43 result = *buff << 8; do_csum_c() 50 result += *(unsigned short *) buff; do_csum_c() 58 result += *(unsigned int *) buff; do_csum_c() 70 result += carry; do_csum_c() 71 result += w; do_csum_c() 72 carry = (w > result); do_csum_c() 74 result += carry; do_csum_c() 75 result = (result & 0xffffffff) + (result >> 32); do_csum_c() 78 result += *(unsigned int *) buff; do_csum_c() 83 result += *(unsigned short *) buff; do_csum_c() 88 result += *buff; do_csum_c() 90 result = from64to16(result); do_csum_c() 93 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); do_csum_c() 96 return result; do_csum_c() 111 unsigned long result; csum_partial_copy_from_user() local 122 result = do_csum(dst, len); csum_partial_copy_from_user() 125 result += (__force u32)psum; csum_partial_copy_from_user() 127 result = (result & 0xffffffff) + (result >> 32); csum_partial_copy_from_user() 128 return (__force __wsum)result; csum_partial_copy_from_user()
|
H A D | checksum.c | 51 unsigned long result; csum_tcpudp_nofold() local 53 result = (__force u64)saddr + (__force u64)daddr + csum_tcpudp_nofold() 58 result = (result & 0xffffffff) + (result >> 32); csum_tcpudp_nofold() 60 result = (result & 0xffffffff) + (result >> 32); csum_tcpudp_nofold() 61 return (__force __wsum)result; csum_tcpudp_nofold() 81 u64 result = do_csum(buff, len); csum_partial() local 84 result += (__force u32)sum; csum_partial() 86 result = (result & 0xffffffff) + (result >> 32); csum_partial() 87 return (__force __wsum)result; csum_partial()
|
/linux-4.1.27/net/mpls/ |
H A D | internal.h | 31 struct mpls_shim_hdr result; mpls_entry_encode() local 32 result.label_stack_entry = mpls_entry_encode() 37 return result; mpls_entry_encode() 42 struct mpls_entry_decoded result; mpls_entry_decode() local 45 result.label = (entry & MPLS_LS_LABEL_MASK) >> MPLS_LS_LABEL_SHIFT; mpls_entry_decode() 46 result.ttl = (entry & MPLS_LS_TTL_MASK) >> MPLS_LS_TTL_SHIFT; mpls_entry_decode() 47 result.tc = (entry & MPLS_LS_TC_MASK) >> MPLS_LS_TC_SHIFT; mpls_entry_decode() 48 result.bos = (entry & MPLS_LS_S_MASK) >> MPLS_LS_S_SHIFT; mpls_entry_decode() 50 return result; mpls_entry_decode()
|
/linux-4.1.27/arch/alpha/lib/ |
H A D | checksum.c | 59 unsigned long result; csum_tcpudp_nofold() local 61 result = (__force u64)saddr + (__force u64)daddr + csum_tcpudp_nofold() 67 result = (result & 0xffffffff) + (result >> 32); csum_tcpudp_nofold() 69 result = (result & 0xffffffff) + (result >> 32); csum_tcpudp_nofold() 70 return (__force __wsum)result; csum_tcpudp_nofold() 84 unsigned long result = 0; do_csum() local 90 result = *buff << 8; do_csum() 97 result += *(unsigned short *) buff; do_csum() 105 result += *(unsigned int *) buff; do_csum() 117 result += carry; do_csum() 118 result += w; do_csum() 119 carry = (w > result); do_csum() 121 result += carry; do_csum() 122 result = (result & 0xffffffff) + (result >> 32); do_csum() 125 result += *(unsigned int *) buff; do_csum() 130 result += *(unsigned short *) buff; do_csum() 135 result += *buff; do_csum() 136 result = from64to16(result); do_csum() 138 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); do_csum() 140 return result; do_csum() 166 unsigned long result = do_csum(buff, len); csum_partial() local 169 result += (__force u32)sum; csum_partial() 171 result = (result & 0xffffffff) + (result >> 32); csum_partial() 172 return (__force __wsum)result; csum_partial()
|
/linux-4.1.27/arch/x86/lib/ |
H A D | csum-partial_64.c | 37 unsigned long result = 0; do_csum() local 40 return result; do_csum() 43 result = *buff << 8; do_csum() 50 result += *(unsigned short *)buff; do_csum() 60 result += *(unsigned int *) buff; do_csum() 80 : [res] "=r" (result) do_csum() 82 "[res]" (result)); do_csum() 92 : "=r" (result) do_csum() 94 "r" (zero), "0" (result)); do_csum() 98 result = add32_with_carry(result>>32, do_csum() 99 result&0xffffffff); do_csum() 102 result += *(unsigned int *) buff; do_csum() 107 result += *(unsigned short *) buff; do_csum() 112 result += *buff; do_csum() 113 result = add32_with_carry(result>>32, result & 0xffffffff); do_csum() 115 result = from32to16(result); do_csum() 116 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); do_csum() 118 return result; do_csum()
|
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmsmac/phy/ |
H A D | phy_qmath.c | 21 * To fit the output into 16 bits the 32 bit multiplication result is right 30 * Description: This function make 16 bit multiplication and return the result 31 * in 16 bits. To fit the multiplication result into 16 bits the multiplication 32 * result is right shifted by 15 bits. Right shifting 15 bits instead of 16 bits 39 s32 result; qm_muls16() local 41 result = 0x7fffffff; qm_muls16() 43 result = ((s32) (op1) * (s32) (op2)); qm_muls16() 45 return (s16) (result >> 15); qm_muls16() 50 * result. If the result overflow 32 bits, the output will be saturated to 55 s32 result; qm_add32() local 56 result = op1 + op2; qm_add32() 57 if (op1 < 0 && op2 < 0 && result > 0) qm_add32() 58 result = 0x80000000; qm_add32() 59 else if (op1 > 0 && op2 > 0 && result < 0) qm_add32() 60 result = 0x7fffffff; qm_add32() 62 return result; qm_add32() 67 * result. If the result overflow 16 bits, the output will be saturated to 72 s16 result; qm_add16() local 75 result = (s16) 0x7fff; qm_add16() 77 result = (s16) 0xffff8000; qm_add16() 79 result = (s16) temp; qm_add16() 81 return result; qm_add16() 86 * result. If the result overflow 16 bits, the output will be saturated to 91 s16 result; qm_sub16() local 94 result = (s16) 0x7fff; qm_sub16() 96 result = (s16) 0xffff8000; qm_sub16() 98 result = (s16) temp; qm_sub16() 100 return result; qm_sub16() 106 * the specified shift is -ve. This function return the result after shifting 112 s32 result; qm_shl32() local 113 result = op; qm_shl32() 120 result = qm_add32(result, result); qm_shl32() 122 result = result >> (-shift); qm_shl32() 125 return result; qm_shl32() 131 * the specified shift is -ve. This function return the result after shifting 137 s16 result; qm_shl16() local 138 result = op; qm_shl16() 145 result = qm_add16(result, result); qm_shl16() 147 result = result >> (-shift); qm_shl16() 150 return result; qm_shl16() 156 * function return the result of the shift operation. 291 /* normalize the result. */ qm_log10() 304 /* write the q format of the result. */ qm_log10()
|
/linux-4.1.27/drivers/uwb/i1480/dfu/ |
H A D | mac.c | 111 int result; fw_hdrs_load() local 116 result = -EINVAL; fw_hdrs_load() 126 result = -ENOMEM; fw_hdrs_load() 133 result = fw_hdr_load(i1480, hdr, hdr_cnt, fw_hdrs_load() 135 if (result < 0) fw_hdrs_load() 150 return result; fw_hdrs_load() 169 ssize_t result = 0; i1480_fw_cmp() local 177 result = i1480->read(i1480, hdr->address + src_itr, chunk_size); i1480_fw_cmp() 178 if (result < 0) { i1480_fw_cmp() 180 "%zd\n", result); i1480_fw_cmp() 183 if (memcmp(i1480->cmd_buf, bin + src_itr, result)) { i1480_fw_cmp() 185 for (cnt = 0; cnt < result; cnt++) i1480_fw_cmp() 191 result = src_itr + cnt + 1; i1480_fw_cmp() 195 src_itr += result; i1480_fw_cmp() 196 size -= result; i1480_fw_cmp() 198 result = 0; i1480_fw_cmp() 201 return result; i1480_fw_cmp() 217 ssize_t result = 0; mac_fw_hdrs_push() local 228 result = i1480->write(i1480, hdr_itr->address, hdr_itr->bin, mac_fw_hdrs_push() 230 if (result < 0) { mac_fw_hdrs_push() 234 hdr_itr->address, result); mac_fw_hdrs_push() 237 result = i1480_fw_cmp(i1480, hdr_itr); mac_fw_hdrs_push() 238 if (result < 0) { mac_fw_hdrs_push() 243 hdr_itr->address, result); mac_fw_hdrs_push() 246 if (result > 0) { /* Offset where it failed + 1 */ mac_fw_hdrs_push() 247 result--; mac_fw_hdrs_push() 250 fw_tag, fw_name, hdr_itr->address + result); mac_fw_hdrs_push() 255 hdr_itr->address + result, verif_retry_count); mac_fw_hdrs_push() 256 result = -EINVAL; mac_fw_hdrs_push() 260 return result; mac_fw_hdrs_push() 268 int result; mac_fw_upload_enable() local 274 result = i1480->read(i1480, reg, sizeof(u32)); mac_fw_upload_enable() 275 if (result < 0) mac_fw_upload_enable() 278 result = i1480->write(i1480, reg, buffer, sizeof(u32)); mac_fw_upload_enable() 279 if (result < 0) mac_fw_upload_enable() 283 dev_err(i1480->dev, "can't enable fw upload mode: %d\n", result); mac_fw_upload_enable() 284 return result; mac_fw_upload_enable() 292 int result; mac_fw_upload_disable() local 298 result = i1480->read(i1480, reg, sizeof(u32)); mac_fw_upload_disable() 299 if (result < 0) mac_fw_upload_disable() 302 result = i1480->write(i1480, reg, buffer, sizeof(u32)); mac_fw_upload_disable() 303 if (result < 0) mac_fw_upload_disable() 307 dev_err(i1480->dev, "can't disable fw upload mode: %d\n", result); mac_fw_upload_disable() 308 return result; mac_fw_upload_disable() 328 int result; __mac_fw_upload() local 332 result = request_firmware(&fw, fw_name, i1480->dev); __mac_fw_upload() 333 if (result < 0) /* Up to caller to complain on -ENOENT */ __mac_fw_upload() 335 result = fw_hdrs_load(i1480, &fw_hdrs, fw->data, fw->size); __mac_fw_upload() 336 if (result < 0) { __mac_fw_upload() 338 "file: %d\n", fw_tag, fw_name, result); __mac_fw_upload() 341 result = mac_fw_upload_enable(i1480); __mac_fw_upload() 342 if (result < 0) __mac_fw_upload() 344 result = mac_fw_hdrs_push(i1480, fw_hdrs, fw_name, fw_tag); __mac_fw_upload() 347 if (result >= 0) __mac_fw_upload() 351 "power cycle device\n", fw_tag, fw_name, result); __mac_fw_upload() 356 return result; __mac_fw_upload() 366 int result; i1480_pre_fw_upload() local 367 result = __mac_fw_upload(i1480, i1480->pre_fw_name, "PRE"); i1480_pre_fw_upload() 368 if (result == 0) i1480_pre_fw_upload() 370 return result; i1480_pre_fw_upload() 390 int result; i1480_cmd_reset() local 397 result = -ENOMEM; i1480_cmd_reset() 402 result = i1480_cmd(i1480, "RESET", sizeof(*cmd), sizeof(*reply)); i1480_cmd_reset() 403 if (result < 0) i1480_cmd_reset() 408 result = -EIO; i1480_cmd_reset() 411 return result; i1480_cmd_reset() 421 int result; i1480_fw_is_running_q() local 426 result = i1480->read(i1480, 0x80080000, 4); i1480_fw_is_running_q() 427 if (result < 0) { i1480_fw_is_running_q() 428 dev_err(i1480->dev, "Can't read 0x8008000: %d\n", result); i1480_fw_is_running_q() 435 result = -ETIMEDOUT; i1480_fw_is_running_q() 437 return result; i1480_fw_is_running_q() 453 int result = 0, deprecated_name = 0; i1480_mac_fw_upload() local 456 result = __mac_fw_upload(i1480, i1480->mac_fw_name, "MAC"); i1480_mac_fw_upload() 457 if (result == -ENOENT) { i1480_mac_fw_upload() 458 result = __mac_fw_upload(i1480, i1480->mac_fw_name_deprecate, i1480_mac_fw_upload() 462 if (result < 0) i1480_mac_fw_upload() 463 return result; i1480_mac_fw_upload() 469 result = i1480_fw_is_running_q(i1480); i1480_mac_fw_upload() 470 if (result < 0) i1480_mac_fw_upload() 472 result = i1480->rc_setup ? i1480->rc_setup(i1480) : 0; i1480_mac_fw_upload() 473 if (result < 0) { i1480_mac_fw_upload() 475 result); i1480_mac_fw_upload() 478 result = i1480->wait_init_done(i1480); /* wait init'on */ i1480_mac_fw_upload() 479 if (result < 0) { i1480_mac_fw_upload() 481 "(%d)\n", i1480->mac_fw_name, result); i1480_mac_fw_upload() 491 result = -EIO; i1480_mac_fw_upload() 501 result = i1480_cmd_reset(i1480); i1480_mac_fw_upload() 502 if (result < 0) i1480_mac_fw_upload() 504 i1480->mac_fw_name, result); i1480_mac_fw_upload() 509 return result; i1480_mac_fw_upload()
|
H A D | dfu.c | 56 int result = 0; i1480_rceb_check() local 63 result = -EINVAL; i1480_rceb_check() 70 result = -EINVAL; i1480_rceb_check() 77 result = -EINVAL; i1480_rceb_check() 79 return result; i1480_rceb_check() 95 ssize_t result; i1480_cmd() local 108 result = i1480->cmd(i1480, cmd_name, cmd_size); i1480_cmd() 109 if (result < 0) i1480_cmd() 112 result = wait_for_completion_interruptible_timeout( i1480_cmd() 114 if (result == 0) { i1480_cmd() 115 result = -ETIMEDOUT; i1480_cmd() 118 if (result < 0) i1480_cmd() 120 result = i1480->evt_result; i1480_cmd() 121 if (result < 0) { i1480_cmd() 123 cmd_name, result); i1480_cmd() 135 result = i1480->wait_init_done(i1480); i1480_cmd() 136 if (result < 0) i1480_cmd() 138 result = i1480->evt_result; i1480_cmd() 140 if (result != reply_size) { i1480_cmd() 142 cmd_name, result, reply_size); i1480_cmd() 143 result = -EINVAL; i1480_cmd() 147 result = i1480_rceb_check(i1480, i1480->evt_buf, cmd_name, context, i1480_cmd() 150 return result; i1480_cmd() 158 int result; i1480_print_state() local 161 result = i1480->read(i1480, 0x80080000, 2 * sizeof(*buf)); i1480_print_state() 162 if (result < 0) { i1480_print_state() 163 dev_err(i1480->dev, "cannot read U & L states: %d\n", result); i1480_print_state() 168 return result; i1480_print_state() 179 int result; i1480_fw_upload() local 181 result = i1480_pre_fw_upload(i1480); /* PHY pre fw */ i1480_fw_upload() 182 if (result < 0 && result != -ENOENT) { i1480_fw_upload() 186 result = i1480_mac_fw_upload(i1480); /* MAC fw */ i1480_fw_upload() 187 if (result < 0) { i1480_fw_upload() 188 if (result == -ENOENT) i1480_fw_upload() 195 result = i1480_phy_fw_upload(i1480); /* PHY fw */ i1480_fw_upload() 196 if (result < 0 && result != -ENOENT) { i1480_fw_upload() 208 result = 0; i1480_fw_upload() 210 return result; i1480_fw_upload()
|
H A D | usb.c | 66 int result = -ENOMEM; i1480_usb_create() local 80 return result; i1480_usb_create() 113 int result = 0; i1480_usb_write() local 121 result = usb_control_msg( i1480_usb_write() 126 if (result < 0) i1480_usb_write() 128 itr += result; i1480_usb_write() 129 memory_address += result; i1480_usb_write() 130 size -= result; i1480_usb_write() 132 return result; i1480_usb_write() 152 ssize_t result = 0, bytes = 0; i1480_usb_read() local 166 result = usb_control_msg( i1480_usb_read() 172 if (result < 0) { i1480_usb_read() 174 __func__, result); i1480_usb_read() 177 if (result != itr_size) { i1480_usb_read() 178 result = -EIO; i1480_usb_read() 181 __func__, result, itr_size); i1480_usb_read() 184 bytes += result; i1480_usb_read() 186 result = bytes; i1480_usb_read() 188 return result; i1480_usb_read() 230 * Set i1480->evt_result with the result of getting the event or its 238 int result; i1480_usb_wait_init_done() local 250 result = usb_submit_urb(i1480_usb->neep_urb, GFP_KERNEL); i1480_usb_wait_init_done() 251 if (result < 0) { i1480_usb_wait_init_done() 253 result); i1480_usb_wait_init_done() 257 result = wait_for_completion_interruptible_timeout( i1480_usb_wait_init_done() 259 if (result <= 0) { i1480_usb_wait_init_done() 260 result = result == 0 ? -ETIMEDOUT : result; i1480_usb_wait_init_done() 269 i1480->evt_result = result; i1480_usb_wait_init_done() 270 return result; i1480_usb_wait_init_done() 293 int result; i1480_usb_cmd() local 308 result = usb_submit_urb(i1480_usb->neep_urb, GFP_KERNEL); i1480_usb_cmd() 309 if (result < 0) { i1480_usb_cmd() 311 cmd_name, result); i1480_usb_cmd() 315 result = usb_control_msg( i1480_usb_cmd() 322 if (result < 0) { i1480_usb_cmd() 324 cmd_name, result); i1480_usb_cmd() 327 return result; i1480_usb_cmd() 332 return result; i1480_usb_cmd() 347 int result; i1480_usb_probe() local 349 result = -ENODEV; i1480_usb_probe() 358 result = usb_set_interface(interface_to_usbdev(iface), 0, 1); i1480_usb_probe() 359 if (result < 0) i1480_usb_probe() 362 result); i1480_usb_probe() 365 result = -ENOMEM; i1480_usb_probe() 378 result = -ENOMEM; i1480_usb_probe() 383 result = i1480_usb_create(i1480_usb, iface); i1480_usb_probe() 384 if (result < 0) { i1480_usb_probe() 385 dev_err(dev, "Cannot create instance: %d\n", result); i1480_usb_probe() 401 result = i1480_fw_upload(&i1480_usb->i1480); /* the real thing */ i1480_usb_probe() 402 if (result >= 0) { i1480_usb_probe() 404 result = -ENODEV; /* we don't want to bind to the iface */ i1480_usb_probe() 412 return result; i1480_usb_probe()
|
H A D | phy.c | 54 int result; i1480_mpi_write() local 59 result = -ENOMEM; i1480_mpi_write() 66 result = i1480_cmd(i1480, "MPI-WRITE", sizeof(*cmd) + size, sizeof(*reply)); i1480_mpi_write() 67 if (result < 0) i1480_mpi_write() 72 result = -EIO; i1480_mpi_write() 75 return result; i1480_mpi_write() 92 * rearrange the result. 102 int result; i1480_mpi_read() local 111 result = -ENOMEM; i1480_mpi_read() 121 result = i1480_cmd(i1480, "MPI-READ", sizeof(*cmd) + 2*size, i1480_mpi_read() 123 if (result < 0) i1480_mpi_read() 128 result = -EIO; i1480_mpi_read() 142 result = 0; i1480_mpi_read() 144 return result; i1480_mpi_read() 164 int result; i1480_phy_fw_upload() local 171 result = request_firmware(&fw, i1480->phy_fw_name, i1480->dev); i1480_phy_fw_upload() 172 if (result < 0) i1480_phy_fw_upload() 178 result = i1480_mpi_write(i1480, data_itr, data_size); i1480_phy_fw_upload() 179 if (result < 0) i1480_phy_fw_upload() 183 result = i1480_mpi_read(i1480, &phy_stat, 0x0006, 1); i1480_phy_fw_upload() 184 if (result < 0) { i1480_phy_fw_upload() 185 dev_err(i1480->dev, "PHY: can't get status: %d\n", result); i1480_phy_fw_upload() 189 result = -ENODEV; i1480_phy_fw_upload() 198 if (result < 0) i1480_phy_fw_upload() 200 "power cycle device\n", i1480->phy_fw_name, result); i1480_phy_fw_upload() 202 return result; i1480_phy_fw_upload()
|
/linux-4.1.27/arch/powerpc/platforms/ps3/ |
H A D | repository.c | 124 int result; read_node() local 134 result = lv1_read_repository_node(lpar_id, n1, n2, n3, n4, &v1, read_node() 137 if (result) { read_node() 139 __func__, __LINE__, ps3_result(result)); read_node() 173 int result; ps3_repository_read_bus_id() local 175 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_bus_id() 180 return result; ps3_repository_read_bus_id() 186 int result; ps3_repository_read_bus_type() local 189 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_bus_type() 195 return result; ps3_repository_read_bus_type() 201 int result; ps3_repository_read_bus_num_dev() local 204 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_bus_num_dev() 210 return result; ps3_repository_read_bus_num_dev() 227 int result; ps3_repository_read_dev_id() local 229 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_dev_id() 235 return result; ps3_repository_read_dev_id() 241 int result; ps3_repository_read_dev_type() local 244 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_dev_type() 251 return result; ps3_repository_read_dev_type() 258 int result; ps3_repository_read_dev_intr() local 262 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_dev_intr() 270 return result; ps3_repository_read_dev_intr() 277 int result; ps3_repository_read_dev_reg_type() local 280 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_dev_reg_type() 287 return result; ps3_repository_read_dev_reg_type() 305 int result = ps3_repository_read_dev_reg_type(bus_index, dev_index, ps3_repository_read_dev_reg() local 307 return result ? result ps3_repository_read_dev_reg() 316 int result; ps3_repository_find_device() local 323 result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev); ps3_repository_find_device() 325 if (result) { ps3_repository_find_device() 327 return result; ps3_repository_find_device() 339 result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index, ps3_repository_find_device() 342 if (result) { ps3_repository_find_device() 344 return result; ps3_repository_find_device() 347 result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index, ps3_repository_find_device() 350 if (result) { ps3_repository_find_device() 353 return result; ps3_repository_find_device() 366 int result = -ENODEV; ps3_repository_find_device_by_id() local 374 result = ps3_repository_read_bus_id(tmp.bus_index, ps3_repository_find_device_by_id() 376 if (result) { ps3_repository_find_device_by_id() 379 return result; ps3_repository_find_device_by_id() 389 return result; ps3_repository_find_device_by_id() 392 result = ps3_repository_read_bus_type(tmp.bus_index, &tmp.bus_type); ps3_repository_find_device_by_id() 393 if (result) { ps3_repository_find_device_by_id() 396 return result; ps3_repository_find_device_by_id() 399 result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev); ps3_repository_find_device_by_id() 400 if (result) { ps3_repository_find_device_by_id() 403 return result; ps3_repository_find_device_by_id() 407 result = ps3_repository_read_dev_id(tmp.bus_index, ps3_repository_find_device_by_id() 410 if (result) { ps3_repository_find_device_by_id() 413 return result; ps3_repository_find_device_by_id() 423 return result; ps3_repository_find_device_by_id() 426 result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index, ps3_repository_find_device_by_id() 428 if (result) { ps3_repository_find_device_by_id() 430 return result; ps3_repository_find_device_by_id() 443 int result = 0; ps3_repository_find_devices() local 449 result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index); ps3_repository_find_devices() 450 if (result) { ps3_repository_find_devices() 452 return result; ps3_repository_find_devices() 455 result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id); ps3_repository_find_devices() 456 if (result) { ps3_repository_find_devices() 459 return result; ps3_repository_find_devices() 463 result = ps3_repository_find_device(&repo); ps3_repository_find_devices() 464 if (result == -ENODEV) { ps3_repository_find_devices() 465 result = 0; ps3_repository_find_devices() 467 } else if (result) ps3_repository_find_devices() 470 result = callback(&repo); ps3_repository_find_devices() 471 if (result) { ps3_repository_find_devices() 479 return result; ps3_repository_find_devices() 509 int result = 0; ps3_repository_find_interrupt() local 520 result = ps3_repository_read_dev_intr(repo->bus_index, ps3_repository_find_interrupt() 523 if (result) { ps3_repository_find_interrupt() 526 return result; ps3_repository_find_interrupt() 541 return result; ps3_repository_find_interrupt() 547 int result = 0; ps3_repository_find_reg() local 559 result = ps3_repository_read_dev_reg(repo->bus_index, ps3_repository_find_reg() 562 if (result) { ps3_repository_find_reg() 565 return result; ps3_repository_find_reg() 581 return result; ps3_repository_find_reg() 617 int result; ps3_repository_read_stor_dev_num_regions() local 620 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_stor_dev_num_regions() 626 return result; ps3_repository_read_stor_dev_num_regions() 633 int result; ps3_repository_read_stor_dev_region_id() local 636 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_stor_dev_region_id() 643 return result; ps3_repository_read_stor_dev_region_id() 672 int result; ps3_repository_read_stor_dev_info() local 674 result = ps3_repository_read_stor_dev_port(bus_index, dev_index, port); ps3_repository_read_stor_dev_info() 675 if (result) ps3_repository_read_stor_dev_info() 676 return result; ps3_repository_read_stor_dev_info() 678 result = ps3_repository_read_stor_dev_blk_size(bus_index, dev_index, ps3_repository_read_stor_dev_info() 680 if (result) ps3_repository_read_stor_dev_info() 681 return result; ps3_repository_read_stor_dev_info() 683 result = ps3_repository_read_stor_dev_num_blocks(bus_index, dev_index, ps3_repository_read_stor_dev_info() 685 if (result) ps3_repository_read_stor_dev_info() 686 return result; ps3_repository_read_stor_dev_info() 688 result = ps3_repository_read_stor_dev_num_regions(bus_index, dev_index, ps3_repository_read_stor_dev_info() 690 return result; ps3_repository_read_stor_dev_info() 697 int result; ps3_repository_read_stor_dev_region() local 699 result = ps3_repository_read_stor_dev_region_id(bus_index, dev_index, ps3_repository_read_stor_dev_region() 701 if (result) ps3_repository_read_stor_dev_region() 702 return result; ps3_repository_read_stor_dev_region() 704 result = ps3_repository_read_stor_dev_region_start(bus_index, dev_index, ps3_repository_read_stor_dev_region() 706 if (result) ps3_repository_read_stor_dev_region() 707 return result; ps3_repository_read_stor_dev_region() 709 result = ps3_repository_read_stor_dev_region_size(bus_index, dev_index, ps3_repository_read_stor_dev_region() 711 return result; ps3_repository_read_stor_dev_region() 771 int result; ps3_repository_read_mm_info() local 776 result = ps3_repository_read_rm_size(ppe_id, rm_size); ps3_repository_read_mm_info() 777 return result ? result ps3_repository_read_mm_info() 790 int result; ps3_repository_read_highmem_region_count() local 793 result = read_node(PS3_LPAR_ID_CURRENT, ps3_repository_read_highmem_region_count() 800 return result; ps3_repository_read_highmem_region_count() 839 int result; ps3_repository_read_highmem_info() local 842 result = ps3_repository_read_highmem_base(region_index, highmem_base); ps3_repository_read_highmem_info() 843 return result ? result ps3_repository_read_highmem_info() 854 int result; ps3_repository_read_num_spu_reserved() local 857 result = read_node(PS3_LPAR_ID_CURRENT, ps3_repository_read_num_spu_reserved() 863 return result; ps3_repository_read_num_spu_reserved() 873 int result; ps3_repository_read_num_spu_resource_id() local 876 result = read_node(PS3_LPAR_ID_CURRENT, ps3_repository_read_num_spu_resource_id() 882 return result; ps3_repository_read_num_spu_resource_id() 895 int result; ps3_repository_read_spu_resource_id() local 899 result = read_node(PS3_LPAR_ID_CURRENT, ps3_repository_read_spu_resource_id() 907 return result; ps3_repository_read_spu_resource_id() 922 int result; ps3_repository_read_boot_dat_size() local 925 result = read_node(PS3_LPAR_ID_CURRENT, ps3_repository_read_boot_dat_size() 932 return result; ps3_repository_read_boot_dat_size() 937 int result; ps3_repository_read_vuart_av_port() local 940 result = read_node(PS3_LPAR_ID_CURRENT, ps3_repository_read_vuart_av_port() 947 return result; ps3_repository_read_vuart_av_port() 952 int result; ps3_repository_read_vuart_sysmgr_port() local 955 result = read_node(PS3_LPAR_ID_CURRENT, ps3_repository_read_vuart_sysmgr_port() 962 return result; ps3_repository_read_vuart_sysmgr_port() 973 int result; ps3_repository_read_boot_dat_info() local 976 result = ps3_repository_read_boot_dat_address(lpar_addr); ps3_repository_read_boot_dat_info() 977 return result ? result ps3_repository_read_boot_dat_info() 987 int result; ps3_repository_read_num_be() local 990 result = read_node(PS3_LPAR_ID_PME, ps3_repository_read_num_be() 997 return result; ps3_repository_read_num_be() 1044 int result; ps3_repository_read_be_tb_freq() local 1048 result = ps3_repository_read_be_node_id(be_index, &node_id); ps3_repository_read_be_tb_freq() 1049 return result ? result ps3_repository_read_be_tb_freq() 1056 int result; ps3_repository_read_lpm_privileges() local 1061 result = ps3_repository_read_be_node_id(be_index, &node_id); ps3_repository_read_lpm_privileges() 1062 return result ? result ps3_repository_read_lpm_privileges() 1075 int result; create_node() local 1079 result = lv1_create_repository_node(n1, n2, n3, n4, v1, v2); create_node() 1081 if (result) { create_node() 1083 __func__, __LINE__, ps3_result(result)); create_node() 1092 int result; delete_node() local 1096 result = lv1_delete_repository_node(n1, n2, n3, n4); delete_node() 1098 if (result) { delete_node() 1100 __func__, __LINE__, ps3_result(result)); delete_node() 1109 int result; write_node() local 1111 result = create_node(n1, n2, n3, n4, v1, v2); write_node() 1113 if (!result) write_node() 1116 result = lv1_write_repository_node(n1, n2, n3, n4, v1, v2); write_node() 1118 if (result) { write_node() 1120 __func__, __LINE__, ps3_result(result)); write_node() 1129 int result; ps3_repository_write_highmem_region_count() local 1132 result = write_node( ps3_repository_write_highmem_region_count() 1138 return result; ps3_repository_write_highmem_region_count() 1166 int result; ps3_repository_write_highmem_info() local 1168 result = ps3_repository_write_highmem_base(region_index, highmem_base); ps3_repository_write_highmem_info() 1169 return result ? result ps3_repository_write_highmem_info() 1193 int result; ps3_repository_delete_highmem_info() local 1195 result = ps3_repository_delete_highmem_base(region_index); ps3_repository_delete_highmem_info() 1196 result += ps3_repository_delete_highmem_size(region_index); ps3_repository_delete_highmem_info() 1198 return result ? -1 : 0; ps3_repository_delete_highmem_info() 1207 int result = 0; ps3_repository_dump_resource_info() local 1217 result = ps3_repository_read_dev_intr(repo->bus_index, ps3_repository_dump_resource_info() 1220 if (result) { ps3_repository_dump_resource_info() 1221 if (result != LV1_NO_ENTRY) ps3_repository_dump_resource_info() 1238 result = ps3_repository_read_dev_reg(repo->bus_index, ps3_repository_dump_resource_info() 1241 if (result) { ps3_repository_dump_resource_info() 1242 if (result != LV1_NO_ENTRY) ps3_repository_dump_resource_info() 1255 return result; ps3_repository_dump_resource_info() 1260 int result = 0; dump_stor_dev_info() local 1267 result = ps3_repository_read_stor_dev_info(repo->bus_index, dump_stor_dev_info() 1269 if (result) { dump_stor_dev_info() 1285 result = ps3_repository_read_stor_dev_region(repo->bus_index, dump_stor_dev_info() 1288 if (result) { dump_stor_dev_info() 1303 return result; dump_stor_dev_info() 1309 int result = 0; dump_device_info() local 1316 result = ps3_repository_read_dev_type(repo->bus_index, dump_device_info() 1319 if (result) { dump_device_info() 1326 result = ps3_repository_read_dev_id(repo->bus_index, dump_device_info() 1329 if (result) { dump_device_info() 1347 return result; dump_device_info() 1352 int result = 0; ps3_repository_dump_bus_info() local 1362 result = ps3_repository_read_bus_type(repo.bus_index, ps3_repository_dump_bus_info() 1365 if (result) { ps3_repository_dump_bus_info() 1371 result = ps3_repository_read_bus_id(repo.bus_index, ps3_repository_dump_bus_info() 1374 if (result) { ps3_repository_dump_bus_info() 1384 result = ps3_repository_read_bus_num_dev(repo.bus_index, ps3_repository_dump_bus_info() 1387 if (result) { ps3_repository_dump_bus_info() 1401 return result; ps3_repository_dump_bus_info()
|
H A D | device-init.c | 37 int result; ps3_register_lpm_devices() local 53 result = ps3_repository_read_be_node_id(0, &dev->lpm.node_id); ps3_register_lpm_devices() 55 if (result) { ps3_register_lpm_devices() 61 result = ps3_repository_read_lpm_privileges(dev->lpm.node_id, &tmp1, ps3_register_lpm_devices() 64 if (result) { ps3_register_lpm_devices() 75 result = -ENODEV; ps3_register_lpm_devices() 82 result = -EPERM; ps3_register_lpm_devices() 90 result = ps3_repository_read_pu_id(0, &dev->lpm.pu_id); ps3_register_lpm_devices() 92 if (result) { ps3_register_lpm_devices() 98 result = ps3_system_bus_device_register(dev); ps3_register_lpm_devices() 100 if (result) { ps3_register_lpm_devices() 115 return result; ps3_register_lpm_devices() 128 int result; ps3_setup_gelic_device() local 142 result = -ENOMEM; ps3_setup_gelic_device() 152 result = ps3_repository_find_interrupt(repo, ps3_setup_gelic_device() 155 if (result) { ps3_setup_gelic_device() 163 result = ps3_dma_region_init(&p->dev, p->dev.d_region, PS3_DMA_64K, ps3_setup_gelic_device() 166 if (result) { ps3_setup_gelic_device() 172 result = ps3_system_bus_device_register(&p->dev); ps3_setup_gelic_device() 174 if (result) { ps3_setup_gelic_device() 181 return result; ps3_setup_gelic_device() 189 return result; ps3_setup_gelic_device() 196 int result; ps3_setup_uhc_device() local 213 result = -ENOMEM; ps3_setup_uhc_device() 224 result = ps3_repository_find_interrupt(repo, ps3_setup_uhc_device() 227 if (result) { ps3_setup_uhc_device() 233 result = ps3_repository_find_reg(repo, reg_type, ps3_setup_uhc_device() 236 if (result) { ps3_setup_uhc_device() 242 result = ps3_dma_region_init(&p->dev, p->dev.d_region, PS3_DMA_64K, ps3_setup_uhc_device() 245 if (result) { ps3_setup_uhc_device() 251 result = ps3_mmio_region_init(&p->dev, p->dev.m_region, bus_addr, len, ps3_setup_uhc_device() 254 if (result) { ps3_setup_uhc_device() 260 result = ps3_system_bus_device_register(&p->dev); ps3_setup_uhc_device() 262 if (result) { ps3_setup_uhc_device() 269 return result; ps3_setup_uhc_device() 279 return result; ps3_setup_uhc_device() 299 int result; ps3_setup_vuart_device() local 316 result = ps3_system_bus_device_register(&p->dev); ps3_setup_vuart_device() 318 if (result) { ps3_setup_vuart_device() 329 return result; ps3_setup_vuart_device() 335 int result; ps3_setup_storage_dev() local 342 result = ps3_repository_read_stor_dev_info(repo->bus_index, ps3_setup_storage_dev() 346 if (result) { ps3_setup_storage_dev() 348 __func__, __LINE__, result); ps3_setup_storage_dev() 361 result = -ENOMEM; ps3_setup_storage_dev() 373 result = ps3_repository_find_interrupt(repo, ps3_setup_storage_dev() 376 if (result) { ps3_setup_storage_dev() 378 __LINE__, result); ps3_setup_storage_dev() 379 result = -ENODEV; ps3_setup_storage_dev() 387 result = ps3_repository_read_stor_dev_region(repo->bus_index, ps3_setup_storage_dev() 391 if (result) { ps3_setup_storage_dev() 394 __func__, __LINE__, result); ps3_setup_storage_dev() 395 result = -ENODEV; ps3_setup_storage_dev() 406 result = ps3_system_bus_device_register(&p->sbd); ps3_setup_storage_dev() 407 if (result) { ps3_setup_storage_dev() 422 return result; ps3_setup_storage_dev() 427 int result; ps3_register_vuart_devices() local 432 result = ps3_repository_read_vuart_av_port(&port_number); ps3_register_vuart_devices() 433 if (result) ps3_register_vuart_devices() 436 result = ps3_setup_vuart_device(PS3_MATCH_ID_AV_SETTINGS, port_number); ps3_register_vuart_devices() 437 WARN_ON(result); ps3_register_vuart_devices() 439 result = ps3_repository_read_vuart_sysmgr_port(&port_number); ps3_register_vuart_devices() 440 if (result) ps3_register_vuart_devices() 443 result = ps3_setup_vuart_device(PS3_MATCH_ID_SYSTEM_MANAGER, ps3_register_vuart_devices() 445 WARN_ON(result); ps3_register_vuart_devices() 448 return result; ps3_register_vuart_devices() 453 int result; ps3_register_sound_devices() local 471 result = ps3_system_bus_device_register(&p->dev); ps3_register_sound_devices() 473 if (result) { ps3_register_sound_devices() 484 return result; ps3_register_sound_devices() 489 int result; ps3_register_graphics_devices() local 505 result = ps3_system_bus_device_register(&p->dev); ps3_register_graphics_devices() 507 if (result) { ps3_register_graphics_devices() 519 return result; ps3_register_graphics_devices() 524 int result; ps3_register_ramdisk_device() local 540 result = ps3_system_bus_device_register(&p->dev); ps3_register_ramdisk_device() 542 if (result) { ps3_register_ramdisk_device() 554 return result; ps3_register_ramdisk_device() 563 int result; ps3_setup_dynamic_device() local 567 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_DISK); ps3_setup_dynamic_device() 570 if (result == -ENODEV) { ps3_setup_dynamic_device() 571 result = 0; ps3_setup_dynamic_device() 576 if (result) ps3_setup_dynamic_device() 582 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_ROM); ps3_setup_dynamic_device() 583 if (result) ps3_setup_dynamic_device() 589 result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_FLASH); ps3_setup_dynamic_device() 590 if (result) ps3_setup_dynamic_device() 596 result = 0; ps3_setup_dynamic_device() 601 return result; ps3_setup_dynamic_device() 610 int result; ps3_setup_static_device() local 614 result = ps3_setup_gelic_device(repo); ps3_setup_static_device() 615 if (result) { ps3_setup_static_device() 624 result = ps3_setup_ehci_device(repo); ps3_setup_static_device() 626 if (result) { ps3_setup_static_device() 631 result = ps3_setup_ohci_device(repo); ps3_setup_static_device() 633 if (result) { ps3_setup_static_device() 643 return result; ps3_setup_static_device() 914 int result; ps3_start_probe_thread() local 924 result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index); ps3_start_probe_thread() 926 if (result) { ps3_start_probe_thread() 927 printk(KERN_ERR "%s: Cannot find bus (%d)\n", __func__, result); ps3_start_probe_thread() 931 result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id); ps3_start_probe_thread() 933 if (result) { ps3_start_probe_thread() 935 result); ps3_start_probe_thread() 943 result = PTR_ERR(task); ps3_start_probe_thread() 945 result); ps3_start_probe_thread() 946 return result; ps3_start_probe_thread() 964 int result; ps3_register_devices() local 973 result = ps3_start_probe_thread(PS3_BUS_TYPE_STORAGE); ps3_register_devices()
|
H A D | interrupt.c | 183 int result; ps3_virq_setup() local 198 result = -ENOMEM; ps3_virq_setup() 205 result = irq_set_chip_data(*virq, pd); ps3_virq_setup() 207 if (result) { ps3_virq_setup() 215 return result; ps3_virq_setup() 220 return result; ps3_virq_setup() 257 int result; ps3_irq_plug_setup() local 260 result = ps3_virq_setup(cpu, outlet, virq); ps3_irq_plug_setup() 262 if (result) { ps3_irq_plug_setup() 271 result = lv1_connect_irq_plug_ext(pd->ppe_id, pd->thread_id, *virq, ps3_irq_plug_setup() 274 if (result) { ps3_irq_plug_setup() 276 __func__, __LINE__, ps3_result(result)); ps3_irq_plug_setup() 277 result = -EPERM; ps3_irq_plug_setup() 281 return result; ps3_irq_plug_setup() 286 return result; ps3_irq_plug_setup() 301 int result; ps3_irq_plug_destroy() local 309 result = lv1_disconnect_irq_plug_ext(pd->ppe_id, pd->thread_id, virq); ps3_irq_plug_destroy() 311 if (result) ps3_irq_plug_destroy() 313 __func__, __LINE__, ps3_result(result)); ps3_irq_plug_destroy() 317 return result; ps3_irq_plug_destroy() 334 int result; ps3_event_receive_port_setup() local 337 result = lv1_construct_event_receive_port(&outlet); ps3_event_receive_port_setup() 339 if (result) { ps3_event_receive_port_setup() 341 __func__, __LINE__, ps3_result(result)); ps3_event_receive_port_setup() 343 return result; ps3_event_receive_port_setup() 346 result = ps3_irq_plug_setup(cpu, outlet, virq); ps3_event_receive_port_setup() 347 BUG_ON(result); ps3_event_receive_port_setup() 349 return result; ps3_event_receive_port_setup() 364 int result; ps3_event_receive_port_destroy() local 370 result = lv1_destruct_event_receive_port(virq_to_hw(virq)); ps3_event_receive_port_destroy() 372 if (result) ps3_event_receive_port_destroy() 374 __func__, __LINE__, ps3_result(result)); ps3_event_receive_port_destroy() 382 return result; ps3_event_receive_port_destroy() 406 int result; ps3_sb_event_receive_port_setup() local 408 result = ps3_event_receive_port_setup(cpu, virq); ps3_sb_event_receive_port_setup() 410 if (result) ps3_sb_event_receive_port_setup() 411 return result; ps3_sb_event_receive_port_setup() 413 result = lv1_connect_interrupt_event_receive_port(dev->bus_id, ps3_sb_event_receive_port_setup() 416 if (result) { ps3_sb_event_receive_port_setup() 419 ps3_result(result)); ps3_sb_event_receive_port_setup() 422 return result; ps3_sb_event_receive_port_setup() 437 int result; ps3_sb_event_receive_port_destroy() local 442 result = lv1_disconnect_interrupt_event_receive_port(dev->bus_id, ps3_sb_event_receive_port_destroy() 445 if (result) ps3_sb_event_receive_port_destroy() 448 ps3_result(result)); ps3_sb_event_receive_port_destroy() 450 result = ps3_event_receive_port_destroy(virq); ps3_sb_event_receive_port_destroy() 451 BUG_ON(result); ps3_sb_event_receive_port_destroy() 458 result = ps3_virq_destroy(virq); ps3_sb_event_receive_port_destroy() 459 BUG_ON(result); ps3_sb_event_receive_port_destroy() 462 return result; ps3_sb_event_receive_port_destroy() 480 int result; ps3_io_irq_setup() local 483 result = lv1_construct_io_irq_outlet(interrupt_id, &outlet); ps3_io_irq_setup() 485 if (result) { ps3_io_irq_setup() 487 __func__, __LINE__, ps3_result(result)); ps3_io_irq_setup() 488 return result; ps3_io_irq_setup() 491 result = ps3_irq_plug_setup(cpu, outlet, virq); ps3_io_irq_setup() 492 BUG_ON(result); ps3_io_irq_setup() 494 return result; ps3_io_irq_setup() 500 int result; ps3_io_irq_destroy() local 510 result = ps3_irq_plug_destroy(virq); ps3_io_irq_destroy() 511 BUG_ON(result); ps3_io_irq_destroy() 513 result = lv1_destruct_io_irq_outlet(outlet); ps3_io_irq_destroy() 515 if (result) ps3_io_irq_destroy() 517 __func__, __LINE__, ps3_result(result)); ps3_io_irq_destroy() 519 return result; ps3_io_irq_destroy() 537 int result; ps3_vuart_irq_setup() local 545 result = lv1_configure_virtual_uart_irq(lpar_addr, &outlet); ps3_vuart_irq_setup() 547 if (result) { ps3_vuart_irq_setup() 549 __func__, __LINE__, ps3_result(result)); ps3_vuart_irq_setup() 550 return result; ps3_vuart_irq_setup() 553 result = ps3_irq_plug_setup(cpu, outlet, virq); ps3_vuart_irq_setup() 554 BUG_ON(result); ps3_vuart_irq_setup() 556 return result; ps3_vuart_irq_setup() 562 int result; ps3_vuart_irq_destroy() local 565 result = lv1_deconfigure_virtual_uart_irq(); ps3_vuart_irq_destroy() 567 if (result) { ps3_vuart_irq_destroy() 569 __func__, __LINE__, ps3_result(result)); ps3_vuart_irq_destroy() 570 return result; ps3_vuart_irq_destroy() 573 result = ps3_irq_plug_destroy(virq); ps3_vuart_irq_destroy() 574 BUG_ON(result); ps3_vuart_irq_destroy() 576 return result; ps3_vuart_irq_destroy() 593 int result; ps3_spe_irq_setup() local 598 result = lv1_get_spe_irq_outlet(spe_id, class, &outlet); ps3_spe_irq_setup() 600 if (result) { ps3_spe_irq_setup() 602 __func__, __LINE__, ps3_result(result)); ps3_spe_irq_setup() 603 return result; ps3_spe_irq_setup() 606 result = ps3_irq_plug_setup(cpu, outlet, virq); ps3_spe_irq_setup() 607 BUG_ON(result); ps3_spe_irq_setup() 609 return result; ps3_spe_irq_setup() 614 int result; ps3_spe_irq_destroy() local 618 result = ps3_irq_plug_destroy(virq); ps3_spe_irq_destroy() 619 BUG_ON(result); ps3_spe_irq_destroy() 621 return result; ps3_spe_irq_destroy() 752 int result; ps3_init_IRQ() local 770 result = lv1_configure_irq_state_bitmap(pd->ppe_id, for_each_possible_cpu() 773 if (result) for_each_possible_cpu() 776 ps3_result(result)); for_each_possible_cpu() 784 int result; ps3_shutdown_IRQ() local 789 result = lv1_configure_irq_state_bitmap(ppe_id, thread_id, 0); ps3_shutdown_IRQ() 792 __LINE__, ppe_id, thread_id, cpu, ps3_result(result)); ps3_shutdown_IRQ()
|
H A D | system-bus.c | 55 int result; ps3_open_hv_device_sb() local 63 result = 0; ps3_open_hv_device_sb() 71 result = 0; ps3_open_hv_device_sb() 76 result = lv1_open_device(dev->bus_id, dev->dev_id, 0); ps3_open_hv_device_sb() 78 if (result) { ps3_open_hv_device_sb() 80 __LINE__, ps3_result(result)); ps3_open_hv_device_sb() 81 result = -EPERM; ps3_open_hv_device_sb() 86 return result; ps3_open_hv_device_sb() 91 int result; ps3_close_hv_device_sb() local 99 result = 0; ps3_close_hv_device_sb() 107 result = 0; ps3_close_hv_device_sb() 112 result = lv1_close_device(dev->bus_id, dev->dev_id); ps3_close_hv_device_sb() 113 BUG_ON(result); ps3_close_hv_device_sb() 117 return result; ps3_close_hv_device_sb() 122 int result; ps3_open_hv_device_gpu() local 128 result = 0; ps3_open_hv_device_gpu() 132 result = lv1_gpu_open(0); ps3_open_hv_device_gpu() 134 if (result) { ps3_open_hv_device_gpu() 136 __LINE__, ps3_result(result)); ps3_open_hv_device_gpu() 137 result = -EPERM; ps3_open_hv_device_gpu() 142 return result; ps3_open_hv_device_gpu() 147 int result; ps3_close_hv_device_gpu() local 153 result = 0; ps3_close_hv_device_gpu() 157 result = lv1_gpu_close(); ps3_close_hv_device_gpu() 158 BUG_ON(result); ps3_close_hv_device_gpu() 162 return result; ps3_close_hv_device_gpu() 254 int result; ps3_sb_mmio_region_create() local 257 result = lv1_map_device_mmio_region(r->dev->bus_id, r->dev->dev_id, ps3_sb_mmio_region_create() 261 if (result) { ps3_sb_mmio_region_create() 263 __func__, __LINE__, ps3_result(result)); ps3_sb_mmio_region_create() 268 return result; ps3_sb_mmio_region_create() 285 int result; ps3_sb_free_mmio_region() local 288 result = lv1_unmap_device_mmio_region(r->dev->bus_id, r->dev->dev_id, ps3_sb_free_mmio_region() 291 if (result) ps3_sb_free_mmio_region() 293 __func__, __LINE__, ps3_result(result)); ps3_sb_free_mmio_region() 296 return result; ps3_sb_free_mmio_region() 349 int result; ps3_system_bus_match() local 354 result = dev->match_id == drv->match_id; ps3_system_bus_match() 356 result = dev->match_sub_id == drv->match_sub_id && ps3_system_bus_match() 359 if (result) ps3_system_bus_match() 370 return result; ps3_system_bus_match() 375 int result = 0; ps3_system_bus_probe() local 386 result = drv->probe(dev); ps3_system_bus_probe() 392 return result; ps3_system_bus_probe() 397 int result = 0; ps3_system_bus_remove() local 408 result = drv->remove(dev); ps3_system_bus_remove() 414 return result; ps3_system_bus_remove() 492 int result; ps3_system_bus_init() local 501 result = device_register(&ps3_system_bus); ps3_system_bus_init() 502 BUG_ON(result); ps3_system_bus_init() 504 result = bus_register(&ps3_system_bus_type); ps3_system_bus_init() 505 BUG_ON(result); ps3_system_bus_init() 508 return result; ps3_system_bus_init() 521 int result; ps3_alloc_coherent() local 535 result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle, ps3_alloc_coherent() 539 if (result) { ps3_alloc_coherent() 541 __func__, __LINE__, result); ps3_alloc_coherent() 575 int result; ps3_sb_map_page() local 579 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size, ps3_sb_map_page() 584 if (result) { ps3_sb_map_page() 586 __func__, __LINE__, result); ps3_sb_map_page() 598 int result; ps3_ioc0_map_page() local 618 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size, ps3_ioc0_map_page() 621 if (result) { ps3_ioc0_map_page() 623 __func__, __LINE__, result); ps3_ioc0_map_page() 632 int result; ps3_unmap_page() local 634 result = ps3_dma_unmap(dev->d_region, dma_addr, size); ps3_unmap_page() 636 if (result) { ps3_unmap_page() 638 __func__, __LINE__, result); ps3_unmap_page() 654 int result = ps3_dma_map(dev->d_region, sg_phys(sg), ps3_sb_map_sg() 657 if (result) { ps3_sb_map_sg() 659 __func__, __LINE__, result); ps3_sb_map_sg() 746 int result; ps3_system_bus_device_register() local 782 result = device_register(&dev->core); ps3_system_bus_device_register() 783 return result; ps3_system_bus_device_register() 790 int result; ps3_system_bus_driver_register() local 799 result = driver_register(&drv->core); ps3_system_bus_driver_register() 801 return result; ps3_system_bus_driver_register()
|
H A D | htab.c | 51 int result; ps3_hpte_insert() local 71 result = lv1_insert_htab_entry(PS3_LPAR_VAS_ID_CURRENT, hpte_group, ps3_hpte_insert() 77 if (result) { ps3_hpte_insert() 79 pr_info("%s:result=%s vpn=%lx pa=%lx ix=%lx v=%llx r=%llx\n", ps3_hpte_insert() 80 __func__, ps3_result(result), vpn, pa, hpte_group, ps3_hpte_insert() 88 result = lv1_read_htab_entries(PS3_LPAR_VAS_ID_CURRENT, ps3_hpte_insert() 93 BUG_ON(result); ps3_hpte_insert() 115 int result; ps3_hpte_updatepp() local 125 result = lv1_read_htab_entries(PS3_LPAR_VAS_ID_CURRENT, slot & ~0x3UL, ps3_hpte_updatepp() 130 if (result) { ps3_hpte_updatepp() 131 pr_info("%s: result=%s read vpn=%lx slot=%lx psize=%d\n", ps3_hpte_updatepp() 132 __func__, ps3_result(result), vpn, slot, psize); ps3_hpte_updatepp() 150 result = lv1_write_htab_entry(PS3_LPAR_VAS_ID_CURRENT, ps3_hpte_updatepp() 169 int result; ps3_hpte_invalidate() local 173 result = lv1_write_htab_entry(PS3_LPAR_VAS_ID_CURRENT, slot, 0, 0); ps3_hpte_invalidate() 175 if (result) { ps3_hpte_invalidate() 176 pr_info("%s: result=%s vpn=%lx slot=%lx psize=%d\n", ps3_hpte_invalidate() 177 __func__, ps3_result(result), vpn, slot, psize); ps3_hpte_invalidate()
|
H A D | smp.c | 44 int result; ps3_smp_message_pass() local 53 result = ps3_send_event_locally(virq); ps3_smp_message_pass() 55 if (result) ps3_smp_message_pass() 57 " (%d)\n", __func__, __LINE__, cpu, msg, result); ps3_smp_message_pass() 65 int result; ps3_smp_probe() local 83 result = ps3_event_receive_port_setup(cpu, &virqs[i]); ps3_smp_probe() 85 if (result) ps3_smp_probe() 91 result = smp_request_message_ipi(virqs[i], i); ps3_smp_probe() 93 if (result) ps3_smp_probe()
|
H A D | mm.c | 152 int result; ps3_mm_vas_create() local 159 result = lv1_query_logical_partition_address_region_info(0, ps3_mm_vas_create() 163 if (result) { ps3_mm_vas_create() 166 ps3_result(result)); ps3_mm_vas_create() 179 result = lv1_construct_virtual_address_space(CONFIG_PS3_HTAB_SIZE, ps3_mm_vas_create() 183 if (result) { ps3_mm_vas_create() 185 __func__, __LINE__, ps3_result(result)); ps3_mm_vas_create() 189 result = lv1_select_virtual_address_space(map.vas_id); ps3_mm_vas_create() 191 if (result) { ps3_mm_vas_create() 193 __func__, __LINE__, ps3_result(result)); ps3_mm_vas_create() 213 int result; ps3_mm_vas_destroy() local 218 result = lv1_select_virtual_address_space(0); ps3_mm_vas_destroy() 219 BUG_ON(result); ps3_mm_vas_destroy() 220 result = lv1_destruct_virtual_address_space(map.vas_id); ps3_mm_vas_destroy() 221 BUG_ON(result); ps3_mm_vas_destroy() 228 int result; ps3_mm_get_repository_highmem() local 232 result = ps3_repository_read_highmem_info(0, &r->base, &r->size); ps3_mm_get_repository_highmem() 234 if (result) ps3_mm_get_repository_highmem() 238 result = -1; ps3_mm_get_repository_highmem() 253 return result; ps3_mm_get_repository_highmem() 275 int result; ps3_mm_region_create() local 287 result = -1; ps3_mm_region_create() 291 result = lv1_allocate_memory(r->size, PAGE_SHIFT_16M, 0, ps3_mm_region_create() 294 if (result || r->base < map.rm.size) { ps3_mm_region_create() 296 __func__, __LINE__, ps3_result(result)); ps3_mm_region_create() 302 return result; ps3_mm_region_create() 306 return result; ps3_mm_region_create() 316 int result; ps3_mm_region_destroy() local 327 result = lv1_release_memory(r->base); ps3_mm_region_destroy() 328 BUG_ON(result); ps3_mm_region_destroy() 467 int result = 0; dma_sb_free_chunk() local 470 result = lv1_unmap_device_dma_region(c->region->dev->bus_id, dma_sb_free_chunk() 472 BUG_ON(result); dma_sb_free_chunk() 476 return result; dma_sb_free_chunk() 481 int result = 0; dma_ioc0_free_chunk() local 490 result = lv1_put_iopte(0, dma_ioc0_free_chunk() 500 if (result) { dma_ioc0_free_chunk() 502 __LINE__, ps3_result(result)); dma_ioc0_free_chunk() 507 return result; dma_ioc0_free_chunk() 524 int result; dma_sb_map_pages() local 530 result = -ENOMEM; dma_sb_map_pages() 540 result = lv1_map_device_dma_region(c->region->dev->bus_id, dma_sb_map_pages() 543 if (result) { dma_sb_map_pages() 545 __func__, __LINE__, ps3_result(result)); dma_sb_map_pages() 559 return result; dma_sb_map_pages() 566 int result; dma_ioc0_map_pages() local 576 result = -ENOMEM; dma_ioc0_map_pages() 604 result = lv1_put_iopte(0, dma_ioc0_map_pages() 609 if (result) { dma_ioc0_map_pages() 611 __func__, __LINE__, ps3_result(result)); dma_ioc0_map_pages() 637 return result; dma_ioc0_map_pages() 650 int result; dma_sb_region_create() local 673 result = lv1_allocate_device_dma_region(r->dev->bus_id, r->dev->dev_id, dma_sb_region_create() 678 if (result) { dma_sb_region_create() 680 __func__, __LINE__, ps3_result(result)); dma_sb_region_create() 684 return result; dma_sb_region_create() 689 int result; dma_ioc0_region_create() local 695 result = lv1_allocate_io_segment(0, dma_ioc0_region_create() 700 if (result) { dma_ioc0_region_create() 702 __func__, __LINE__, ps3_result(result)); dma_ioc0_region_create() 707 return result; dma_ioc0_region_create() 720 int result; dma_sb_region_free() local 737 result = lv1_free_device_dma_region(r->dev->bus_id, r->dev->dev_id, dma_sb_region_free() 740 if (result) dma_sb_region_free() 742 __func__, __LINE__, ps3_result(result)); dma_sb_region_free() 746 return result; dma_sb_region_free() 751 int result; dma_ioc0_region_free() local 760 result = lv1_release_io_segment(0, r->bus_addr); dma_ioc0_region_free() 762 if (result) dma_ioc0_region_free() 764 __func__, __LINE__, ps3_result(result)); dma_ioc0_region_free() 769 return result; dma_ioc0_region_free() 787 int result; dma_sb_map_area() local 822 result = dma_sb_map_pages(r, aligned_phys, aligned_len, &c, iopte_flag); dma_sb_map_area() 824 if (result) { dma_sb_map_area() 827 __func__, __LINE__, result); dma_sb_map_area() 829 return result; dma_sb_map_area() 835 return result; dma_sb_map_area() 842 int result; dma_ioc0_map_area() local 868 result = dma_ioc0_map_pages(r, aligned_phys, aligned_len, &c, dma_ioc0_map_area() 871 if (result) { dma_ioc0_map_area() 874 __func__, __LINE__, result); dma_ioc0_map_area() 876 return result; dma_ioc0_map_area() 884 return result; dma_ioc0_map_area() 981 int result; dma_sb_region_create_linear() local 995 result = dma_sb_region_create(r); dma_sb_region_create_linear() 996 BUG_ON(result); dma_sb_region_create_linear() 1004 result = dma_sb_map_area(r, virt_addr, len, &tmp, dma_sb_region_create_linear() 1007 BUG_ON(result); dma_sb_region_create_linear() 1018 result = dma_sb_map_area(r, virt_addr, len, &tmp, dma_sb_region_create_linear() 1021 BUG_ON(result); dma_sb_region_create_linear() 1024 return result; dma_sb_region_create_linear() 1036 int result; dma_sb_region_free_linear() local 1047 result = dma_sb_unmap_area(r, bus_addr, len); dma_sb_region_free_linear() 1048 BUG_ON(result); dma_sb_region_free_linear() 1060 result = dma_sb_unmap_area(r, bus_addr, len); dma_sb_region_free_linear() 1061 BUG_ON(result); dma_sb_region_free_linear() 1064 result = dma_sb_region_free(r); dma_sb_region_free_linear() 1065 BUG_ON(result); dma_sb_region_free_linear() 1067 return result; dma_sb_region_free_linear() 1202 int result; ps3_mm_init() local 1206 result = ps3_repository_read_mm_info(&map.rm.base, &map.rm.size, ps3_mm_init() 1209 if (result) ps3_mm_init() 1223 result = ps3_mm_region_create(&map.r1, map.total - map.rm.size); ps3_mm_init() 1225 if (!result) ps3_mm_init()
|
H A D | spu.c | 164 int result; construct_spu() local 169 result = lv1_construct_logical_spe(PAGE_SHIFT, PAGE_SHIFT, PAGE_SHIFT, construct_spu() 178 if (result) { construct_spu() 180 __func__, __LINE__, ps3_result(result)); construct_spu() 181 return result; construct_spu() 184 return result; construct_spu() 260 int result; setup_interrupts() local 262 result = ps3_spe_irq_setup(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id, setup_interrupts() 265 if (result) setup_interrupts() 268 result = ps3_spe_irq_setup(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id, setup_interrupts() 271 if (result) setup_interrupts() 274 result = ps3_spe_irq_setup(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id, setup_interrupts() 277 if (result) setup_interrupts() 280 return result; setup_interrupts() 288 return result; setup_interrupts() 293 int result; enable_spu() local 295 result = lv1_enable_logical_spe(spu_pdata(spu)->spe_id, enable_spu() 298 if (result) { enable_spu() 300 __func__, __LINE__, ps3_result(result)); enable_spu() 304 result = setup_areas(spu); enable_spu() 306 if (result) enable_spu() 309 result = setup_interrupts(spu); enable_spu() 311 if (result) enable_spu() 321 return result; enable_spu() 326 int result; ps3_destroy_spu() local 330 result = lv1_disable_logical_spe(spu_pdata(spu)->spe_id, 0); ps3_destroy_spu() 331 BUG_ON(result); ps3_destroy_spu() 341 result = lv1_destruct_logical_spe(spu_pdata(spu)->spe_id); ps3_destroy_spu() 342 BUG_ON(result); ps3_destroy_spu() 352 int result; ps3_create_spu() local 360 result = -ENOMEM; ps3_create_spu() 370 result = construct_spu(spu); ps3_create_spu() 372 if (result) ps3_create_spu() 377 result = enable_spu(spu); ps3_create_spu() 379 if (result) ps3_create_spu() 389 return result; ps3_create_spu() 395 return result; ps3_create_spu() 400 int result; ps3_enumerate_spus() local 404 result = ps3_repository_read_num_spu_resource_id(&num_resource_id); ps3_enumerate_spus() 418 result = ps3_repository_read_spu_resource_id(i, ps3_enumerate_spus() 421 if (result) ps3_enumerate_spus() 425 result = fn((void*)(unsigned long)resource_id); ps3_enumerate_spus() 427 if (result) ps3_enumerate_spus() 432 if (result) { ps3_enumerate_spus() 435 return result; ps3_enumerate_spus()
|
H A D | gelic_udbg.c | 105 s64 result; map_dma_mem() local 114 result = lv1_allocate_device_dma_region(bus_id, dev_id, map_dma_mem() 117 if (result) map_dma_mem() 120 result = lv1_map_device_dma_region(bus_id, dev_id, map_start, map_dma_mem() 123 if (result) map_dma_mem() 131 s64 result; unmap_dma_mem() local 138 result = lv1_unmap_device_dma_region(bus_id, dev_id, real_bus_addr, unmap_dma_mem() 140 if (result) unmap_dma_mem() 141 return result; unmap_dma_mem() 148 s64 result; gelic_debug_init() local 153 result = lv1_open_device(GELIC_BUS_ID, GELIC_DEVICE_ID, 0); gelic_debug_init() 154 if (result) gelic_debug_init() 166 result = lv1_net_control(GELIC_BUS_ID, GELIC_DEVICE_ID, gelic_debug_init() 169 if (result) gelic_debug_init() 181 result = lv1_net_control(GELIC_BUS_ID, GELIC_DEVICE_ID, gelic_debug_init() 185 if (!result) { gelic_debug_init()
|
H A D | time.c | 57 int result; ps3_calibrate_decr() local 60 result = ps3_repository_read_be_tb_freq(0, &tmp); ps3_calibrate_decr() 61 BUG_ON(result); ps3_calibrate_decr() 69 int result; read_rtc() local 73 result = lv1_get_rtc(&rtc_val, &tb_val); read_rtc() 74 BUG_ON(result); read_rtc()
|
/linux-4.1.27/arch/s390/lib/ |
H A D | find.c | 21 unsigned long result = 0; find_first_bit_inv() local 27 result += BITS_PER_LONG; find_first_bit_inv() 31 return result; find_first_bit_inv() 34 return result + size; /* Nope. */ find_first_bit_inv() 36 return result + (__fls(tmp) ^ (BITS_PER_LONG - 1)); find_first_bit_inv() 44 unsigned long result = offset & ~(BITS_PER_LONG - 1); find_next_bit_inv() local 49 size -= result; find_next_bit_inv() 59 result += BITS_PER_LONG; find_next_bit_inv() 64 result += BITS_PER_LONG; find_next_bit_inv() 68 return result; find_next_bit_inv() 73 return result + size; /* Nope. */ find_next_bit_inv() 75 return result + (__fls(tmp) ^ (BITS_PER_LONG - 1)); find_next_bit_inv()
|
/linux-4.1.27/arch/ia64/include/uapi/asm/ |
H A D | swab.h | 15 __u64 result; __arch_swab64() local 17 result = ia64_mux1(x, ia64_mux1_rev); __arch_swab64() 18 return result; __arch_swab64()
|
/linux-4.1.27/tools/lib/util/ |
H A D | find_next_bit.c | 28 unsigned long result = offset & ~(BITS_PER_LONG-1); find_next_bit() local 33 size -= result; find_next_bit() 43 result += BITS_PER_LONG; find_next_bit() 48 result += BITS_PER_LONG; find_next_bit() 52 return result; find_next_bit() 58 return result + size; /* Nope. */ find_next_bit() 60 return result + __ffs(tmp); find_next_bit() 71 unsigned long result = 0; find_first_bit() local 77 result += BITS_PER_LONG; find_first_bit() 81 return result; find_first_bit() 85 return result + size; /* Nope. */ find_first_bit() 87 return result + __ffs(tmp); find_first_bit()
|
/linux-4.1.27/arch/mips/include/asm/ |
H A D | local.h | 27 * Same as above, but return the result value 31 unsigned long result; local_add_return() local 44 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) local_add_return() 58 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) local_add_return() 65 result = l->a.counter; local_add_return() 66 result += i; local_add_return() 67 l->a.counter = result; local_add_return() 71 return result; local_add_return() 76 unsigned long result; local_sub_return() local 89 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) local_sub_return() 103 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter) local_sub_return() 110 result = l->a.counter; local_sub_return() 111 result -= i; local_sub_return() 112 l->a.counter = result; local_sub_return() 116 return result; local_sub_return() 146 * local_sub_and_test - subtract value from variable and test result 151 * true if the result is zero, or false for all 161 * and returns true if the result is zero, or false for all 171 * returns true if the result is 0, or false for all other 182 * if the result is negative, or false when 183 * result is greater than or equal to zero.
|
H A D | atomic.h | 84 int result; \ 99 : "=&r" (result), "=&r" (temp), \ 112 : "=&r" (result), "=&r" (temp), \ 115 } while (unlikely(!result)); \ 117 result = temp; result c_op i; \ 122 result = v->counter; \ 123 result c_op i; \ 124 v->counter = result; \ 130 return result; \ 154 int result; atomic_sub_if_positive() local 173 : "=&r" (result), "=&r" (temp), atomic_sub_if_positive() 192 : "=&r" (result), "=&r" (temp), atomic_sub_if_positive() 199 result = v->counter; atomic_sub_if_positive() 200 result -= i; atomic_sub_if_positive() 201 if (result >= 0) atomic_sub_if_positive() 202 v->counter = result; atomic_sub_if_positive() 208 return result; atomic_sub_if_positive() 242 * atomic_sub_and_test - subtract value from variable and test result 247 * true if the result is zero, or false for all 257 * and returns true if the result is zero, or false for all 267 * returns true if the result is 0, or false for all other 300 * if the result is negative, or false when 301 * result is greater than or equal to zero. 363 long result; \ 378 : "=&r" (result), "=&r" (temp), \ 391 : "=&r" (result), "=&r" (temp), \ 395 } while (unlikely(!result)); \ 397 result = temp; result c_op i; \ 402 result = v->counter; \ 403 result c_op i; \ 404 v->counter = result; \ 410 return result; \ 435 long result; atomic64_sub_if_positive() local 454 : "=&r" (result), "=&r" (temp), atomic64_sub_if_positive() 473 : "=&r" (result), "=&r" (temp), atomic64_sub_if_positive() 480 result = v->counter; atomic64_sub_if_positive() 481 result -= i; atomic64_sub_if_positive() 482 if (result >= 0) atomic64_sub_if_positive() 483 v->counter = result; atomic64_sub_if_positive() 489 return result; atomic64_sub_if_positive() 526 * atomic64_sub_and_test - subtract value from variable and test result 531 * true if the result is zero, or false for all 541 * and returns true if the result is zero, or false for all 551 * returns true if the result is 0, or false for all other 584 * if the result is negative, or false when 585 * result is greater than or equal to zero.
|
/linux-4.1.27/arch/parisc/lib/ |
H A D | checksum.c | 44 unsigned int result = 0; do_csum() local 50 result = be16_to_cpu(*buff); do_csum() 57 result += *(unsigned short *) buff; do_csum() 70 addc(result, r1); do_csum() 71 addc(result, r2); do_csum() 72 addc(result, r3); do_csum() 73 addc(result, r4); do_csum() 81 addc(result, w); do_csum() 83 result = (result & 0xffff) + (result >> 16); do_csum() 86 result += *(unsigned short *) buff; do_csum() 91 result += le16_to_cpu(*buff); do_csum() 92 result = from32to16(result); do_csum() 94 result = swab16(result); do_csum() 96 return result; do_csum() 107 unsigned int result = do_csum(buff, len); csum_partial() local 108 addc(result, sum); csum_partial() 109 return (__force __wsum)from32to16(result); csum_partial()
|
/linux-4.1.27/arch/parisc/math-emu/ |
H A D | sfadd.c | 55 register unsigned int left, right, result, extent; sgl_fadd() local 88 Sgl_makequietnan(result); sgl_fadd() 89 *dstptr = result; sgl_fadd() 198 /* Left is not a zero and must be the result. Trapped sgl_fadd() 221 /* Both operands are denormalized. The result must be exact sgl_fadd() 226 Sgl_subtract(left,/*minus*/right,/*into*/result); sgl_fadd() 227 if(Sgl_iszero_mantissa(result)) sgl_fadd() 231 Sgl_setone_sign(result); sgl_fadd() 235 Sgl_setzero_sign(result); sgl_fadd() 237 *dstptr = result; sgl_fadd() 243 Sgl_addition(left,right,/*into*/result); sgl_fadd() 244 if(Sgl_isone_hidden(result)) sgl_fadd() 246 *dstptr = result; sgl_fadd() 252 /* need to normalize result */ sgl_fadd() 253 sign_save = Sgl_signextendedsign(result); sgl_fadd() 254 Sgl_leftshiftby1(result); sgl_fadd() 255 Sgl_normalize(result,result_exponent); sgl_fadd() 256 Sgl_set_sign(result,/*using*/sign_save); sgl_fadd() 257 Sgl_setwrapped_exponent(result,result_exponent,unfl); sgl_fadd() 258 *dstptr = result; sgl_fadd() 261 *dstptr = result; sgl_fadd() 297 Sgl_subtract_withextension(left,/*minus*/right,/*with*/extent,/*into*/result); sgl_fadd() 298 if(Sgl_iszero_hidden(result)) sgl_fadd() 301 /* A straightforward algorithm would now shift the result sgl_fadd() 310 sign_save = Sgl_signextendedsign(result); sgl_fadd() 311 Sgl_leftshiftby1_withextent(result,extent,result); sgl_fadd() 313 /* Need to check for a zero result. The sign and exponent sgl_fadd() 317 if(Sgl_iszero(result)) sgl_fadd() 320 if(Is_rounding_mode(ROUNDMINUS)) Sgl_setone_sign(result); sgl_fadd() 321 *dstptr = result; sgl_fadd() 326 if(Sgl_isone_hidden(result)) sgl_fadd() 337 Sgl_set_sign(result,/*using*/sign_save); sgl_fadd() 353 * modified binary search. We have already shifted the result sgl_fadd() 357 while(Sgl_iszero_hiddenhigh7mantissa(result)) sgl_fadd() 359 Sgl_leftshiftby8(result); sgl_fadd() 364 if(Sgl_iszero_hiddenhigh3mantissa(result)) sgl_fadd() 367 Sgl_leftshiftby4(result); sgl_fadd() 373 if((jumpsize = Sgl_hiddenhigh3mantissa(result)) > 7) sgl_fadd() 377 Sgl_set_sign(result,/*using*/sign_save); sgl_fadd() 378 Sgl_set_exponent(result,/*using*/result_exponent); sgl_fadd() 379 *dstptr = result; sgl_fadd() 382 Sgl_sethigh4bits(result,/*using*/sign_save); sgl_fadd() 387 Sgl_leftshiftby3(result); sgl_fadd() 394 Sgl_leftshiftby2(result); sgl_fadd() 403 Sgl_leftshiftby1(result); sgl_fadd() 410 Sgl_set_exponent(result,/*using*/result_exponent); sgl_fadd() 411 *dstptr = result; sgl_fadd() 418 Sgl_set_sign(result,sign_save); sgl_fadd() 419 Sgl_setwrapped_exponent(result,result_exponent,unfl); sgl_fadd() 420 *dstptr = result; sgl_fadd() 425 * Since we cannot get an inexact denormalized result, sgl_fadd() 428 Sgl_right_align(result,/*by*/(1-result_exponent),extent); sgl_fadd() 429 Sgl_clear_signexponent(result); sgl_fadd() 430 Sgl_set_sign(result,sign_save); sgl_fadd() 431 *dstptr = result; sgl_fadd() 439 Sgl_addition(left,right,/*to*/result); sgl_fadd() 440 if(Sgl_isone_hiddenoverflow(result)) sgl_fadd() 443 Sgl_rightshiftby1_withextent(result,extent,extent); sgl_fadd() 444 Sgl_arithrightshiftby1(result); sgl_fadd() 449 /* Round the result. If the extension is all zeros,then the result is sgl_fadd() 464 Sgl_isone_lowmantissa(result)) sgl_fadd() 467 Sgl_increment(result); sgl_fadd() 473 if(Sgl_iszero_sign(result)) sgl_fadd() 476 Sgl_increment(result); sgl_fadd() 481 if(Sgl_isone_sign(result)) sgl_fadd() 484 Sgl_increment(result); sgl_fadd() 490 if(Sgl_isone_hiddenoverflow(result)) result_exponent++; sgl_fadd() 497 Sgl_setwrapped_exponent(result,result_exponent,ovfl); sgl_fadd() 498 *dstptr = result; sgl_fadd() 509 Sgl_setoverflow(result); sgl_fadd() 512 else Sgl_set_exponent(result,result_exponent); sgl_fadd() 513 *dstptr = result; sgl_fadd()
|
H A D | sfsub.c | 55 register unsigned int left, right, result, extent; sgl_fsub() local 86 Sgl_makequietnan(result); sgl_fsub() 87 *dstptr = result; sgl_fsub() 199 /* Left is not a zero and must be the result. Trapped sgl_fsub() 223 /* Both operands are denormalized. The result must be exact sgl_fsub() 228 Sgl_subtract(left,/*minus*/right,/*into*/result); sgl_fsub() 229 if(Sgl_iszero_mantissa(result)) sgl_fsub() 233 Sgl_setone_sign(result); sgl_fsub() 237 Sgl_setzero_sign(result); sgl_fsub() 239 *dstptr = result; sgl_fsub() 245 Sgl_addition(left,right,/*into*/result); sgl_fsub() 246 if(Sgl_isone_hidden(result)) sgl_fsub() 248 *dstptr = result; sgl_fsub() 254 /* need to normalize result */ sgl_fsub() 255 sign_save = Sgl_signextendedsign(result); sgl_fsub() 256 Sgl_leftshiftby1(result); sgl_fsub() 257 Sgl_normalize(result,result_exponent); sgl_fsub() 258 Sgl_set_sign(result,/*using*/sign_save); sgl_fsub() 259 Sgl_setwrapped_exponent(result,result_exponent,unfl); sgl_fsub() 260 *dstptr = result; sgl_fsub() 264 *dstptr = result; sgl_fsub() 300 Sgl_subtract_withextension(left,/*minus*/right,/*with*/extent,/*into*/result); sgl_fsub() 301 if(Sgl_iszero_hidden(result)) sgl_fsub() 304 /* A straightforward algorithm would now shift the result sgl_fsub() 313 sign_save = Sgl_signextendedsign(result); sgl_fsub() 314 Sgl_leftshiftby1_withextent(result,extent,result); sgl_fsub() 316 /* Need to check for a zero result. The sign and exponent sgl_fsub() 320 if(Sgl_iszero(result)) sgl_fsub() 323 if(Is_rounding_mode(ROUNDMINUS)) Sgl_setone_sign(result); sgl_fsub() 324 *dstptr = result; sgl_fsub() 329 if(Sgl_isone_hidden(result)) sgl_fsub() 340 Sgl_set_sign(result,/*using*/sign_save); sgl_fsub() 356 * modified binary search. We have already shifted the result sgl_fsub() 360 while(Sgl_iszero_hiddenhigh7mantissa(result)) sgl_fsub() 362 Sgl_leftshiftby8(result); sgl_fsub() 367 if(Sgl_iszero_hiddenhigh3mantissa(result)) sgl_fsub() 370 Sgl_leftshiftby4(result); sgl_fsub() 376 if((jumpsize = Sgl_hiddenhigh3mantissa(result)) > 7) sgl_fsub() 380 Sgl_set_sign(result,/*using*/sign_save); sgl_fsub() 381 Sgl_set_exponent(result,/*using*/result_exponent); sgl_fsub() 382 *dstptr = result; sgl_fsub() 385 Sgl_sethigh4bits(result,/*using*/sign_save); sgl_fsub() 390 Sgl_leftshiftby3(result); sgl_fsub() 397 Sgl_leftshiftby2(result); sgl_fsub() 406 Sgl_leftshiftby1(result); sgl_fsub() 413 Sgl_set_exponent(result,/*using*/result_exponent); sgl_fsub() 414 *dstptr = result; /* Sign bit is already set */ sgl_fsub() 421 Sgl_set_sign(result,sign_save); sgl_fsub() 422 Sgl_setwrapped_exponent(result,result_exponent,unfl); sgl_fsub() 423 *dstptr = result; sgl_fsub() 428 * Since we cannot get an inexact denormalized result, sgl_fsub() 431 Sgl_right_align(result,/*by*/(1-result_exponent),extent); sgl_fsub() 432 Sgl_clear_signexponent(result); sgl_fsub() 433 Sgl_set_sign(result,sign_save); sgl_fsub() 434 *dstptr = result; sgl_fsub() 442 Sgl_addition(left,right,/*to*/result); sgl_fsub() 443 if(Sgl_isone_hiddenoverflow(result)) sgl_fsub() 446 Sgl_rightshiftby1_withextent(result,extent,extent); sgl_fsub() 447 Sgl_arithrightshiftby1(result); sgl_fsub() 452 /* Round the result. If the extension is all zeros,then the result is sgl_fsub() 467 Sgl_isone_lowmantissa(result)) sgl_fsub() 470 Sgl_increment(result); sgl_fsub() 476 if(Sgl_iszero_sign(result)) sgl_fsub() 479 Sgl_increment(result); sgl_fsub() 484 if(Sgl_isone_sign(result)) sgl_fsub() 487 Sgl_increment(result); sgl_fsub() 493 if(Sgl_isone_hiddenoverflow(result)) result_exponent++; sgl_fsub() 500 Sgl_setwrapped_exponent(result,result_exponent,ovfl); sgl_fsub() 501 *dstptr = result; sgl_fsub() 512 Sgl_setoverflow(result); sgl_fsub() 515 else Sgl_set_exponent(result,result_exponent); sgl_fsub() 516 *dstptr = result; sgl_fsub()
|
H A D | fcnvfx.c | 65 register int src_exponent, result; sgl_to_sgl_fcnvfx() local 78 if (Sgl_iszero_sign(src)) result = 0x7fffffff; sgl_to_sgl_fcnvfx() 79 else result = 0x80000000; sgl_to_sgl_fcnvfx() 85 *dstptr = result; sgl_to_sgl_fcnvfx() 90 * Generate result sgl_to_sgl_fcnvfx() 96 if (Sgl_isone_sign(src)) result = -Sgl_all(temp); sgl_to_sgl_fcnvfx() 97 else result = Sgl_all(temp); sgl_to_sgl_fcnvfx() 102 /* round result */ sgl_to_sgl_fcnvfx() 105 if (Sgl_iszero_sign(src)) result++; sgl_to_sgl_fcnvfx() 108 if (Sgl_isone_sign(src)) result--; sgl_to_sgl_fcnvfx() 114 if (Sgl_iszero_sign(src)) result++; sgl_to_sgl_fcnvfx() 115 else result--; sgl_to_sgl_fcnvfx() 121 result = 0; sgl_to_sgl_fcnvfx() 126 /* round result */ sgl_to_sgl_fcnvfx() 129 if (Sgl_iszero_sign(src)) result++; sgl_to_sgl_fcnvfx() 132 if (Sgl_isone_sign(src)) result--; sgl_to_sgl_fcnvfx() 137 if (Sgl_iszero_sign(src)) result++; sgl_to_sgl_fcnvfx() 138 else result--; sgl_to_sgl_fcnvfx() 142 *dstptr = result; sgl_to_sgl_fcnvfx() 195 * Generate result sgl_to_dbl_fcnvfx() 208 /* round result */ sgl_to_dbl_fcnvfx() 239 /* round result */ sgl_to_dbl_fcnvfx() 283 register int src_exponent, result; dbl_to_sgl_fcnvfx() local 295 if (Dbl_iszero_sign(srcp1)) result = 0x7fffffff; dbl_to_sgl_fcnvfx() 296 else result = 0x80000000; dbl_to_sgl_fcnvfx() 302 *dstptr = result; dbl_to_sgl_fcnvfx() 307 * Generate result dbl_to_sgl_fcnvfx() 315 result = -Dbl_allp1(tempp1); dbl_to_sgl_fcnvfx() 316 else result = Dbl_allp1(tempp1); dbl_to_sgl_fcnvfx() 321 /* round result */ dbl_to_sgl_fcnvfx() 324 if (Dbl_iszero_sign(srcp1)) result++; dbl_to_sgl_fcnvfx() 327 if (Dbl_isone_sign(srcp1)) result--; dbl_to_sgl_fcnvfx() 333 if (Dbl_iszero_sign(srcp1)) result++; dbl_to_sgl_fcnvfx() 334 else result--; dbl_to_sgl_fcnvfx() 337 if ((Dbl_iszero_sign(srcp1) && result < 0) || dbl_to_sgl_fcnvfx() 338 (Dbl_isone_sign(srcp1) && result > 0)) { dbl_to_sgl_fcnvfx() 340 if (Dbl_iszero_sign(srcp1)) result = 0x7fffffff; dbl_to_sgl_fcnvfx() 341 else result = 0x80000000; dbl_to_sgl_fcnvfx() 347 *dstptr = result; dbl_to_sgl_fcnvfx() 353 result = 0; dbl_to_sgl_fcnvfx() 358 /* round result */ dbl_to_sgl_fcnvfx() 361 if (Dbl_iszero_sign(srcp1)) result++; dbl_to_sgl_fcnvfx() 364 if (Dbl_isone_sign(srcp1)) result--; dbl_to_sgl_fcnvfx() 369 if (Dbl_iszero_sign(srcp1)) result++; dbl_to_sgl_fcnvfx() 370 else result--; dbl_to_sgl_fcnvfx() 374 *dstptr = result; dbl_to_sgl_fcnvfx() 425 * Generate result dbl_to_dbl_fcnvfx() 440 /* round result */ dbl_to_dbl_fcnvfx() 471 /* round result */ dbl_to_dbl_fcnvfx()
|
H A D | sfdiv.c | 53 register unsigned int opnd1, opnd2, opnd3, result; sgl_fdiv() local 61 * set sign bit of result sgl_fdiv() 63 if (Sgl_sign(opnd1) ^ Sgl_sign(opnd2)) Sgl_setnegativezero(result); sgl_fdiv() 64 else Sgl_setzero(result); sgl_fdiv() 79 Sgl_makequietnan(result); sgl_fdiv() 80 *dstptr = result; sgl_fdiv() 86 Sgl_setinfinity_exponentmantissa(result); sgl_fdiv() 87 *dstptr = result; sgl_fdiv() 131 Sgl_setzero_exponentmantissa(result); sgl_fdiv() 132 *dstptr = result; sgl_fdiv() 159 Sgl_makequietnan(result); sgl_fdiv() 160 *dstptr = result; sgl_fdiv() 166 Sgl_setinfinity_exponentmantissa(result); sgl_fdiv() 167 *dstptr = result; sgl_fdiv() 185 Sgl_setzero_exponentmantissa(result); sgl_fdiv() 186 *dstptr = result; sgl_fdiv() 243 /* need to get one more bit of result */ sgl_fdiv() 259 * round result sgl_fdiv() 265 if (Sgl_iszero_sign(result)) sgl_fdiv() 269 if (Sgl_isone_sign(result)) sgl_fdiv() 280 Sgl_set_mantissa(result,opnd3); sgl_fdiv() 289 * Adjust bias of result sgl_fdiv() 291 Sgl_setwrapped_exponent(result,dest_exponent,ovfl); sgl_fdiv() 292 *dstptr = result; sgl_fdiv() 300 /* set result to infinity or largest number */ sgl_fdiv() 301 Sgl_setoverflow(result); sgl_fdiv() 311 * Adjust bias of result sgl_fdiv() 313 Sgl_setwrapped_exponent(result,dest_exponent,unfl); sgl_fdiv() 314 *dstptr = result; sgl_fdiv() 327 if (Sgl_iszero_sign(result)) { sgl_fdiv() 335 if (Sgl_isone_sign(result)) { sgl_fdiv() 355 * denormalize result or set to signed zero sgl_fdiv() 364 if (Sgl_iszero_sign(result)) { sgl_fdiv() 369 if (Sgl_isone_sign(result)) { sgl_fdiv() 382 Sgl_set_exponentmantissa(result,opnd3); sgl_fdiv() 384 else Sgl_set_exponent(result,dest_exponent); sgl_fdiv() 385 *dstptr = result; sgl_fdiv()
|
H A D | sfmpy.c | 56 register unsigned int opnd1, opnd2, opnd3, result; sgl_fmpy() local 64 * set sign bit of result sgl_fmpy() 66 if (Sgl_sign(opnd1) ^ Sgl_sign(opnd2)) Sgl_setnegativezero(result); sgl_fmpy() 67 else Sgl_setzero(result); sgl_fmpy() 82 Sgl_makequietnan(result); sgl_fmpy() 83 *dstptr = result; sgl_fmpy() 89 Sgl_setinfinity_exponentmantissa(result); sgl_fmpy() 90 *dstptr = result; sgl_fmpy() 143 Sgl_setinfinity_exponentmantissa(result); sgl_fmpy() 144 *dstptr = result; sgl_fmpy() 179 Sgl_setzero_exponentmantissa(result); sgl_fmpy() 180 *dstptr = result; sgl_fmpy() 195 Sgl_setzero_exponentmantissa(result); sgl_fmpy() 196 *dstptr = result; sgl_fmpy() 222 /* make sure result is left-justified */ sgl_fmpy() 227 /* result mantissa >= 2. */ sgl_fmpy() 230 /* check for denormalized result */ sgl_fmpy() 246 * round result sgl_fmpy() 252 if (Sgl_iszero_sign(result)) sgl_fmpy() 256 if (Sgl_isone_sign(result)) sgl_fmpy() 267 Sgl_set_mantissa(result,opnd3); sgl_fmpy() 276 * Adjust bias of result sgl_fmpy() 278 Sgl_setwrapped_exponent(result,dest_exponent,ovfl); sgl_fmpy() 279 *dstptr = result; sgl_fmpy() 288 /* set result to infinity or largest number */ sgl_fmpy() 289 Sgl_setoverflow(result); sgl_fmpy() 298 * Adjust bias of result sgl_fmpy() 300 Sgl_setwrapped_exponent(result,dest_exponent,unfl); sgl_fmpy() 301 *dstptr = result; sgl_fmpy() 314 if (Sgl_iszero_sign(result)) { sgl_fmpy() 322 if (Sgl_isone_sign(result)) { sgl_fmpy() 342 * denormalize result or set to signed zero sgl_fmpy() 351 if (Sgl_iszero_sign(result)) { sgl_fmpy() 356 if (Sgl_isone_sign(result)) { sgl_fmpy() 369 Sgl_set_exponentmantissa(result,opnd3); sgl_fmpy() 371 else Sgl_set_exponent(result,dest_exponent); sgl_fmpy() 372 *dstptr = result; sgl_fmpy()
|
H A D | fcnvfu.c | 65 register unsigned int src, result; sgl_to_sgl_fcnvfu() local 77 result = 0; sgl_to_sgl_fcnvfu() 79 result = 0xffffffff; sgl_to_sgl_fcnvfu() 85 *dstptr = result; sgl_to_sgl_fcnvfu() 89 * Generate result sgl_to_sgl_fcnvfu() 97 result = 0; sgl_to_sgl_fcnvfu() 102 *dstptr = result; sgl_to_sgl_fcnvfu() 106 Suint_from_sgl_mantissa(src,src_exponent,result); sgl_to_sgl_fcnvfu() 111 /* round result */ sgl_to_sgl_fcnvfu() 114 result++; sgl_to_sgl_fcnvfu() 121 (result & 1))) { sgl_to_sgl_fcnvfu() 122 result++; sgl_to_sgl_fcnvfu() 128 result = 0; sgl_to_sgl_fcnvfu() 133 /* round result */ sgl_to_sgl_fcnvfu() 137 result++; sgl_to_sgl_fcnvfu() 142 result = 0; sgl_to_sgl_fcnvfu() 154 result = 0; sgl_to_sgl_fcnvfu() 161 else result++; sgl_to_sgl_fcnvfu() 167 *dstptr = result; sgl_to_sgl_fcnvfu() 210 * Generate result sgl_to_dbl_fcnvfu() 232 /* round result */ sgl_to_dbl_fcnvfu() 254 /* round result */ sgl_to_dbl_fcnvfu() 304 register unsigned int srcp1, srcp2, result; dbl_to_sgl_fcnvfu() local 316 result = 0; dbl_to_sgl_fcnvfu() 318 result = 0xffffffff; dbl_to_sgl_fcnvfu() 324 *dstptr = result; dbl_to_sgl_fcnvfu() 328 * Generate result dbl_to_sgl_fcnvfu() 336 result = 0; dbl_to_sgl_fcnvfu() 341 *dstptr = result; dbl_to_sgl_fcnvfu() 345 Suint_from_dbl_mantissa(srcp1,srcp2,src_exponent,result); dbl_to_sgl_fcnvfu() 350 /* round result */ dbl_to_sgl_fcnvfu() 353 result++; dbl_to_sgl_fcnvfu() 360 result&1)) dbl_to_sgl_fcnvfu() 361 result++; dbl_to_sgl_fcnvfu() 365 if (result == 0) { dbl_to_sgl_fcnvfu() 366 result = 0xffffffff; dbl_to_sgl_fcnvfu() 371 *dstptr = result; dbl_to_sgl_fcnvfu() 376 result = 0; dbl_to_sgl_fcnvfu() 381 /* round result */ dbl_to_sgl_fcnvfu() 384 if (Dbl_iszero_sign(srcp1)) result++; dbl_to_sgl_fcnvfu() 388 result = 0; dbl_to_sgl_fcnvfu() 400 result = 0; dbl_to_sgl_fcnvfu() 407 else result++; dbl_to_sgl_fcnvfu() 411 *dstptr = result; dbl_to_sgl_fcnvfu() 452 * Generate result dbl_to_dbl_fcnvfu() 475 /* round result */ dbl_to_dbl_fcnvfu() 495 /* round result */ dbl_to_dbl_fcnvfu()
|
H A D | frnd.c | 53 register unsigned int src, result; sgl_frnd() local 86 * Generate result sgl_frnd() 90 result = src; sgl_frnd() 91 Sgl_rightshift(result,(SGL_P-1) - (src_exponent)); sgl_frnd() 95 /* round result */ sgl_frnd() 98 if (Sgl_iszero_sign(src)) Sgl_increment(result); sgl_frnd() 101 if (Sgl_isone_sign(src)) Sgl_increment(result); sgl_frnd() 106 || (Sgl_isone_lowmantissa(result))) sgl_frnd() 107 Sgl_increment(result); sgl_frnd() 110 Sgl_leftshift(result,(SGL_P-1) - (src_exponent)); sgl_frnd() 111 if (Sgl_isone_hiddenoverflow(result)) sgl_frnd() 112 Sgl_set_exponent(result,src_exponent + (SGL_BIAS+1)); sgl_frnd() 113 else Sgl_set_exponent(result,src_exponent + SGL_BIAS); sgl_frnd() 116 result = src; /* set sign */ sgl_frnd() 117 Sgl_setzero_exponentmantissa(result); sgl_frnd() 121 /* round result */ sgl_frnd() 125 Sgl_set_exponent(result,SGL_BIAS); sgl_frnd() 129 Sgl_set_exponent(result,SGL_BIAS); sgl_frnd() 134 Sgl_set_exponent(result,SGL_BIAS); sgl_frnd() 138 *dstptr = result; sgl_frnd() 191 * Generate result dbl_frnd() 201 /* round result */ dbl_frnd() 229 /* round result */ dbl_frnd()
|
H A D | sfsqrt.c | 57 register unsigned int src, result; sgl_fsqrt() local 109 * Generate result sgl_fsqrt() 133 Sgl_setzero(result); sgl_fsqrt() 136 Sgl_addition(result,newbit,sum); sgl_fsqrt() 138 /* update result */ sgl_fsqrt() 139 Sgl_addition(result,(newbit<<1),result); sgl_fsqrt() 147 Sgl_rightshiftby1(result); sgl_fsqrt() 152 if (!even_exponent && Sgl_islessthan(result,src)) sgl_fsqrt() 153 Sgl_increment(result); sgl_fsqrt() 154 guardbit = Sgl_lowmantissa(result); sgl_fsqrt() 155 Sgl_rightshiftby1(result); sgl_fsqrt() 157 /* now round result */ sgl_fsqrt() 160 Sgl_increment(result); sgl_fsqrt() 166 Sgl_increment(result); sgl_fsqrt() 170 /* increment result exponent by 1 if mantissa overflowed */ sgl_fsqrt() 171 if (Sgl_isone_hiddenoverflow(result)) src_exponent+=2; sgl_fsqrt() 174 Sgl_set_exponent(result, sgl_fsqrt() 176 *dstptr = result; sgl_fsqrt() 182 Sgl_rightshiftby1(result); sgl_fsqrt() 184 Sgl_set_exponent(result,((src_exponent-SGL_BIAS)>>1)+SGL_BIAS); sgl_fsqrt() 185 *dstptr = result; sgl_fsqrt()
|
H A D | fcnvxf.c | 65 register unsigned int result = 0; sgl_to_sgl_fcnvxf() local 69 * set sign bit of result and get magnitude of source sgl_to_sgl_fcnvxf() 72 Sgl_setone_sign(result); sgl_to_sgl_fcnvxf() 76 Sgl_setzero_sign(result); sgl_to_sgl_fcnvxf() 79 Sgl_setzero(result); sgl_to_sgl_fcnvxf() 80 *dstptr = result; sgl_to_sgl_fcnvxf() 97 Sgl_set_mantissa(result, src >> (SGL_EXP_LENGTH-1)); sgl_to_sgl_fcnvxf() 98 Sgl_set_exponent(result, 30+SGL_BIAS - dst_exponent); sgl_to_sgl_fcnvxf() 104 if (Sgl_iszero_sign(result)) sgl_to_sgl_fcnvxf() 105 Sgl_increment(result); sgl_to_sgl_fcnvxf() 108 if (Sgl_isone_sign(result)) sgl_to_sgl_fcnvxf() 109 Sgl_increment(result); sgl_to_sgl_fcnvxf() 112 Sgl_roundnearest_from_int(src,result); sgl_to_sgl_fcnvxf() 115 *dstptr = result; sgl_to_sgl_fcnvxf() 120 *dstptr = result; sgl_to_sgl_fcnvxf() 140 * set sign bit of result and get magnitude of source sgl_to_dbl_fcnvxf() 187 unsigned int result = 0, srcp2; dbl_to_sgl_fcnvxf() local 191 * set sign bit of result and get magnitude of source dbl_to_sgl_fcnvxf() 194 Sgl_setone_sign(result); dbl_to_sgl_fcnvxf() 198 Sgl_setzero_sign(result); dbl_to_sgl_fcnvxf() 201 Sgl_setzero(result); dbl_to_sgl_fcnvxf() 202 *dstptr = result; dbl_to_sgl_fcnvxf() 253 Sgl_set_mantissa(result, srcp1 >> SGL_EXP_LENGTH - 1); dbl_to_sgl_fcnvxf() 254 Sgl_set_exponent(result, (62+SGL_BIAS) - dst_exponent); dbl_to_sgl_fcnvxf() 260 if (Sgl_iszero_sign(result)) dbl_to_sgl_fcnvxf() 261 Sgl_increment(result); dbl_to_sgl_fcnvxf() 264 if (Sgl_isone_sign(result)) dbl_to_sgl_fcnvxf() 265 Sgl_increment(result); dbl_to_sgl_fcnvxf() 268 Sgl_roundnearest_from_dint(srcp1,srcp2,result); dbl_to_sgl_fcnvxf() 271 *dstptr = result; dbl_to_sgl_fcnvxf() 276 *dstptr = result; dbl_to_sgl_fcnvxf() 296 * set sign bit of result and get magnitude of source dbl_to_dbl_fcnvxf()
|
H A D | fcnvff.c | 65 Dbl_allp1(resultp1) = Sgl_all(src); /* set sign of result */ sgl_to_dbl_fcnvff() 147 register unsigned int srcp1, srcp2, result; dbl_to_sgl_fcnvff() local 155 Sgl_all(result) = Dbl_allp1(srcp1); /* set sign of result */ dbl_to_sgl_fcnvff() 167 Sgl_setinfinity_exponentmantissa(result); dbl_to_sgl_fcnvff() 168 *dstptr = result; dbl_to_sgl_fcnvff() 186 Sgl_setinfinity_exponent(result); dbl_to_sgl_fcnvff() 187 Sgl_set_mantissa(result,Dallp1(srcp1)<<3 | Dallp2(srcp2)>>29); dbl_to_sgl_fcnvff() 188 if (Sgl_iszero_mantissa(result)) Sgl_set_quiet(result); dbl_to_sgl_fcnvff() 189 *dstptr = result; dbl_to_sgl_fcnvff() 193 * Generate result dbl_to_sgl_fcnvff() 202 Sgl_setzero_exponentmantissa(result); dbl_to_sgl_fcnvff() 203 *dstptr = result; dbl_to_sgl_fcnvff() 211 /* compute result, determine inexact info, dbl_to_sgl_fcnvff() 220 * Now round result if not exact dbl_to_sgl_fcnvff() 225 if (Sgl_iszero_sign(result)) dest_mantissa++; dbl_to_sgl_fcnvff() 228 if (Sgl_isone_sign(result)) dest_mantissa++; dbl_to_sgl_fcnvff() 236 Sgl_set_exponentmantissa(result,dest_mantissa); dbl_to_sgl_fcnvff() 242 Sgl_isone_hidden(result)) dest_exponent++; dbl_to_sgl_fcnvff() 257 * Adjust bias of result dbl_to_sgl_fcnvff() 259 Sgl_setwrapped_exponent(result,dest_exponent,ovfl); dbl_to_sgl_fcnvff() 260 *dstptr = result; dbl_to_sgl_fcnvff() 269 /* set result to infinity or largest number */ dbl_to_sgl_fcnvff() 270 Sgl_setoverflow(result); dbl_to_sgl_fcnvff() 284 * Adjust bias of result dbl_to_sgl_fcnvff() 286 Sgl_setwrapped_exponent(result,dest_exponent,unfl); dbl_to_sgl_fcnvff() 287 *dstptr = result; dbl_to_sgl_fcnvff() 295 * result is denormalized or signed zero dbl_to_sgl_fcnvff() 300 else Sgl_set_exponent(result,dest_exponent); dbl_to_sgl_fcnvff() 301 *dstptr = result; dbl_to_sgl_fcnvff()
|
H A D | sfrem.c | 54 register unsigned int opnd1, opnd2, result; sgl_frem() local 70 Sgl_makequietnan(result); sgl_frem() 71 *dstptr = result; sgl_frem() 141 Sgl_makequietnan(result); sgl_frem() 142 *dstptr = result; sgl_frem() 147 * get sign of result sgl_frem() 149 result = opnd1; sgl_frem() 176 /* find result exponent and divide step loop count */ sgl_frem() 191 Sgl_all(result) = ~Sgl_all(result); /* set sign */ sgl_frem() 200 Sgl_set_exponentmantissa(result,opnd2); sgl_frem() 209 Sgl_set_exponentmantissa(result,opnd1); sgl_frem() 215 * Generate result sgl_frem() 234 Sgl_setzero_exponentmantissa(result); sgl_frem() 235 *dstptr = result; sgl_frem() 242 * In this case the result's sign will be opposite that of sgl_frem() 247 Sgl_invert_sign(result); sgl_frem() 252 Sgl_invert_sign(result); sgl_frem() 255 /* normalize result's mantissa */ sgl_frem() 260 Sgl_set_exponentmantissa(result,opnd1); sgl_frem() 270 * Adjust bias of result sgl_frem() 272 Sgl_setwrapped_exponent(result,dest_exponent,unfl); sgl_frem() 273 *dstptr = result; sgl_frem() 278 * denormalize result or set to signed zero sgl_frem() 281 Sgl_rightshift_exponentmantissa(result,1-dest_exponent); sgl_frem() 284 Sgl_setzero_exponentmantissa(result); sgl_frem() 287 else Sgl_set_exponent(result,dest_exponent); sgl_frem() 288 *dstptr = result; sgl_frem()
|
H A D | fcnvfxt.c | 28 * Single Floating-point to Single Fixed-point /w truncated result 29 * Single Floating-point to Double Fixed-point /w truncated result 30 * Double Floating-point to Single Fixed-point /w truncated result 31 * Double Floating-point to Double Fixed-point /w truncated result 55 * with truncated result 66 register int src_exponent, result; sgl_to_sgl_fcnvfxt() local 78 if (Sgl_iszero_sign(src)) result = 0x7fffffff; sgl_to_sgl_fcnvfxt() 79 else result = 0x80000000; sgl_to_sgl_fcnvfxt() 85 *dstptr = result; sgl_to_sgl_fcnvfxt() 90 * Generate result sgl_to_sgl_fcnvfxt() 96 if (Sgl_isone_sign(src)) result = -Sgl_all(temp); sgl_to_sgl_fcnvfxt() 97 else result = Sgl_all(temp); sgl_to_sgl_fcnvfxt() 98 *dstptr = result; sgl_to_sgl_fcnvfxt() 162 * Generate result sgl_to_dbl_fcnvfxt() 204 register int src_exponent, result; dbl_to_sgl_fcnvfxt() local 215 if (Dbl_iszero_sign(srcp1)) result = 0x7fffffff; dbl_to_sgl_fcnvfxt() 216 else result = 0x80000000; dbl_to_sgl_fcnvfxt() 222 *dstptr = result; dbl_to_sgl_fcnvfxt() 227 * Generate result dbl_to_sgl_fcnvfxt() 235 result = -Dbl_allp1(tempp1); dbl_to_sgl_fcnvfxt() 236 else result = Dbl_allp1(tempp1); dbl_to_sgl_fcnvfxt() 237 *dstptr = result; dbl_to_sgl_fcnvfxt() 298 * Generate result dbl_to_dbl_fcnvfxt()
|
H A D | fcnvfut.c | 56 * with truncated result 63 register unsigned int src, result; sgl_to_sgl_fcnvfut() local 74 result = 0; sgl_to_sgl_fcnvfut() 76 result = 0xffffffff; sgl_to_sgl_fcnvfut() 82 *dstptr = result; sgl_to_sgl_fcnvfut() 86 * Generate result sgl_to_sgl_fcnvfut() 94 result = 0; sgl_to_sgl_fcnvfut() 99 *dstptr = result; sgl_to_sgl_fcnvfut() 103 Suint_from_sgl_mantissa(src,src_exponent,result); sgl_to_sgl_fcnvfut() 104 *dstptr = result; sgl_to_sgl_fcnvfut() 155 * Generate result sgl_to_dbl_fcnvfut() 202 register unsigned int srcp1, srcp2, result; dbl_to_sgl_fcnvfut() local 213 result = 0; dbl_to_sgl_fcnvfut() 215 result = 0xffffffff; dbl_to_sgl_fcnvfut() 221 *dstptr = result; dbl_to_sgl_fcnvfut() 225 * Generate result dbl_to_sgl_fcnvfut() 233 result = 0; dbl_to_sgl_fcnvfut() 238 *dstptr = result; dbl_to_sgl_fcnvfut() 242 Suint_from_dbl_mantissa(srcp1,srcp2,src_exponent,result); dbl_to_sgl_fcnvfut() 243 *dstptr = result; dbl_to_sgl_fcnvfut() 294 * Generate result dbl_to_dbl_fcnvfut()
|
H A D | fcnvuf.c | 65 register unsigned int src, result = 0; sgl_to_sgl_fcnvuf() local 72 Sgl_setzero(result); sgl_to_sgl_fcnvuf() 73 *dstptr = result; sgl_to_sgl_fcnvuf() 88 Sgl_set_mantissa(result, src >> SGL_EXP_LENGTH); sgl_to_sgl_fcnvuf() 89 Sgl_set_exponent(result, 30+SGL_BIAS - dst_exponent); sgl_to_sgl_fcnvuf() 95 Sgl_increment(result); sgl_to_sgl_fcnvuf() 100 Sgl_roundnearest_from_suint(src,result); sgl_to_sgl_fcnvuf() 104 *dstptr = result; sgl_to_sgl_fcnvuf() 109 *dstptr = result; sgl_to_sgl_fcnvuf() 166 unsigned int srcp1, srcp2, result = 0; dbl_to_sgl_fcnvuf() local 172 Sgl_setzero(result); dbl_to_sgl_fcnvuf() 173 *dstptr = result; dbl_to_sgl_fcnvuf() 211 Sgl_set_mantissa(result, srcp1 >> SGL_EXP_LENGTH); dbl_to_sgl_fcnvuf() 212 Sgl_set_exponent(result, (62+SGL_BIAS) - dst_exponent); dbl_to_sgl_fcnvuf() 218 Sgl_increment(result); dbl_to_sgl_fcnvuf() 223 Sgl_roundnearest_from_duint(srcp1,srcp2,result); dbl_to_sgl_fcnvuf() 227 *dstptr = result; dbl_to_sgl_fcnvuf() 232 *dstptr = result; dbl_to_sgl_fcnvuf()
|
/linux-4.1.27/drivers/usb/host/ |
H A D | ohci-ps3.c | 35 int result; ps3_ohci_hc_start() local 45 result = ohci_run(ohci); ps3_ohci_hc_start() 47 if (result < 0) { ps3_ohci_hc_start() 53 return result; ps3_ohci_hc_start() 81 int result; ps3_ohci_probe() local 87 result = -ENODEV; ps3_ohci_probe() 91 result = ps3_open_hv_device(dev); ps3_ohci_probe() 93 if (result) { ps3_ohci_probe() 95 __func__, __LINE__, ps3_result(result)); ps3_ohci_probe() 96 result = -EPERM; ps3_ohci_probe() 100 result = ps3_dma_region_create(dev->d_region); ps3_ohci_probe() 102 if (result) { ps3_ohci_probe() 104 "(%d)\n", __func__, __LINE__, result); ps3_ohci_probe() 109 result = ps3_mmio_region_create(dev->m_region); ps3_ohci_probe() 111 if (result) { ps3_ohci_probe() 114 result = -EPERM; ps3_ohci_probe() 121 result = ps3_io_irq_setup(PS3_BINDING_CPU_ANY, dev->interrupt_id, &virq); ps3_ohci_probe() 123 if (result) { ps3_ohci_probe() 126 result = -EPERM; ps3_ohci_probe() 137 result = -ENOMEM; ps3_ohci_probe() 153 result = -EPERM; ps3_ohci_probe() 168 result = usb_add_hcd(hcd, virq, 0); ps3_ohci_probe() 170 if (result) { ps3_ohci_probe() 172 __func__, __LINE__, result); ps3_ohci_probe() 177 return result; ps3_ohci_probe() 194 return result; ps3_ohci_probe()
|
H A D | ehci-ps3.c | 54 int result; ps3_ehci_hc_reset() local 60 result = ehci_setup(hcd); ps3_ehci_hc_reset() 61 if (result) ps3_ehci_hc_reset() 62 return result; ps3_ehci_hc_reset() 66 return result; ps3_ehci_hc_reset() 98 int result; ps3_ehci_probe() local 104 result = -ENODEV; ps3_ehci_probe() 108 result = ps3_open_hv_device(dev); ps3_ehci_probe() 110 if (result) { ps3_ehci_probe() 116 result = ps3_dma_region_create(dev->d_region); ps3_ehci_probe() 118 if (result) { ps3_ehci_probe() 120 "(%d)\n", __func__, __LINE__, result); ps3_ehci_probe() 125 result = ps3_mmio_region_create(dev->m_region); ps3_ehci_probe() 127 if (result) { ps3_ehci_probe() 130 result = -EPERM; ps3_ehci_probe() 137 result = ps3_io_irq_setup(PS3_BINDING_CPU_ANY, dev->interrupt_id, &virq); ps3_ehci_probe() 139 if (result) { ps3_ehci_probe() 142 result = -EPERM; ps3_ehci_probe() 153 result = -ENOMEM; ps3_ehci_probe() 169 result = -EPERM; ps3_ehci_probe() 184 result = usb_add_hcd(hcd, virq, 0); ps3_ehci_probe() 186 if (result) { ps3_ehci_probe() 188 __func__, __LINE__, result); ps3_ehci_probe() 193 return result; ps3_ehci_probe() 210 return result; ps3_ehci_probe()
|
H A D | hwa-hc.c | 78 int result; __hwahc_set_cluster_id() local 83 result = usb_control_msg(wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0), __hwahc_set_cluster_id() 89 if (result < 0) __hwahc_set_cluster_id() 91 cluster_id, result); __hwahc_set_cluster_id() 95 return result; __hwahc_set_cluster_id() 119 int result; hwahc_op_reset() local 126 result = __wa_set_feature(&hwahc->wa, WA_RESET); hwahc_op_reset() 127 if (result < 0) { hwahc_op_reset() 128 dev_err(dev, "error commanding HC to reset: %d\n", result); hwahc_op_reset() 131 result = __wa_wait_status(&hwahc->wa, WA_STATUS_RESETTING, 0); hwahc_op_reset() 132 if (result < 0) { hwahc_op_reset() 133 dev_err(dev, "error waiting for HC to reset: %d\n", result); hwahc_op_reset() 138 return result; hwahc_op_reset() 147 int result; hwahc_op_start() local 151 result = -ENOSPC; hwahc_op_start() 156 result = __hwahc_set_cluster_id(hwahc, addr); hwahc_op_start() 157 if (result < 0) hwahc_op_start() 170 result = 0; hwahc_op_start() 173 return result; hwahc_op_start() 245 int result; __hwahc_op_wusbhc_start() local 249 result = __wa_set_feature(&hwahc->wa, WA_ENABLE); __hwahc_op_wusbhc_start() 250 if (result < 0) { __hwahc_op_wusbhc_start() 251 dev_err(dev, "error commanding HC to start: %d\n", result); __hwahc_op_wusbhc_start() 254 result = __wa_wait_status(&hwahc->wa, WA_ENABLE, WA_ENABLE); __hwahc_op_wusbhc_start() 255 if (result < 0) { __hwahc_op_wusbhc_start() 256 dev_err(dev, "error waiting for HC to start: %d\n", result); __hwahc_op_wusbhc_start() 259 result = wa_nep_arm(&hwahc->wa, GFP_KERNEL); __hwahc_op_wusbhc_start() 260 if (result < 0) { __hwahc_op_wusbhc_start() 261 dev_err(dev, "cannot listen to notifications: %d\n", result); __hwahc_op_wusbhc_start() 273 result = usb_control_msg(hwahc->wa.usb_dev, __hwahc_op_wusbhc_start() 287 if (result == 0) __hwahc_op_wusbhc_start() 288 result = wa_dti_start(&hwahc->wa); __hwahc_op_wusbhc_start() 290 result = 0; /* OK. Continue normally. */ __hwahc_op_wusbhc_start() 292 if (result < 0) { __hwahc_op_wusbhc_start() 293 dev_err(dev, "cannot start DTI: %d\n", result); __hwahc_op_wusbhc_start() 298 return result; __hwahc_op_wusbhc_start() 304 return result; __hwahc_op_wusbhc_start() 336 int result; __hwahc_op_bwa_set() local 343 result = usb_control_msg(wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0), __hwahc_op_bwa_set() 349 if (result < 0) { __hwahc_op_bwa_set() 350 dev_err(dev, "Cannot set WUSB stream index: %d\n", result); __hwahc_op_bwa_set() 355 result = usb_control_msg(wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0), __hwahc_op_bwa_set() 360 if (result < 0) __hwahc_op_bwa_set() 361 dev_err(dev, "Cannot set WUSB MAS allocation: %d\n", result); __hwahc_op_bwa_set() 363 return result; __hwahc_op_bwa_set() 469 int result = -ENOMEM; __hwahc_dev_set_key() local 488 result = usb_control_msg(wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0), __hwahc_dev_set_key() 496 return result; __hwahc_dev_set_key() 509 int result = -ENOMEM; __hwahc_op_set_ptk() local 520 result = __hwahc_dev_set_key(wusbhc, port_idx, tkid, __hwahc_op_set_ptk() 522 if (result < 0) __hwahc_op_set_ptk() 531 result = usb_control_msg(wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0), __hwahc_op_set_ptk() 536 if (result < 0) __hwahc_op_set_ptk() 540 wusbhc->ccm1_etd->bEncryptionValue, result); __hwahc_op_set_ptk() 542 return result; __hwahc_op_set_ptk() 568 int result; wa_fill_descr() local 596 result = -EINVAL; wa_fill_descr() 612 result = 0; wa_fill_descr() 614 return result; wa_fill_descr() 638 int result; hwahc_security_create() local 655 result = __usb_get_extra_descriptor(usb_dev->rawdescriptors[index], hwahc_security_create() 658 if (result == -1) { hwahc_security_create() 720 int result; hwahc_create() local 732 result = wa_fill_descr(wa); /* Get the device descriptor */ hwahc_create() 733 if (result < 0) hwahc_create() 752 result = hwahc_security_create(hwahc); hwahc_create() 753 if (result < 0) { hwahc_create() 754 dev_err(dev, "Can't initialize security: %d\n", result); hwahc_create() 758 result = wusbhc_create(&hwahc->wusbhc); hwahc_create() 759 if (result < 0) { hwahc_create() 760 dev_err(dev, "Can't create WUSB HC structures: %d\n", result); hwahc_create() 763 result = wa_create(&hwahc->wa, iface, quirks); hwahc_create() 764 if (result < 0) hwahc_create() 776 return result; hwahc_create() 802 int result; hwahc_probe() local 808 result = -ENOMEM; hwahc_probe() 819 result = hwahc_create(hwahc, usb_iface, id->driver_info); hwahc_probe() 820 if (result < 0) { hwahc_probe() 821 dev_err(dev, "Cannot initialize internals: %d\n", result); hwahc_probe() 824 result = usb_add_hcd(usb_hcd, 0, 0); hwahc_probe() 825 if (result < 0) { hwahc_probe() 826 dev_err(dev, "Cannot add HCD: %d\n", result); hwahc_probe() 830 result = wusbhc_b_create(&hwahc->wusbhc); hwahc_probe() 831 if (result < 0) { hwahc_probe() 832 dev_err(dev, "Cannot setup phase B of WUSBHC: %d\n", result); hwahc_probe() 844 return result; hwahc_probe()
|
/linux-4.1.27/net/wimax/ |
H A D | debugfs.c | 33 result = d_level_register_debugfs(prefix, name, parent); \ 34 if (result < 0) \ 41 int result; wimax_debugfs_add() local 49 result = PTR_ERR(dentry); wimax_debugfs_add() 51 if (result == -ENODEV) wimax_debugfs_add() 52 result = 0; /* No debugfs support */ wimax_debugfs_add() 55 result); wimax_debugfs_add() 66 result = 0; wimax_debugfs_add() 68 return result; wimax_debugfs_add() 72 return result; wimax_debugfs_add()
|
H A D | op-rfkill.c | 96 int result; wimax_report_rfkill_hw() local 105 result = wimax_dev_is_ready(wimax_dev); wimax_report_rfkill_hw() 106 if (result < 0) wimax_report_rfkill_hw() 117 result = rfkill_set_hw_state(wimax_dev->rfkill, wimax_report_rfkill_hw() 125 wimax_dev, state, result); wimax_report_rfkill_hw() 152 int result; wimax_report_rfkill_sw() local 161 result = wimax_dev_is_ready(wimax_dev); wimax_report_rfkill_sw() 162 if (result < 0) wimax_report_rfkill_sw() 178 wimax_dev, state, result); wimax_report_rfkill_sw() 209 int result = 0; __wimax_rf_toggle_radio() local 218 result = wimax_dev->op_rfkill_sw_toggle(wimax_dev, state); __wimax_rf_toggle_radio() 220 result = -ENXIO; __wimax_rf_toggle_radio() 222 result = 0; /* should never happen tho */ __wimax_rf_toggle_radio() 223 if (result >= 0) { __wimax_rf_toggle_radio() 224 result = 0; __wimax_rf_toggle_radio() 232 wimax_dev, state, result); __wimax_rf_toggle_radio() 233 return result; __wimax_rf_toggle_radio() 251 int result; wimax_rfkill_set_radio_block() local 262 result = 0; wimax_rfkill_set_radio_block() 264 result = __wimax_rf_toggle_radio(wimax_dev, rf_state); wimax_rfkill_set_radio_block() 267 wimax_dev, blocked, result); wimax_rfkill_set_radio_block() 268 return result; wimax_rfkill_set_radio_block() 303 int result; wimax_rfkill() local 308 result = wimax_dev_is_ready(wimax_dev); wimax_rfkill() 309 if (result < 0) { wimax_rfkill() 314 if (result == -ENOMEDIUM && state == WIMAX_RF_QUERY) wimax_rfkill() 315 result = WIMAX_RF_OFF << 1 | WIMAX_RF_OFF; wimax_rfkill() 321 result = __wimax_rf_toggle_radio(wimax_dev, state); wimax_rfkill() 322 if (result < 0) wimax_rfkill() 329 result = -EINVAL; wimax_rfkill() 332 result = wimax_dev->rf_sw << 1 | wimax_dev->rf_hw; wimax_rfkill() 337 wimax_dev, state, result); wimax_rfkill() 338 return result; wimax_rfkill() 350 int result; wimax_rfkill_add() local 356 result = -ENOMEM; wimax_rfkill_add() 367 result = rfkill_register(wimax_dev->rfkill); wimax_rfkill_add() 368 if (result < 0) wimax_rfkill_add() 381 d_fnend(3, dev, "(wimax_dev %p) = %d\n", wimax_dev, result); wimax_rfkill_add() 382 return result; wimax_rfkill_add() 416 int result, ifindex; wimax_gnl_doit_rfkill() local 422 result = -ENODEV; wimax_gnl_doit_rfkill() 432 result = -EINVAL; wimax_gnl_doit_rfkill() 440 /* Execute the operation and send the result back to user space */ wimax_gnl_doit_rfkill() 441 result = wimax_rfkill(wimax_dev, new_state); wimax_gnl_doit_rfkill() 445 d_fnend(3, NULL, "(skb %p info %p) = %d\n", skb, info, result); wimax_gnl_doit_rfkill() 446 return result; wimax_gnl_doit_rfkill()
|
H A D | op-reset.c | 71 int result = -EINVAL; wimax_reset() local 84 result = wimax_dev->op_reset(wimax_dev); wimax_reset() 89 d_fnend(3, dev, "(wimax_dev %p) = %d\n", wimax_dev, result); wimax_reset() 90 return result; wimax_reset() 104 int result, ifindex; wimax_gnl_doit_reset() local 108 result = -ENODEV; wimax_gnl_doit_reset() 117 /* Execute the operation and send the result back to user space */ wimax_gnl_doit_reset() 118 result = wimax_reset(wimax_dev); wimax_gnl_doit_reset() 121 d_fnend(3, NULL, "(skb %p info %p) = %d\n", skb, info, result); wimax_gnl_doit_reset() 122 return result; wimax_gnl_doit_reset()
|
H A D | op-state-get.c | 46 int result, ifindex; wimax_gnl_doit_state_get() local 50 result = -ENODEV; wimax_gnl_doit_state_get() 59 /* Execute the operation and send the result back to user space */ wimax_gnl_doit_state_get() 60 result = wimax_state_get(wimax_dev); wimax_gnl_doit_state_get() 63 d_fnend(3, NULL, "(skb %p info %p) = %d\n", skb, info, result); wimax_gnl_doit_state_get() 64 return result; wimax_gnl_doit_state_get()
|
/linux-4.1.27/arch/metag/lib/ |
H A D | checksum.c | 52 unsigned int result = 0; do_csum() local 59 result += (*buff << 8); do_csum() 61 result = *buff; do_csum() 68 result += *(unsigned short *) buff; do_csum() 78 result += carry; do_csum() 79 result += w; do_csum() 80 carry = (w > result); do_csum() 82 result += carry; do_csum() 83 result = (result & 0xffff) + (result >> 16); do_csum() 86 result += *(unsigned short *) buff; do_csum() 92 result += *buff; do_csum() 94 result += (*buff << 8); do_csum() 96 result = from32to16(result); do_csum() 98 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); do_csum() 100 return result; do_csum() 119 unsigned int result = do_csum(buff, len); csum_partial() local 122 result += sum; csum_partial() 123 if (sum > result) csum_partial() 124 result += 1; csum_partial() 125 return (__force __wsum)result; csum_partial()
|
H A D | divsi3.S | 17 MOV D0Ar4,#0 ! Return positive result 33 XOR D0Ar4,D1Ar1,D1Re0 ! D0Ar4 -ive if result is -ive 47 ADDCC D0Re0,D0Re0,#2 ! If yes result += 2 50 ADDCC D0Re0,D0Re0,#1 ! If yes result += 1 52 ORS D0Ar4,D0Ar4,D0Ar4 ! Return neg result? 53 NEG D0Ar2,D0Re0 ! Calulate neg result 54 MOVMI D0Re0,D0Ar2 ! Yes: Take neg result 60 !! D0Re0 is used to form the result, already set to Zero 63 !! D0Ar4 is negative if we should return a negative result 86 !! if ( A >= B ) add curbit to result and subtract B from A 91 ADDCC D0Re0, D0Re0, D0Ar6 ! If yes result += curbit 96 ORS D0Ar4,D0Ar4,D0Ar4 ! Return neg result? 97 NEG D0Ar2,D0Re0 ! Calulate neg result 98 MOVMI D0Re0,D0Ar2 ! Yes: Take neg result
|
/linux-4.1.27/lib/ |
H A D | checksum.c | 53 unsigned int result = 0; do_csum() local 60 result += (*buff << 8); do_csum() 62 result = *buff; do_csum() 69 result += *(unsigned short *) buff; do_csum() 79 result += carry; do_csum() 80 result += w; do_csum() 81 carry = (w > result); do_csum() 83 result += carry; do_csum() 84 result = (result & 0xffff) + (result >> 16); do_csum() 87 result += *(unsigned short *) buff; do_csum() 93 result += *buff; do_csum() 95 result += (*buff << 8); do_csum() 97 result = from32to16(result); do_csum() 99 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); do_csum() 101 return result; do_csum() 132 unsigned int result = do_csum(buff, len); csum_partial() local 135 result += sum; csum_partial() 136 if (sum > result) csum_partial() 137 result += 1; csum_partial() 138 return (__force __wsum)result; csum_partial()
|
/linux-4.1.27/drivers/platform/x86/ |
H A D | toshiba_bluetooth.c | 67 acpi_status result; toshiba_bluetooth_present() local 75 result = acpi_evaluate_integer(handle, "_STA", NULL, &bt_present); toshiba_bluetooth_present() 76 if (ACPI_FAILURE(result)) { toshiba_bluetooth_present() 89 acpi_status result; toshiba_bluetooth_status() local 92 result = acpi_evaluate_integer(handle, "BTST", NULL, &status); toshiba_bluetooth_status() 93 if (ACPI_FAILURE(result)) { toshiba_bluetooth_status() 105 acpi_status result; toshiba_bluetooth_enable() local 134 result = acpi_evaluate_object(handle, "AUSB", NULL, NULL); toshiba_bluetooth_enable() 135 if (ACPI_FAILURE(result)) { toshiba_bluetooth_enable() 140 result = acpi_evaluate_object(handle, "BTPO", NULL, NULL); toshiba_bluetooth_enable() 141 if (ACPI_FAILURE(result)) { toshiba_bluetooth_enable() 151 acpi_status result; toshiba_bluetooth_disable() local 153 result = acpi_evaluate_object(handle, "BTPF", NULL, NULL); toshiba_bluetooth_disable() 154 if (ACPI_FAILURE(result)) { toshiba_bluetooth_disable() 159 result = acpi_evaluate_object(handle, "DUSB", NULL, NULL); toshiba_bluetooth_disable() 160 if (ACPI_FAILURE(result)) { toshiba_bluetooth_disable() 182 int result; toshiba_bt_rfkill_add() local 184 result = toshiba_bluetooth_present(device->handle); toshiba_bt_rfkill_add() 185 if (result) toshiba_bt_rfkill_add() 186 return result; toshiba_bt_rfkill_add() 191 result = toshiba_bluetooth_enable(device->handle); toshiba_bt_rfkill_add() 192 if (result) toshiba_bt_rfkill_add() 193 return result; toshiba_bt_rfkill_add() 195 return result; toshiba_bt_rfkill_add()
|
H A D | intel_menlow.c | 94 unsigned long long result; memory_get_cur_bandwidth() local 104 &arg_list, &result); memory_get_cur_bandwidth() 108 *value = result; memory_get_cur_bandwidth() 156 int result = -ENODEV; intel_menlow_memory_add() local 171 result = PTR_ERR(cdev); intel_menlow_memory_add() 176 result = sysfs_create_link(&device->dev.kobj, intel_menlow_memory_add() 178 if (result) intel_menlow_memory_add() 181 result = sysfs_create_link(&cdev->device.kobj, intel_menlow_memory_add() 183 if (result) { intel_menlow_memory_add() 189 return result; intel_menlow_memory_add() 193 return result; intel_menlow_memory_add() 314 int result; aux0_show() local 316 result = sensor_get_auxtrip(attr->handle, 0, &value); aux0_show() 318 return result ? result : sprintf(buf, "%lu", KELVIN_TO_CELSIUS(value)); aux0_show() 326 int result; aux1_show() local 328 result = sensor_get_auxtrip(attr->handle, 1, &value); aux1_show() 330 return result ? result : sprintf(buf, "%lu", KELVIN_TO_CELSIUS(value)); aux1_show() 339 int result; aux0_store() local 348 result = sensor_set_auxtrip(attr->handle, 0, CELSIUS_TO_KELVIN(value)); aux0_store() 349 return result ? result : count; aux0_store() 358 int result; aux1_store() local 367 result = sensor_set_auxtrip(attr->handle, 1, CELSIUS_TO_KELVIN(value)); aux1_store() 368 return result ? result : count; aux1_store() 391 int result; intel_menlow_add_one_attribute() local 405 result = device_create_file(dev, &attr->attr); intel_menlow_add_one_attribute() 406 if (result) { intel_menlow_add_one_attribute() 408 return result; intel_menlow_add_one_attribute() 424 int result; intel_menlow_register_sensor() local 426 result = acpi_bus_get_private_data(handle, (void **)&thermal); intel_menlow_register_sensor() 427 if (result) intel_menlow_register_sensor() 439 result = intel_menlow_add_one_attribute("aux0", 0644, intel_menlow_register_sensor() 442 if (result) intel_menlow_register_sensor() 453 result = intel_menlow_add_one_attribute("aux1", 0644, intel_menlow_register_sensor() 456 if (result) { intel_menlow_register_sensor() 466 result = intel_menlow_add_one_attribute("bios_enabled", 0444, intel_menlow_register_sensor() 469 if (result) { intel_menlow_register_sensor() 501 int result = -ENODEV; intel_menlow_module_init() local 506 return result; intel_menlow_module_init() 514 result = acpi_bus_register_driver(&intel_menlow_memory_driver); intel_menlow_module_init() 515 if (result) intel_menlow_module_init() 516 return result; intel_menlow_module_init()
|
H A D | msi-laptop.c | 173 int result; get_lcd_level() local 175 result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, get_lcd_level() 177 if (result < 0) get_lcd_level() 178 return result; get_lcd_level() 186 int result; get_auto_brightness() local 188 result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, get_auto_brightness() 190 if (result < 0) get_auto_brightness() 191 return result; get_auto_brightness() 199 int result; set_auto_brightness() local 203 result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 1, set_auto_brightness() 205 if (result < 0) set_auto_brightness() 206 return result; set_auto_brightness() 219 int result; set_device_state() local 228 result = ec_read(MSI_STANDARD_EC_COMMAND_ADDRESS, &rdata); set_device_state() 229 if (result < 0) set_device_state() 230 return result; set_device_state() 239 result = ec_write(MSI_STANDARD_EC_COMMAND_ADDRESS, wdata); set_device_state() 240 if (result < 0) set_device_state() 241 return result; set_device_state() 250 int result; get_wireless_state() local 252 result = ec_transaction(MSI_EC_COMMAND_WIRELESS, &wdata, 1, &rdata, 1); get_wireless_state() 253 if (result < 0) get_wireless_state() 254 return result; get_wireless_state() 268 int result; get_wireless_state_ec_standard() local 270 result = ec_read(MSI_STANDARD_EC_COMMAND_ADDRESS, &rdata); get_wireless_state_ec_standard() 271 if (result < 0) get_wireless_state_ec_standard() 272 return result; get_wireless_state_ec_standard() 286 int result; get_threeg_exists() local 288 result = ec_read(MSI_STANDARD_EC_DEVICES_EXISTS_ADDRESS, &rdata); get_threeg_exists() 289 if (result < 0) get_threeg_exists() 290 return result; get_threeg_exists() 454 int result; show_touchpad() local 456 result = ec_read(MSI_STANDARD_EC_FUNCTIONS_ADDRESS, &rdata); show_touchpad() 457 if (result < 0) show_touchpad() 458 return result; show_touchpad() 468 int result; show_turbo() local 470 result = ec_read(MSI_STANDARD_EC_FUNCTIONS_ADDRESS, &rdata); show_turbo() 471 if (result < 0) show_turbo() 472 return result; show_turbo() 482 int result; show_eco() local 484 result = ec_read(MSI_STANDARD_EC_FUNCTIONS_ADDRESS, &rdata); show_eco() 485 if (result < 0) show_eco() 486 return result; show_eco() 496 int result; show_turbo_cooldown() local 498 result = ec_read(MSI_STANDARD_EC_FUNCTIONS_ADDRESS, &rdata); show_turbo_cooldown() 499 if (result < 0) show_turbo_cooldown() 500 return result; show_turbo_cooldown() 511 int result; show_auto_fan() local 513 result = ec_read(MSI_STANDARD_EC_FAN_ADDRESS, &rdata); show_auto_fan() 514 if (result < 0) show_auto_fan() 515 return result; show_auto_fan() 524 int enable, result; store_auto_fan() local 529 result = ec_write(MSI_STANDARD_EC_FAN_ADDRESS, enable); store_auto_fan() 530 if (result < 0) store_auto_fan() 531 return result; store_auto_fan() 728 int result = set_device_state(blocked ? "0" : "1", 0, rfkill_bluetooth_set() local 731 return min(result, 0); rfkill_bluetooth_set() 736 int result = set_device_state(blocked ? "0" : "1", 0, rfkill_wlan_set() local 739 return min(result, 0); rfkill_wlan_set() 744 int result = set_device_state(blocked ? "0" : "1", 0, rfkill_threeg_set() local 747 return min(result, 0); rfkill_threeg_set() 805 int result; msi_send_touchpad_key() local 807 result = ec_read(MSI_STANDARD_EC_FUNCTIONS_ADDRESS, &rdata); msi_send_touchpad_key() 808 if (result < 0) msi_send_touchpad_key() 940 int result; msi_laptop_resume() local 946 result = ec_read(MSI_STANDARD_EC_SCM_LOAD_ADDRESS, &data); msi_laptop_resume() 947 if (result < 0) msi_laptop_resume() 948 return result; msi_laptop_resume() 950 result = ec_write(MSI_STANDARD_EC_SCM_LOAD_ADDRESS, msi_laptop_resume() 952 if (result < 0) msi_laptop_resume() 953 return result; msi_laptop_resume() 998 int result; load_scm_model_init() local 1011 result = ec_read(MSI_STANDARD_EC_SCM_LOAD_ADDRESS, &data); load_scm_model_init() 1012 if (result < 0) load_scm_model_init() 1013 return result; load_scm_model_init() 1015 result = ec_write(MSI_STANDARD_EC_SCM_LOAD_ADDRESS, load_scm_model_init() 1017 if (result < 0) load_scm_model_init() 1018 return result; load_scm_model_init() 1021 result = rfkill_init(sdev); load_scm_model_init() 1022 if (result < 0) load_scm_model_init() 1026 result = msi_laptop_input_setup(); load_scm_model_init() 1027 if (result) load_scm_model_init() 1030 result = i8042_install_filter(msi_laptop_i8042_filter); load_scm_model_init() 1031 if (result) { load_scm_model_init() 1046 return result; load_scm_model_init()
|
/linux-4.1.27/drivers/acpi/ |
H A D | sysfs.c | 105 int result = 0; param_get_debug_layer() local 108 result = sprintf(buffer, "%-25s\tHex SET\n", "Description"); param_get_debug_layer() 111 result += sprintf(buffer + result, "%-25s\t0x%08lX [%c]\n", param_get_debug_layer() 117 result += param_get_debug_layer() 118 sprintf(buffer + result, "%-25s\t0x%08X [%c]\n", "ACPI_ALL_DRIVERS", param_get_debug_layer() 123 result += param_get_debug_layer() 124 sprintf(buffer + result, param_get_debug_layer() 128 return result; param_get_debug_layer() 133 int result = 0; param_get_debug_level() local 136 result = sprintf(buffer, "%-25s\tHex SET\n", "Description"); param_get_debug_level() 139 result += sprintf(buffer + result, "%-25s\t0x%08lX [%c]\n", param_get_debug_level() 145 result += param_get_debug_level() 146 sprintf(buffer + result, "--\ndebug_level = 0x%08X (* = enabled)\n", param_get_debug_level() 149 return result; param_get_debug_level() 174 int result = 0; param_set_trace_state() local 177 result = acpi_debug_trace(trace_method_name, trace_debug_level, param_set_trace_state() 179 if (result) param_set_trace_state() 180 result = -EBUSY; param_set_trace_state() 186 result = acpi_debug_trace((char *)&name, trace_debug_level, param_set_trace_state() 188 if (result) param_set_trace_state() 189 result = -EBUSY; param_set_trace_state() 194 result = acpi_debug_trace(trace_method_name, trace_debug_level, param_set_trace_state() 196 if (result) param_set_trace_state() 197 result = -EBUSY; param_set_trace_state() 201 result = -EINVAL; param_set_trace_state() 203 return result; param_set_trace_state() 234 int result; param_get_acpica_version() local 236 result = sprintf(buffer, "%x", ACPI_CA_VERSION); param_get_acpica_version() 238 return result; param_get_acpica_version() 495 int result = 0; get_status() local 501 result = acpi_get_gpe_device(index, handle); get_status() 502 if (result) { get_status() 507 result = acpi_get_gpe_status(*handle, index, status); get_status() 509 result = acpi_get_event_status(index - num_gpes, status); get_status() 512 return result; get_status() 522 int result = 0; counter_show() local 536 result = get_status(index, &status, &handle); counter_show() 537 if (result) counter_show() 551 return result ? result : size; counter_show() 566 int result = 0; counter_set() local 580 result = get_status(index, &status, &handle); counter_set() 581 if (result) counter_set() 593 result = acpi_disable_gpe(handle, index); counter_set() 596 result = acpi_enable_gpe(handle, index); counter_set() 599 result = acpi_clear_gpe(handle, index); counter_set() 603 result = -EINVAL; counter_set() 608 result = acpi_disable_event(event, ACPI_NOT_ISR); counter_set() 611 result = acpi_enable_event(event, ACPI_NOT_ISR); counter_set() 614 result = acpi_clear_event(event); counter_set() 618 result = -EINVAL; counter_set() 622 if (ACPI_FAILURE(result)) counter_set() 623 result = -EINVAL; counter_set() 625 return result ? result : size; counter_set() 811 int result; acpi_sysfs_init() local 813 result = acpi_tables_sysfs_init(); acpi_sysfs_init() 814 if (result) acpi_sysfs_init() 815 return result; acpi_sysfs_init() 818 result = sysfs_create_file(hotplug_kobj, &force_remove_attr.attr); acpi_sysfs_init() 819 if (result) acpi_sysfs_init() 820 return result; acpi_sysfs_init() 822 result = sysfs_create_file(acpi_kobj, &pm_profile_attr.attr); acpi_sysfs_init() 823 return result; acpi_sysfs_init()
|
H A D | sbs.c | 351 int result = 0; acpi_manager_get_info() local 354 result = acpi_smbus_read(sbs->hc, SMBUS_READ_WORD, ACPI_SBS_MANAGER, acpi_manager_get_info() 356 if (!result) acpi_manager_get_info() 358 return result; acpi_manager_get_info() 363 int i, result = 0; acpi_battery_get_info() local 366 result = acpi_smbus_read(battery->sbs->hc, acpi_battery_get_info() 372 if (result) acpi_battery_get_info() 375 return result; acpi_battery_get_info() 380 int i, result = 0; acpi_battery_get_state() local 387 result = acpi_smbus_read(battery->sbs->hc, acpi_battery_get_state() 393 if (result) acpi_battery_get_state() 398 return result; acpi_battery_get_state() 439 int result; acpi_ac_get_present() local 442 result = acpi_smbus_read(sbs->hc, SMBUS_READ_WORD, ACPI_SBS_CHARGER, acpi_ac_get_present() 445 if (result) acpi_ac_get_present() 446 return result; acpi_ac_get_present() 494 int result = 0, saved_present = battery->present; acpi_battery_read() local 498 result = acpi_smbus_read(battery->sbs->hc, SMBUS_READ_WORD, acpi_battery_read() 500 if (!result) acpi_battery_read() 509 if (result || !battery->present) acpi_battery_read() 510 return result; acpi_battery_read() 514 result = acpi_battery_get_info(battery); acpi_battery_read() 515 if (result) { acpi_battery_read() 517 return result; acpi_battery_read() 520 result = acpi_battery_get_state(battery); acpi_battery_read() 521 if (result) acpi_battery_read() 523 return result; acpi_battery_read() 531 int result; acpi_battery_add() local 535 result = acpi_battery_read(battery); acpi_battery_add() 536 if (result) acpi_battery_add() 537 return result; acpi_battery_add() 555 result = PTR_ERR(battery->bat); acpi_battery_add() 560 result = device_create_file(&battery->bat->dev, &alarm_attr); acpi_battery_add() 561 if (result) acpi_battery_add() 568 return result; acpi_battery_add() 584 int result; acpi_charger_add() local 587 result = acpi_ac_get_present(sbs); acpi_charger_add() 588 if (result) acpi_charger_add() 595 result = PTR_ERR(sbs->charger); acpi_charger_add() 602 return result; acpi_charger_add() 659 int result = 0; acpi_sbs_add() local 666 result = -ENOMEM; acpi_sbs_add() 678 result = acpi_charger_add(sbs); acpi_sbs_add() 679 if (result && result != -ENODEV) acpi_sbs_add() 682 result = 0; acpi_sbs_add() 685 result = acpi_manager_get_info(sbs); acpi_sbs_add() 686 if (!result) { acpi_sbs_add() 699 if (result) acpi_sbs_add() 701 return result; acpi_sbs_add() 754 int result = 0; acpi_sbs_init() local 759 result = acpi_bus_register_driver(&acpi_sbs_driver); acpi_sbs_init() 760 if (result < 0) acpi_sbs_init()
|
H A D | power.c | 207 int result; list_for_each_entry() local 210 result = acpi_power_get_state(handle, &cur_state); list_for_each_entry() 212 if (result) list_for_each_entry() 213 return result; list_for_each_entry() 242 int result = 0; acpi_power_on_unlocked() local 249 result = __acpi_power_on(resource); acpi_power_on_unlocked() 250 if (result) acpi_power_on_unlocked() 253 return result; acpi_power_on_unlocked() 258 int result; acpi_power_on() local 261 result = acpi_power_on_unlocked(resource); acpi_power_on() 263 return result; acpi_power_on() 282 int result = 0; acpi_power_off_unlocked() local 296 result = __acpi_power_off(resource); acpi_power_off_unlocked() 297 if (result) acpi_power_off_unlocked() 300 return result; acpi_power_off_unlocked() 305 int result; acpi_power_off() local 308 result = acpi_power_off_unlocked(resource); acpi_power_off() 310 return result; acpi_power_off() 316 int result = 0; acpi_power_off_list() local 319 result = acpi_power_off(entry->resource); list_for_each_entry_reverse() 320 if (result) list_for_each_entry_reverse() 329 return result; 335 int result = 0; acpi_power_on_list() local 338 result = acpi_power_on(entry->resource); list_for_each_entry() 339 if (result) list_for_each_entry() 348 return result; 462 int result; list_for_each_entry() local 467 result = acpi_power_get_state(handle, &state); list_for_each_entry() 468 if (result) { list_for_each_entry() 470 return result; list_for_each_entry() 660 int result = 0; acpi_power_get_inferred_state() local 677 result = acpi_power_get_list_state(list, &list_state); acpi_power_get_inferred_state() 678 if (result) acpi_power_get_inferred_state() 679 return result; acpi_power_get_inferred_state() 701 int result = 0; acpi_power_transition() local 721 result = acpi_power_on_list( acpi_power_transition() 724 if (!result && device->power.state < ACPI_STATE_D3_COLD) acpi_power_transition() 729 device->power.state = result ? ACPI_STATE_UNKNOWN : state; acpi_power_transition() 731 return result; acpi_power_transition() 771 int state, result = -ENODEV; acpi_add_power_resource() local 799 result = acpi_power_get_state(handle, &state); acpi_add_power_resource() 800 if (result) acpi_add_power_resource() 807 result = acpi_device_add(device, acpi_release_power_resource); acpi_add_power_resource() 808 if (result) acpi_add_power_resource() 822 return result; acpi_add_power_resource() 833 int result, state; acpi_resume_power_resources() local 837 result = acpi_power_get_state(resource->device.handle, &state); acpi_resume_power_resources() 838 if (result) { acpi_resume_power_resources()
|
/linux-4.1.27/Documentation/pcmcia/ |
H A D | crc32hash.c | 24 unsigned int result; main() local 29 result = crc32((unsigned char const *)argv[1], strlen(argv[1])); main() 30 printf("0x%x\n", result); main()
|
/linux-4.1.27/drivers/staging/wlan-ng/ |
H A D | prism2mgmt.c | 118 int result = 0; prism2mgmt_scan() local 134 result = 1; prism2mgmt_scan() 142 result = hfa384x_drvr_getconfig16(hw, prism2mgmt_scan() 145 if (result) { prism2mgmt_scan() 147 "getconfig(ROAMMODE) failed. result=%d\n", result); prism2mgmt_scan() 154 result = hfa384x_drvr_setconfig16(hw, prism2mgmt_scan() 157 if (result) { prism2mgmt_scan() 159 "setconfig(ROAMINGMODE) failed. result=%d\n", prism2mgmt_scan() 160 result); prism2mgmt_scan() 176 result = prism2mgmt_scan() 179 if (result) { prism2mgmt_scan() 206 result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_PORTSTATUS, &word); prism2mgmt_scan() 207 if (result) { prism2mgmt_scan() 209 "getconfig(PORTSTATUS) failed. result=%d\n", result); prism2mgmt_scan() 217 result = hfa384x_drvr_setconfig16(hw, prism2mgmt_scan() 220 if (result) { prism2mgmt_scan() 222 "setconfig(ROAMINGMODE) failed. result=%d\n", prism2mgmt_scan() 223 result); prism2mgmt_scan() 233 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID, prism2mgmt_scan() 236 if (result) { prism2mgmt_scan() 242 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID, prism2mgmt_scan() 245 if (result) { prism2mgmt_scan() 253 result = hfa384x_drvr_setconfig16(hw, prism2mgmt_scan() 256 if (result) { prism2mgmt_scan() 264 result = hfa384x_drvr_setconfig16(hw, prism2mgmt_scan() 267 if (result) { prism2mgmt_scan() 274 result = hfa384x_drvr_enable(hw, 0); prism2mgmt_scan() 275 if (result) { prism2mgmt_scan() 277 "drvr_enable(0) failed. result=%d\n", prism2mgmt_scan() 278 result); prism2mgmt_scan() 293 result = hfa384x_drvr_setconfig(hw, prism2mgmt_scan() 296 if (result) { prism2mgmt_scan() 298 "setconfig(SCANREQUEST) failed. result=%d\n", prism2mgmt_scan() 299 result); prism2mgmt_scan() 318 result = hfa384x_drvr_disable(hw, 0); prism2mgmt_scan() 319 if (result) { prism2mgmt_scan() 321 "drvr_disable(0) failed. result=%d\n", prism2mgmt_scan() 322 result); prism2mgmt_scan() 330 result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFROAMINGMODE, prism2mgmt_scan() 332 if (result) { prism2mgmt_scan() 334 "setconfig(ROAMMODE) failed. result=%d\n", result); prism2mgmt_scan() 340 result = 0; prism2mgmt_scan() 346 return result; prism2mgmt_scan() 371 int result = 0; prism2mgmt_scan_results() local 385 result = 2; prism2mgmt_scan_results() 397 result = 2; prism2mgmt_scan_results() 402 item = &(hw->scanresults->info.hscanresult.result[req->bssindex.data]); prism2mgmt_scan_results() 502 result = 0; prism2mgmt_scan_results() 506 return result; prism2mgmt_scan_results() 530 int result = 0; prism2mgmt_start() local 563 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID, prism2mgmt_start() 565 if (result) { prism2mgmt_start() 569 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID, prism2mgmt_start() 572 if (result) { prism2mgmt_start() 583 result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFAPBCNint, word); prism2mgmt_start() 584 if (result) { prism2mgmt_start() 592 result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFOWNCHANNEL, word); prism2mgmt_start() 593 if (result) { prism2mgmt_start() 621 result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFBASICRATES, word); prism2mgmt_start() 622 if (result) { prism2mgmt_start() 651 result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFSUPPRATES, word); prism2mgmt_start() 652 if (result) { prism2mgmt_start() 658 result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_TXRATECNTL, word); prism2mgmt_start() 659 if (result) { prism2mgmt_start() 673 result = hfa384x_drvr_enable(hw, 0); prism2mgmt_start() 674 if (result) { prism2mgmt_start() 676 "Enable macport failed, result=%d.\n", result); prism2mgmt_start() 684 pr_debug("Failed to set a config option, result=%d\n", result); prism2mgmt_start() 688 result = 0; prism2mgmt_start() 690 return result; prism2mgmt_start() 715 int result; prism2mgmt_readpda() local 730 result = hfa384x_drvr_readpda(hw, prism2mgmt_readpda() 733 if (result) { prism2mgmt_readpda() 735 "hfa384x_drvr_readpda() failed, result=%d\n", prism2mgmt_readpda() 736 result); prism2mgmt_readpda() 895 int result = 0; prism2mgmt_flashdl_state() local 932 result = prism2sta_ifstate(wlandev, P80211ENUM_ifstate_fwload); prism2mgmt_flashdl_state() 933 if (result != P80211ENUM_resultcode_success) { prism2mgmt_flashdl_state() 936 result); prism2mgmt_flashdl_state() 939 result = -1; prism2mgmt_flashdl_state() 1027 int result = 0; prism2mgmt_autojoin() local 1059 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID, prism2mgmt_autojoin() 1073 return result; prism2mgmt_autojoin() 1097 int result = 0; prism2mgmt_wlansniff() local 1113 result = hfa384x_cmd_monitor(hw, HFA384x_MONITOR_DISABLE); prism2mgmt_wlansniff() 1114 if (result) { prism2mgmt_wlansniff() 1115 pr_debug("failed to disable monitor mode, result=%d\n", prism2mgmt_wlansniff() 1116 result); prism2mgmt_wlansniff() 1120 result = hfa384x_drvr_disable(hw, 0); prism2mgmt_wlansniff() 1121 if (result) { prism2mgmt_wlansniff() 1123 ("failed to disable port 0 after sniffing, result=%d\n", prism2mgmt_wlansniff() 1124 result); prism2mgmt_wlansniff() 1131 result = hfa384x_drvr_setconfig16(hw, prism2mgmt_wlansniff() 1134 if (result) { prism2mgmt_wlansniff() 1136 ("failed to restore wepflags=0x%04x, result=%d\n", prism2mgmt_wlansniff() 1137 hw->presniff_wepflags, result); prism2mgmt_wlansniff() 1144 result = hfa384x_drvr_setconfig16(hw, prism2mgmt_wlansniff() 1147 if (result) { prism2mgmt_wlansniff() 1149 ("failed to restore porttype, result=%d\n", prism2mgmt_wlansniff() 1150 result); prism2mgmt_wlansniff() 1155 result = hfa384x_drvr_enable(hw, 0); prism2mgmt_wlansniff() 1156 if (result) { prism2mgmt_wlansniff() 1157 pr_debug("failed to enable port to presniff setting, result=%d\n", prism2mgmt_wlansniff() 1158 result); prism2mgmt_wlansniff() 1162 result = hfa384x_drvr_disable(hw, 0); prism2mgmt_wlansniff() 1174 result = hfa384x_drvr_getconfig16(hw, prism2mgmt_wlansniff() 1177 if (result) { prism2mgmt_wlansniff() 1179 ("failed to read porttype, result=%d\n", prism2mgmt_wlansniff() 1180 result); prism2mgmt_wlansniff() 1184 result = hfa384x_drvr_getconfig16(hw, prism2mgmt_wlansniff() 1187 if (result) { prism2mgmt_wlansniff() 1189 ("failed to read wepflags, result=%d\n", prism2mgmt_wlansniff() 1190 result); prism2mgmt_wlansniff() 1194 result = hfa384x_drvr_start(hw); prism2mgmt_wlansniff() 1195 if (result) { prism2mgmt_wlansniff() 1196 pr_debug("failed to restart the card for sniffing, result=%d\n", prism2mgmt_wlansniff() 1197 result); prism2mgmt_wlansniff() 1202 result = hfa384x_drvr_disable(hw, 0); prism2mgmt_wlansniff() 1203 if (result) { prism2mgmt_wlansniff() 1204 pr_debug("failed to enable port for sniffing, result=%d\n", prism2mgmt_wlansniff() 1205 result); prism2mgmt_wlansniff() 1215 result = hfa384x_drvr_setconfig16(hw, prism2mgmt_wlansniff() 1220 if (result) { prism2mgmt_wlansniff() 1221 pr_debug("failed to set channel %d, result=%d\n", prism2mgmt_wlansniff() 1222 word, result); prism2mgmt_wlansniff() 1230 result = hfa384x_drvr_setconfig16(hw, prism2mgmt_wlansniff() 1233 if (result) { prism2mgmt_wlansniff() 1235 ("failed to set porttype %d, result=%d\n", prism2mgmt_wlansniff() 1236 word, result); prism2mgmt_wlansniff() 1246 result = prism2mgmt_wlansniff() 1252 if (result) { prism2mgmt_wlansniff() 1254 ("failed to set wepflags=0x%04x, result=%d\n", prism2mgmt_wlansniff() 1255 word, result); prism2mgmt_wlansniff() 1277 result = hfa384x_drvr_enable(hw, 0); prism2mgmt_wlansniff() 1278 if (result) { prism2mgmt_wlansniff() 1280 ("failed to enable port for sniffing, result=%d\n", prism2mgmt_wlansniff() 1281 result); prism2mgmt_wlansniff() 1285 result = hfa384x_cmd_monitor(hw, HFA384x_MONITOR_ENABLE); prism2mgmt_wlansniff() 1286 if (result) { prism2mgmt_wlansniff() 1287 pr_debug("failed to enable monitor mode, result=%d\n", prism2mgmt_wlansniff() 1288 result); prism2mgmt_wlansniff()
|
H A D | cfg80211.c | 112 int result; prism2_change_virtual_intf() local 134 result = prism2_domibset_uint32(wlandev, prism2_change_virtual_intf() 138 if (result) prism2_change_virtual_intf() 155 int result = 0; prism2_add_key() local 160 result = prism2_domibset_uint32(wlandev, prism2_add_key() 163 if (result) prism2_add_key() 189 result = prism2_domibset_pstr32(wlandev, did, prism2_add_key() 191 if (result) prism2_add_key() 197 result = 1; prism2_add_key() 201 if (result) prism2_add_key() 243 int result = 0; prism2_del_key() local 274 result = prism2_domibset_pstr32(wlandev, did, 13, "0000000000000"); prism2_del_key() 277 if (result) prism2_del_key() 289 int result = 0; prism2_set_default_key() local 291 result = prism2_domibset_uint32(wlandev, prism2_set_default_key() 295 if (result) prism2_set_default_key() 307 int result; prism2_get_station() local 323 result = wlandev->mlmerequest(wlandev, (struct p80211msg *) &quality); prism2_get_station() 326 if (result == 0) { prism2_get_station() 333 return result; prism2_get_station() 345 int result; prism2_scan() local 396 result = p80211req_dorequest(wlandev, (u8 *) &msg1); prism2_scan() 397 if (result) { prism2_scan() 411 result = p80211req_dorequest(wlandev, (u8 *) &msg2); prism2_scan() 412 if ((result != 0) || prism2_scan() 443 if (result) prism2_scan() 457 int result; prism2_set_wiphy_params() local 466 result = prism2_domibset_uint32(wlandev, prism2_set_wiphy_params() 469 if (result) { prism2_set_wiphy_params() 481 result = prism2_domibset_uint32(wlandev, prism2_set_wiphy_params() 484 if (result) { prism2_set_wiphy_params() 505 int result; prism2_connect() local 511 result = prism2_domibset_uint32(wlandev, prism2_connect() 514 if (result) prism2_connect() 533 result = prism2_domibset_uint32(wlandev, prism2_connect() 536 if (result) prism2_connect() 562 result = prism2_domibset_pstr32(wlandev, prism2_connect() 565 if (result) prism2_connect() 573 result = prism2_domibset_uint32(wlandev, prism2_connect() 576 if (result) prism2_connect() 579 result = prism2_domibset_uint32(wlandev, prism2_connect() 582 if (result) prism2_connect() 588 result = prism2_domibset_uint32(wlandev, prism2_connect() 591 if (result) prism2_connect() 594 result = prism2_domibset_uint32(wlandev, prism2_connect() 597 if (result) prism2_connect() 609 result = p80211req_dorequest(wlandev, (u8 *) &msg_join); prism2_connect() 612 if (result) prism2_connect() 623 int result; prism2_disconnect() local 633 result = p80211req_dorequest(wlandev, (u8 *) &msg_join); prism2_disconnect() 635 if (result) prism2_disconnect() 660 int result; prism2_set_tx_power() local 668 result = prism2_domibset_uint32(wlandev, prism2_set_tx_power() 672 if (result) { prism2_set_tx_power() 688 int result; prism2_get_tx_power() local 696 result = p80211req_dorequest(wlandev, (u8 *) &msg); prism2_get_tx_power() 698 if (result) { prism2_get_tx_power()
|
H A D | prism2sta.c | 284 int result = 0; prism2sta_mlmerequest() local 289 result = prism2mgmt_mibset_mibget(wlandev, msg); prism2sta_mlmerequest() 293 result = prism2mgmt_mibset_mibget(wlandev, msg); prism2sta_mlmerequest() 297 result = prism2mgmt_scan(wlandev, msg); prism2sta_mlmerequest() 301 result = prism2mgmt_scan_results(wlandev, msg); prism2sta_mlmerequest() 305 result = prism2mgmt_start(wlandev, msg); prism2sta_mlmerequest() 312 result = prism2mgmt_readpda(wlandev, msg); prism2sta_mlmerequest() 316 result = prism2mgmt_ramdl_state(wlandev, msg); prism2sta_mlmerequest() 320 result = prism2mgmt_ramdl_write(wlandev, msg); prism2sta_mlmerequest() 324 result = prism2mgmt_flashdl_state(wlandev, msg); prism2sta_mlmerequest() 328 result = prism2mgmt_flashdl_write(wlandev, msg); prism2sta_mlmerequest() 341 result = prism2sta_mlmerequest() 346 ifstatemsg->resultcode.data = result; prism2sta_mlmerequest() 347 result = 0; prism2sta_mlmerequest() 352 result = prism2mgmt_wlansniff(wlandev, msg); prism2sta_mlmerequest() 356 result = prism2mgmt_autojoin(wlandev, msg); prism2sta_mlmerequest() 386 return result; prism2sta_mlmerequest() 413 u32 result; prism2sta_ifstate() local 415 result = P80211ENUM_resultcode_implementation_failure; prism2sta_ifstate() 428 result = hfa384x_drvr_start(hw); prism2sta_ifstate() 429 if (result) { prism2sta_ifstate() 431 "hfa384x_drvr_start() failed,result=%d\n", (int)result); prism2sta_ifstate() 432 result = prism2sta_ifstate() 438 result = P80211ENUM_resultcode_success; prism2sta_ifstate() 442 result = P80211ENUM_resultcode_success; prism2sta_ifstate() 447 result = P80211ENUM_resultcode_invalid_parameters; prism2sta_ifstate() 454 result = P80211ENUM_resultcode_implementation_failure; prism2sta_ifstate() 471 result = hfa384x_drvr_start(hw); prism2sta_ifstate() 472 if (result) { prism2sta_ifstate() 474 "hfa384x_drvr_start() failed,result=%d\n", (int)result); prism2sta_ifstate() 475 result = prism2sta_ifstate() 481 result = prism2sta_getcardinfo(wlandev); prism2sta_ifstate() 482 if (result) { prism2sta_ifstate() 484 "prism2sta_getcardinfo() failed,result=%d\n", (int)result); prism2sta_ifstate() 485 result = prism2sta_ifstate() 491 result = prism2sta_globalsetup(wlandev); prism2sta_ifstate() 492 if (result) { prism2sta_ifstate() 494 "prism2sta_globalsetup() failed,result=%d\n", (int)result); prism2sta_ifstate() 495 result = prism2sta_ifstate() 504 result = P80211ENUM_resultcode_success; prism2sta_ifstate() 508 result = P80211ENUM_resultcode_success; prism2sta_ifstate() 515 result = P80211ENUM_resultcode_implementation_failure; prism2sta_ifstate() 523 result = P80211ENUM_resultcode_success; prism2sta_ifstate() 541 result = P80211ENUM_resultcode_success; prism2sta_ifstate() 548 result = P80211ENUM_resultcode_implementation_failure; prism2sta_ifstate() 553 result = P80211ENUM_resultcode_invalid_parameters; prism2sta_ifstate() 557 return result; prism2sta_ifstate() 581 int result = 0; prism2sta_getcardinfo() local 589 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_NICIDENTITY, prism2sta_getcardinfo() 592 if (result) { prism2sta_getcardinfo() 608 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRIIDENTITY, prism2sta_getcardinfo() 611 if (result) { prism2sta_getcardinfo() 627 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STAIDENTITY, prism2sta_getcardinfo() 630 if (result) { prism2sta_getcardinfo() 638 result = -1; prism2sta_getcardinfo() 667 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_MFISUPRANGE, prism2sta_getcardinfo() 670 if (result) { prism2sta_getcardinfo() 690 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CFISUPRANGE, prism2sta_getcardinfo() 693 if (result) { prism2sta_getcardinfo() 713 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRISUPRANGE, prism2sta_getcardinfo() 716 if (result) { prism2sta_getcardinfo() 736 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STASUPRANGE, prism2sta_getcardinfo() 739 if (result) { prism2sta_getcardinfo() 767 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRI_CFIACTRANGES, prism2sta_getcardinfo() 770 if (result) { prism2sta_getcardinfo() 790 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_CFIACTRANGES, prism2sta_getcardinfo() 793 if (result) { prism2sta_getcardinfo() 813 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_MFIACTRANGES, prism2sta_getcardinfo() 816 if (result) { prism2sta_getcardinfo() 836 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_NICSERIALNUMBER, prism2sta_getcardinfo() 838 if (!result) { prism2sta_getcardinfo() 847 result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR, prism2sta_getcardinfo() 849 if (result != 0) { prism2sta_getcardinfo() 878 netdev_err(wlandev->netdev, "Failed, result=%d\n", result); prism2sta_getcardinfo() 880 return result; prism2sta_getcardinfo() 912 int result = 0; prism2sta_setmulticast() local 926 result = prism2sta_setmulticast() 930 return result; prism2sta_setmulticast() 1029 int result; prism2sta_inf_scanresults() local 1041 sr->result[i].chid, prism2sta_inf_scanresults() 1042 sr->result[i].anl, prism2sta_inf_scanresults() 1043 sr->result[i].sl, sr->result[i].bcnint); prism2sta_inf_scanresults() 1045 sr->result[i].capinfo, sr->result[i].proberesp_rate); prism2sta_inf_scanresults() 1048 joinreq.channel = sr->result[0].chid; prism2sta_inf_scanresults() 1049 memcpy(joinreq.bssid, sr->result[0].bssid, WLAN_BSSID_LEN); prism2sta_inf_scanresults() 1050 result = hfa384x_drvr_setconfig(hw, prism2sta_inf_scanresults() 1053 if (result) { prism2sta_inf_scanresults() 1054 netdev_err(wlandev->netdev, "setconfig(joinreq) failed, result=%d\n", prism2sta_inf_scanresults() 1055 result); prism2sta_inf_scanresults() 1127 hfa384x_ChInfoResultSub_t *result; prism2sta_inf_chinforesults() local 1134 result = &inf->info.chinforesult.result[n]; prism2sta_inf_chinforesults() 1135 chan = le16_to_cpu(result->chid) - 1; prism2sta_inf_chinforesults() 1140 chinforesult = &hw->channel_info.results.result[chan]; prism2sta_inf_chinforesults() 1142 chinforesult->anl = le16_to_cpu(result->anl); prism2sta_inf_chinforesults() 1143 chinforesult->pnl = le16_to_cpu(result->pnl); prism2sta_inf_chinforesults() 1144 chinforesult->active = le16_to_cpu(result->active); prism2sta_inf_chinforesults() 1165 int result; prism2sta_processing_defer() local 1227 result = hfa384x_drvr_getconfig(hw, prism2sta_processing_defer() 1231 if (result) { prism2sta_processing_defer() 1233 ("getconfig(0x%02x) failed, result = %d\n", prism2sta_processing_defer() 1234 HFA384x_RID_CURRENTBSSID, result); prism2sta_processing_defer() 1238 result = hfa384x_drvr_getconfig(hw, prism2sta_processing_defer() 1241 if (result) { prism2sta_processing_defer() 1243 ("getconfig(0x%02x) failed, result = %d\n", prism2sta_processing_defer() 1244 HFA384x_RID_CURRENTSSID, result); prism2sta_processing_defer() 1252 result = hfa384x_drvr_getconfig16(hw, prism2sta_processing_defer() 1255 if (result) { prism2sta_processing_defer() 1257 ("getconfig(0x%02x) failed, result = %d\n", prism2sta_processing_defer() 1258 HFA384x_RID_PORTSTATUS, result); prism2sta_processing_defer() 1312 result = hfa384x_drvr_getconfig(hw, prism2sta_processing_defer() 1315 if (result) { prism2sta_processing_defer() 1316 pr_debug("getconfig(0x%02x) failed, result = %d\n", prism2sta_processing_defer() 1317 HFA384x_RID_CURRENTBSSID, result); prism2sta_processing_defer() 1321 result = hfa384x_drvr_getconfig(hw, prism2sta_processing_defer() 1324 if (result) { prism2sta_processing_defer() 1325 pr_debug("getconfig(0x%02x) failed, result = %d\n", prism2sta_processing_defer() 1326 HFA384x_RID_CURRENTSSID, result); prism2sta_processing_defer() 1540 int i, added, result, cnt; prism2sta_inf_authreq_defer() local 1678 result = hfa384x_drvr_setconfig(hw, HFA384x_RID_AUTHENTICATESTA, prism2sta_inf_authreq_defer() 1680 if (result) { prism2sta_inf_authreq_defer() 1684 "setconfig(authenticatestation) failed, result=%d\n", prism2sta_inf_authreq_defer() 1685 result); prism2sta_inf_authreq_defer() 1932 int result = 0; prism2sta_commsqual_defer() local 1945 result = hfa384x_drvr_getconfig( prism2sta_commsqual_defer() 1949 if (result) { prism2sta_commsqual_defer() 1963 result = p80211req_dorequest(wlandev, (u8 *) &msg); prism2sta_commsqual_defer() 1965 if (result) { prism2sta_commsqual_defer() 1966 pr_debug("get signal rate failed, result = %d\n", prism2sta_commsqual_defer() 1967 result); prism2sta_commsqual_defer() 1989 result = hfa384x_drvr_getconfig(hw, prism2sta_commsqual_defer() 1992 if (result) { prism2sta_commsqual_defer() 1993 pr_debug("getconfig(0x%02x) failed, result = %d\n", prism2sta_commsqual_defer() 1994 HFA384x_RID_CURRENTBSSID, result); prism2sta_commsqual_defer() 1998 result = hfa384x_drvr_getconfig(hw, prism2sta_commsqual_defer() 2001 if (result) { prism2sta_commsqual_defer() 2002 pr_debug("getconfig(0x%02x) failed, result = %d\n", prism2sta_commsqual_defer() 2003 HFA384x_RID_CURRENTSSID, result); prism2sta_commsqual_defer()
|
/linux-4.1.27/arch/sh/include/asm/ |
H A D | bitops.h | 29 unsigned long result; ffz() local 35 : "=r" (result), "=r" (word) ffz() 38 return result; ffz() 49 unsigned long result; __ffs() local 55 : "=r" (result), "=r" (word) __ffs() 58 return result; __ffs() 63 unsigned long result, __d2, __d3; ffz() local 77 : "=r" (result), "=r" (word), "=r" (__d2), "=r" (__d3) ffz() 80 return result; ffz()
|
/linux-4.1.27/drivers/usb/storage/ |
H A D | sierra_ms.c | 49 int result; sierra_set_ms_mode() local 51 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), sierra_set_ms_mode() 59 return result; sierra_set_ms_mode() 66 int result; sierra_get_swoc_info() local 70 result = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), sierra_get_swoc_info() 81 return result; sierra_get_swoc_info() 98 int result; show_truinst() local 100 result = snprintf(buf, PAGE_SIZE, "Forced Mass Storage\n"); show_truinst() 107 result = sierra_get_swoc_info(udev, swocInfo); show_truinst() 108 if (result < 0) { show_truinst() 115 result = snprintf(buf, PAGE_SIZE, show_truinst() 122 return result; show_truinst() 128 int result, retries; sierra_ms_init() local 134 result = 0; sierra_ms_init() 143 result = sierra_set_ms_mode(udev, SWIMS_SET_MODE_Modem); sierra_ms_init() 144 if (result < 0) sierra_ms_init() 165 result = sierra_get_swoc_info(udev, swocInfo); sierra_ms_init() 166 if (result < 0) { sierra_ms_init() 170 } while (retries && result < 0); sierra_ms_init() 172 if (result < 0) { sierra_ms_init() 185 result = sierra_set_ms_mode(udev, sierra_ms_init() 187 if (result < 0) sierra_ms_init() 195 result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst); sierra_ms_init()
|
H A D | option_ms.c | 51 int result; option_rezero() local 60 result = usb_stor_bulk_transfer_buf(us, option_rezero() 63 if (result != USB_STOR_XFER_GOOD) { option_rezero() 64 result = USB_STOR_XFER_ERROR; option_rezero() 80 result = USB_STOR_XFER_GOOD; option_rezero() 84 return result; option_rezero() 96 int result; option_inquiry() local 105 result = usb_stor_bulk_transfer_buf(us, option_inquiry() 108 if (result != USB_STOR_XFER_GOOD) { option_inquiry() 109 result = USB_STOR_XFER_ERROR; option_inquiry() 113 result = usb_stor_bulk_transfer_buf(us, option_inquiry() 116 if (result != USB_STOR_XFER_GOOD) { option_inquiry() 117 result = USB_STOR_XFER_ERROR; option_inquiry() 121 result = memcmp(buffer+8, "Option", 6); option_inquiry() 123 if (result != 0) option_inquiry() 124 result = memcmp(buffer+8, "ZCOPTION", 8); option_inquiry() 133 return result; option_inquiry() 139 int result; option_ms_init() local 146 result = option_inquiry(us); option_ms_init() 147 if (result != 0) { option_ms_init() 158 result = option_rezero(us); option_ms_init() 159 if (result != USB_STOR_XFER_GOOD) option_ms_init()
|
H A D | freecom.c | 157 int result; freecom_readdata() local 167 result = usb_stor_bulk_transfer_buf (us, opipe, fxfr, freecom_readdata() 169 if (result != USB_STOR_XFER_GOOD) { freecom_readdata() 176 result = usb_stor_bulk_srb(us, ipipe, srb); freecom_readdata() 179 if (result > USB_STOR_XFER_SHORT) freecom_readdata() 190 int result; freecom_writedata() local 200 result = usb_stor_bulk_transfer_buf (us, opipe, fxfr, freecom_writedata() 202 if (result != USB_STOR_XFER_GOOD) { freecom_writedata() 209 result = usb_stor_bulk_srb(us, opipe, srb); freecom_writedata() 212 if (result > USB_STOR_XFER_SHORT) freecom_writedata() 226 int result; freecom_transport() local 248 result = usb_stor_bulk_transfer_buf (us, opipe, fcb, freecom_transport() 254 if (result != USB_STOR_XFER_GOOD) { freecom_transport() 261 result = usb_stor_bulk_transfer_buf (us, ipipe, fst, freecom_transport() 263 usb_stor_dbg(us, "foo Status result %d %u\n", result, partial); freecom_transport() 264 if (result != USB_STOR_XFER_GOOD) freecom_transport() 288 result = usb_stor_bulk_transfer_buf (us, opipe, fcb, freecom_transport() 295 if (result != USB_STOR_XFER_GOOD) { freecom_transport() 301 result = usb_stor_bulk_transfer_buf (us, ipipe, fst, freecom_transport() 304 usb_stor_dbg(us, "bar Status result %d %u\n", result, partial); freecom_transport() 305 if (result != USB_STOR_XFER_GOOD) freecom_transport() 358 result = freecom_readdata (srb, us, ipipe, opipe, length); freecom_transport() 359 if (result != USB_STOR_TRANSPORT_GOOD) freecom_transport() 360 return result; freecom_transport() 363 result = usb_stor_bulk_transfer_buf (us, ipipe, fst, freecom_transport() 367 if (partial != 4 || result > USB_STOR_XFER_SHORT) freecom_transport() 387 result = freecom_writedata (srb, us, ipipe, opipe, length); freecom_transport() 388 if (result != USB_STOR_TRANSPORT_GOOD) freecom_transport() 389 return result; freecom_transport() 392 result = usb_stor_bulk_transfer_buf (us, ipipe, fst, freecom_transport() 395 if (partial != 4 || result > USB_STOR_XFER_SHORT) freecom_transport() 428 int result; init_freecom() local 435 result = usb_stor_control_msg(us, us->recv_ctrl_pipe, init_freecom() 447 result = usb_stor_control_msg(us, us->send_ctrl_pipe, init_freecom() 449 usb_stor_dbg(us, "result from activate reset is %d\n", result); init_freecom() 455 result = usb_stor_control_msg(us, us->send_ctrl_pipe, init_freecom() 457 usb_stor_dbg(us, "result from clear reset is %d\n", result); init_freecom() 530 int result; freecom_probe() local 532 result = usb_stor_probe1(&us, intf, id, freecom_probe() 534 if (result) freecom_probe() 535 return result; freecom_probe() 542 result = usb_stor_probe2(us); freecom_probe() 543 return result; freecom_probe()
|
H A D | sddr09.c | 337 int result; 342 result = sddr09_send_scsi_command(us, command, 6); 344 usb_stor_dbg(us, "sddr09_test_unit_ready returns %d\n", result); 346 return result; 358 int result; sddr09_request_sense() local 365 result = sddr09_send_scsi_command(us, command, 12); sddr09_request_sense() 366 if (result) sddr09_request_sense() 367 return result; sddr09_request_sense() 369 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, sddr09_request_sense() 371 return (result == USB_STOR_XFER_GOOD ? 0 : -EIO); sddr09_request_sense() 402 int result; sddr09_readX() local 417 result = sddr09_send_scsi_command(us, command, 12); sddr09_readX() 419 if (result) { sddr09_readX() 421 x, result); sddr09_readX() 422 return result; sddr09_readX() 425 result = usb_stor_bulk_transfer_sg(us, us->recv_bulk_pipe, sddr09_readX() 428 if (result != USB_STOR_XFER_GOOD) { sddr09_readX() 430 x, result); sddr09_readX() 532 int result; sddr09_erase() local 544 result = sddr09_send_scsi_command(us, command, 12); sddr09_erase() 546 if (result) sddr09_erase() 548 result); sddr09_erase() 550 return result; sddr09_erase() 584 int result; sddr09_writeX() local 602 result = sddr09_send_scsi_command(us, command, 12); sddr09_writeX() 604 if (result) { sddr09_writeX() 606 result); sddr09_writeX() 607 return result; sddr09_writeX() 610 result = usb_stor_bulk_transfer_sg(us, us->send_bulk_pipe, sddr09_writeX() 613 if (result != USB_STOR_XFER_GOOD) { sddr09_writeX() 615 result); sddr09_writeX() 646 int result, bulklen, nsg, ct; 680 result = sddr09_send_scsi_command(us, command, 4*nsg+3); 682 if (result) { 684 result); 685 return result; 692 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, 695 if (result != USB_STOR_XFER_GOOD) { 697 result); 721 int result; sddr09_read_status() local 729 result = sddr09_send_scsi_command(us, command, 12); sddr09_read_status() 730 if (result) sddr09_read_status() 731 return result; sddr09_read_status() 733 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, sddr09_read_status() 736 return (result == USB_STOR_XFER_GOOD ? 0 : -EIO); sddr09_read_status() 750 int result; sddr09_read_data() local 773 result = 0; sddr09_read_data() 787 result = -EIO; sddr09_read_data() 813 result = sddr09_read20(us, address>>1, sddr09_read_data() 815 if (result) sddr09_read_data() 829 return result; sddr09_read_data() 869 int i, result, isnew; sddr09_write_lba() local 900 result = sddr09_read22(us, address>>1, info->blocksize, sddr09_write_lba() 902 if (result) sddr09_write_lba() 903 return result; sddr09_write_lba() 940 result = sddr09_write_inplace(us, address>>1, info->blocksize, sddr09_write_lba() 943 usb_stor_dbg(us, "sddr09_write_inplace returns %d\n", result); sddr09_write_lba() 962 return result; sddr09_write_lba() 977 int result; sddr09_write_data() local 1012 result = 0; sddr09_write_data() 1027 result = -EIO; sddr09_write_data() 1035 result = sddr09_write_lba(us, lba, page, pages, sddr09_write_data() 1037 if (result) sddr09_write_data() 1048 return result; sddr09_write_data() 1079 int result, i; sddr09_read_deviceID() local 1085 result = sddr09_send_scsi_command(us, command, 12); sddr09_read_deviceID() 1086 if (result) sddr09_read_deviceID() 1087 return result; sddr09_read_deviceID() 1089 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, sddr09_read_deviceID() 1095 return (result == USB_STOR_XFER_GOOD ? 0 : -EIO); sddr09_read_deviceID() 1100 int result; sddr09_get_wp() local 1103 result = sddr09_read_status(us, &status); sddr09_get_wp() 1104 if (result) { sddr09_get_wp() 1106 return result; sddr09_get_wp() 1146 int result; sddr09_get_cardinfo() local 1150 result = sddr09_read_deviceID(us, deviceID); sddr09_get_cardinfo() 1152 if (result) { sddr09_get_cardinfo() 1153 usb_stor_dbg(us, "Result of read_deviceID is %d\n", result); sddr09_get_cardinfo() 1204 int i, j, result; sddr09_read_map() local 1226 result = -1; sddr09_read_map() 1240 result = -1; sddr09_read_map() 1258 result = sddr09_read_control( sddr09_read_map() 1262 if (result) { sddr09_read_map() 1263 result = -1; sddr09_read_map() 1386 result = 0; sddr09_read_map() 1389 if (result != 0) { sddr09_read_map() 1396 return result; sddr09_read_map() 1412 int result; sddr09_common_init() local 1421 result = usb_reset_configuration(us->pusb_dev); sddr09_common_init() 1422 usb_stor_dbg(us, "Result of usb_reset_configuration is %d\n", result); sddr09_common_init() 1423 if (result == -EPIPE) { sddr09_common_init() 1425 } else if (result != 0) { sddr09_common_init() 1448 int result; usb_stor_sddr09_dpcm_init() local 1451 result = sddr09_common_init(us); usb_stor_sddr09_dpcm_init() 1452 if (result) usb_stor_sddr09_dpcm_init() 1453 return result; usb_stor_sddr09_dpcm_init() 1455 result = sddr09_send_command(us, 0x01, USB_DIR_IN, data, 2); usb_stor_sddr09_dpcm_init() 1456 if (result) { usb_stor_sddr09_dpcm_init() 1458 return result; usb_stor_sddr09_dpcm_init() 1464 result = sddr09_send_command(us, 0x08, USB_DIR_IN, data, 2); usb_stor_sddr09_dpcm_init() 1465 if (result) { usb_stor_sddr09_dpcm_init() 1467 return result; usb_stor_sddr09_dpcm_init() 1473 result = sddr09_request_sense(us, data, 18); usb_stor_sddr09_dpcm_init() 1474 if (result == 0 && data[2] != 0) { usb_stor_sddr09_dpcm_init() 1490 return 0; /* not result */ usb_stor_sddr09_dpcm_init() 1541 int result, i; sddr09_transport() local 1662 result = sddr09_read_data(us, page, pages); sddr09_transport() 1663 return (result == 0 ? USB_STOR_TRANSPORT_GOOD : sddr09_transport() 1677 result = sddr09_write_data(us, page, pages); sddr09_transport() 1678 return (result == 0 ? USB_STOR_TRANSPORT_GOOD : sddr09_transport() 1704 result = sddr09_send_scsi_command(us, srb->cmnd, 12); sddr09_transport() 1705 if (result) { sddr09_transport() 1707 result); sddr09_transport() 1724 result = usb_stor_bulk_srb(us, pipe, srb); sddr09_transport() 1726 return (result == USB_STOR_XFER_GOOD ? sddr09_transport() 1745 int result; sddr09_probe() local 1747 result = usb_stor_probe1(&us, intf, id, sddr09_probe() 1749 if (result) sddr09_probe() 1750 return result; sddr09_probe() 1764 result = usb_stor_probe2(us); sddr09_probe() 1765 return result; sddr09_probe()
|
H A D | ene_ub6250.c | 502 int result; ene_send_scsi_cmd() local 509 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, ene_send_scsi_cmd() 511 if (result != USB_STOR_XFER_GOOD) { ene_send_scsi_cmd() 526 result = usb_stor_bulk_srb(us, pipe, us->srb); ene_send_scsi_cmd() 528 result = usb_stor_bulk_transfer_sg(us, pipe, buf, ene_send_scsi_cmd() 531 if (result != USB_STOR_XFER_GOOD) { ene_send_scsi_cmd() 538 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, bcs, ene_send_scsi_cmd() 541 if (result == USB_STOR_XFER_SHORT && cswlen == 0) { ene_send_scsi_cmd() 543 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, ene_send_scsi_cmd() 547 if (result == USB_STOR_XFER_STALLED) { ene_send_scsi_cmd() 550 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, ene_send_scsi_cmd() 554 if (result != USB_STOR_XFER_GOOD) ene_send_scsi_cmd() 662 int result; sd_scsi_read() local 676 result = ene_load_bincode(us, SD_RW_PATTERN); sd_scsi_read() 677 if (result != USB_STOR_XFER_GOOD) { sd_scsi_read() 696 result = ene_send_scsi_cmd(us, FDIR_READ, scsi_sglist(srb), 1); sd_scsi_read() 697 return result; sd_scsi_read() 702 int result; sd_scsi_write() local 716 result = ene_load_bincode(us, SD_RW_PATTERN); sd_scsi_write() 717 if (result != USB_STOR_XFER_GOOD) { sd_scsi_write() 736 result = ene_send_scsi_cmd(us, FDIR_WRITE, scsi_sglist(srb), 1); sd_scsi_write() 737 return result; sd_scsi_write() 858 int result; ms_read_readpage() local 865 result = ene_load_bincode(us, MS_RW_PATTERN); ms_read_readpage() 866 if (result != USB_STOR_XFER_GOOD) ms_read_readpage() 883 result = ene_send_scsi_cmd(us, FDIR_READ, PageBuf, 0); ms_read_readpage() 884 if (result != USB_STOR_XFER_GOOD) ms_read_readpage() 902 result = ene_send_scsi_cmd(us, FDIR_READ, &ExtBuf, 0); ms_read_readpage() 903 if (result != USB_STOR_XFER_GOOD) ms_read_readpage() 922 u32 i, result; ms_lib_process_bootblock() local 932 result = (u32)-1; ms_lib_process_bootblock() 1045 result = 0; ms_lib_process_bootblock() 1048 if (result) ms_lib_process_bootblock() 1053 result = 0; ms_lib_process_bootblock() 1054 return result; ms_lib_process_bootblock() 1139 int result; ms_read_copyblock() local 1143 result = ene_load_bincode(us, MS_RW_PATTERN); ms_read_copyblock() 1144 if (result != USB_STOR_XFER_GOOD) ms_read_copyblock() 1163 result = ene_send_scsi_cmd(us, FDIR_WRITE, buf, 0); ms_read_copyblock() 1164 if (result != USB_STOR_XFER_GOOD) ms_read_copyblock() 1173 int result; ms_read_eraseblock() local 1178 result = ene_load_bincode(us, MS_RW_PATTERN); ms_read_eraseblock() 1179 if (result != USB_STOR_XFER_GOOD) ms_read_eraseblock() 1192 result = ene_send_scsi_cmd(us, FDIR_READ, NULL, 0); ms_read_eraseblock() 1193 if (result != USB_STOR_XFER_GOOD) ms_read_eraseblock() 1202 u16 result = MS_STATUS_SUCCESS; ms_lib_check_disableblock() local 1209 result = MS_NO_MEMORY_ERROR; ms_lib_check_disableblock() 1219 result = MS_ERROR_FLASH_READ; ms_lib_check_disableblock() 1227 return result; ms_lib_check_disableblock() 1253 int result; ms_lib_overwrite_extra() local 1257 result = ene_load_bincode(us, MS_RW_PATTERN); ms_lib_overwrite_extra() 1258 if (result != USB_STOR_XFER_GOOD) ms_lib_overwrite_extra() 1276 result = ene_send_scsi_cmd(us, FDIR_READ, NULL, 0); ms_lib_overwrite_extra() 1277 if (result != USB_STOR_XFER_GOOD) ms_lib_overwrite_extra() 1339 int result; ms_lib_read_extra() local 1355 result = ene_send_scsi_cmd(us, FDIR_READ, &ExtBuf, 0); ms_lib_read_extra() 1356 if (result != USB_STOR_XFER_GOOD) ms_lib_read_extra() 1539 int result; ms_lib_read_extrablock() local 1557 result = ene_send_scsi_cmd(us, FDIR_READ, buf, 0); ms_lib_read_extrablock() 1558 if (result != USB_STOR_XFER_GOOD) ms_lib_read_extrablock() 1641 int result; ms_scsi_read() local 1655 result = ene_load_bincode(us, MSP_RW_PATTERN); ms_scsi_read() 1656 if (result != USB_STOR_XFER_GOOD) { ms_scsi_read() 1673 result = ene_send_scsi_cmd(us, FDIR_READ, scsi_sglist(srb), 1); ms_scsi_read() 1686 result = ene_load_bincode(us, MS_RW_PATTERN); ms_scsi_read() 1687 if (result != USB_STOR_XFER_GOOD) { ms_scsi_read() 1689 result = USB_STOR_TRANSPORT_ERROR; ms_scsi_read() 1717 result = ene_send_scsi_cmd(us, FDIR_READ, buf+offset, 0); ms_scsi_read() 1718 if (result != USB_STOR_XFER_GOOD) { ms_scsi_read() 1719 pr_info("MS_SCSI_Read --- result = %x\n", result); ms_scsi_read() 1720 result = USB_STOR_TRANSPORT_ERROR; ms_scsi_read() 1735 return result; ms_scsi_read() 1740 int result; ms_scsi_write() local 1756 result = ene_load_bincode(us, MSP_RW_PATTERN); ms_scsi_write() 1757 if (result != USB_STOR_XFER_GOOD) { ms_scsi_write() 1774 result = ene_send_scsi_cmd(us, FDIR_WRITE, scsi_sglist(srb), 1); ms_scsi_write() 1787 result = ene_load_bincode(us, MS_RW_PATTERN); ms_scsi_write() 1788 if (result != USB_STOR_XFER_GOOD) { ms_scsi_write() 1790 result = USB_STOR_TRANSPORT_ERROR; ms_scsi_write() 1806 result = ms_read_copyblock(us, oldphy, newphy, PhyBlockAddr, PageNum, buf+offset, len); ms_scsi_write() 1808 if (result != USB_STOR_XFER_GOOD) { ms_scsi_write() 1809 pr_info("MS_SCSI_Write --- result = %x\n", result); ms_scsi_write() 1810 result = USB_STOR_TRANSPORT_ERROR; ms_scsi_write() 1827 return result; ms_scsi_write() 1837 int result; ene_get_card_type() local 1847 result = ene_send_scsi_cmd(us, FDIR_READ, buf, 0); ene_get_card_type() 1848 return result; ene_get_card_type() 1887 int result = USB_STOR_TRANSPORT_ERROR; ene_load_bincode() local 1941 result = ene_send_scsi_cmd(us, FDIR_WRITE, buf, 0); ene_load_bincode() 1947 return result; ene_load_bincode() 1952 u32 result; ms_card_init() local 1968 result = MS_NO_MEMORY_ERROR; ms_card_init() 2008 result = MS_STATUS_ERROR; ms_card_init() 2016 result = MS_STATUS_ERROR; ms_card_init() 2019 result = ms_lib_process_bootblock(us, btBlk1st, PageBuffer1); ms_card_init() 2022 if (result && (btBlk2nd != MS_LB_NOT_USED)) ms_card_init() 2023 result = ms_lib_process_bootblock(us, btBlk2nd, PageBuffer0); ms_card_init() 2025 if (result) { ms_card_init() 2026 result = MS_STATUS_ERROR; ms_card_init() 2042 result = ms_lib_scan_logicalblocknumber(us, btBlk1st); ms_card_init() 2043 if (result) ms_card_init() 2057 result = MS_NO_MEMORY_ERROR; ms_card_init() 2061 result = MS_STATUS_SUCCESS; ms_card_init() 2068 return result; ms_card_init() 2074 int result; ene_ms_init() local 2083 result = ene_load_bincode(us, MS_INIT_PATTERN); ene_ms_init() 2084 if (result != USB_STOR_XFER_GOOD) { ene_ms_init() 2096 result = ene_send_scsi_cmd(us, FDIR_READ, &buf, 0); ene_ms_init() 2097 if (result != USB_STOR_XFER_GOOD) { ene_ms_init() 2128 int result; ene_sd_init() local 2135 result = ene_load_bincode(us, SD_INIT1_PATTERN); ene_sd_init() 2136 if (result != USB_STOR_XFER_GOOD) { ene_sd_init() 2146 result = ene_send_scsi_cmd(us, FDIR_READ, NULL, 0); ene_sd_init() 2147 if (result != USB_STOR_XFER_GOOD) { ene_sd_init() 2153 result = ene_load_bincode(us, SD_INIT2_PATTERN); ene_sd_init() 2154 if (result != USB_STOR_XFER_GOOD) { ene_sd_init() 2165 result = ene_send_scsi_cmd(us, FDIR_READ, &buf, 0); ene_sd_init() 2166 if (result != USB_STOR_XFER_GOOD) { ene_sd_init() 2192 int result; ene_init() local 2196 result = ene_get_card_type(us, REG_CARD_STATUS, &misc_reg03); ene_init() 2197 if (result != USB_STOR_XFER_GOOD) ene_init() 2202 result = ene_sd_init(us); ene_init() 2203 if (result != USB_STOR_XFER_GOOD) ene_init() 2209 result = ene_ms_init(us); ene_init() 2210 if (result != USB_STOR_XFER_GOOD) ene_init() 2214 return result; ene_init() 2220 int result; sd_scsi_irp() local 2226 result = sd_scsi_test_unit_ready(us, srb); sd_scsi_irp() 2229 result = sd_scsi_inquiry(us, srb); sd_scsi_irp() 2232 result = sd_scsi_mode_sense(us, srb); sd_scsi_irp() 2236 result = SD_SCSI_Start_Stop(us, srb); sd_scsi_irp() 2240 result = sd_scsi_read_capacity(us, srb); sd_scsi_irp() 2243 result = sd_scsi_read(us, srb); sd_scsi_irp() 2246 result = sd_scsi_write(us, srb); sd_scsi_irp() 2250 result = USB_STOR_TRANSPORT_FAILED; sd_scsi_irp() 2253 return result; sd_scsi_irp() 2261 int result; ms_scsi_irp() local 2266 result = ms_scsi_test_unit_ready(us, srb); ms_scsi_irp() 2269 result = ms_scsi_inquiry(us, srb); ms_scsi_irp() 2272 result = ms_scsi_mode_sense(us, srb); ms_scsi_irp() 2275 result = ms_scsi_read_capacity(us, srb); ms_scsi_irp() 2278 result = ms_scsi_read(us, srb); ms_scsi_irp() 2281 result = ms_scsi_write(us, srb); ms_scsi_irp() 2285 result = USB_STOR_TRANSPORT_FAILED; ms_scsi_irp() 2288 return result; ms_scsi_irp() 2293 int result = 0; ene_transport() local 2299 result = ene_init(us); ene_transport() 2302 result = sd_scsi_irp(us, srb); ene_transport() 2305 result = ms_scsi_irp(us, srb); ene_transport() 2314 int result; ene_ub6250_probe() local 2318 result = usb_stor_probe1(&us, intf, id, ene_ub6250_probe() 2320 if (result) ene_ub6250_probe() 2321 return result; ene_ub6250_probe() 2335 result = usb_stor_probe2(us); ene_ub6250_probe() 2336 if (result) ene_ub6250_probe() 2337 return result; ene_ub6250_probe() 2340 result = ene_get_card_type(us, REG_CARD_STATUS, &misc_reg03); ene_ub6250_probe() 2341 if (result != USB_STOR_XFER_GOOD) { ene_ub6250_probe() 2351 return result; ene_ub6250_probe()
|
H A D | transport.c | 237 int result; usb_stor_clear_halt() local 243 result = usb_stor_control_msg(us, us->send_ctrl_pipe, usb_stor_clear_halt() 248 if (result >= 0) usb_stor_clear_halt() 251 usb_stor_dbg(us, "result = %d\n", result); usb_stor_clear_halt() 252 return result; usb_stor_clear_halt() 265 unsigned int length, int result, unsigned int partial) interpret_urb_result() 268 result, partial, length); interpret_urb_result() 269 switch (result) { interpret_urb_result() 332 int result; usb_stor_ctrl_transfer() local 348 result = usb_stor_msg_common(us, 0); usb_stor_ctrl_transfer() 350 return interpret_urb_result(us, pipe, size, result, usb_stor_ctrl_transfer() 365 int result; usb_stor_intr_transfer() local 380 result = usb_stor_msg_common(us, 0); usb_stor_intr_transfer() 382 return interpret_urb_result(us, pipe, length, result, usb_stor_intr_transfer() 394 int result; usb_stor_bulk_transfer_buf() local 401 result = usb_stor_msg_common(us, 0); usb_stor_bulk_transfer_buf() 406 return interpret_urb_result(us, pipe, length, result, usb_stor_bulk_transfer_buf() 421 int result; usb_stor_bulk_transfer_sglist() local 429 result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0, usb_stor_bulk_transfer_sglist() 431 if (result) { usb_stor_bulk_transfer_sglist() 432 usb_stor_dbg(us, "usb_sg_init returned %d\n", result); usb_stor_bulk_transfer_sglist() 454 result = us->current_sg.status; usb_stor_bulk_transfer_sglist() 457 return interpret_urb_result(us, pipe, length, result, usb_stor_bulk_transfer_sglist() 469 int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb), usb_stor_bulk_srb() local 474 return result; usb_stor_bulk_srb() 490 int result; usb_stor_bulk_transfer_sg() local 496 result = usb_stor_bulk_transfer_sglist(us, pipe, usb_stor_bulk_transfer_sg() 502 result = usb_stor_bulk_transfer_buf(us, pipe, buf, usb_stor_bulk_transfer_sg() 510 return result; usb_stor_bulk_transfer_sg() 560 if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) { last_sector_hacks() 571 * beyond the end. Replace the result code and sense data last_sector_hacks() 578 srb->result = SAM_STAT_CHECK_CONDITION; last_sector_hacks() 600 int result; usb_stor_invoke_transport() local 604 result = us->transport(srb, us); usb_stor_invoke_transport() 611 srb->result = DID_ABORT << 16; usb_stor_invoke_transport() 616 if (result == USB_STOR_TRANSPORT_ERROR) { usb_stor_invoke_transport() 618 srb->result = DID_ERROR << 16; usb_stor_invoke_transport() 623 if (result == USB_STOR_TRANSPORT_NO_SENSE) { usb_stor_invoke_transport() 624 srb->result = SAM_STAT_CHECK_CONDITION; usb_stor_invoke_transport() 629 srb->result = SAM_STAT_GOOD; usb_stor_invoke_transport() 655 if (result == USB_STOR_TRANSPORT_FAILED) { usb_stor_invoke_transport() 667 result == USB_STOR_TRANSPORT_GOOD && usb_stor_invoke_transport() 721 srb->result = DID_ABORT << 16; usb_stor_invoke_transport() 753 srb->result = DID_ERROR << 16; usb_stor_invoke_transport() 791 /* set the result so the higher layers expect this data */ usb_stor_invoke_transport() 792 srb->result = SAM_STAT_CHECK_CONDITION; usb_stor_invoke_transport() 808 if (result == USB_STOR_TRANSPORT_GOOD) { usb_stor_invoke_transport() 809 srb->result = SAM_STAT_GOOD; usb_stor_invoke_transport() 817 srb->result = DID_ERROR << 16; usb_stor_invoke_transport() 836 if (srb->result == SAM_STAT_GOOD) { usb_stor_invoke_transport() 844 * Next, if the REDO_READ10 flag is set, return a result usb_stor_invoke_transport() 850 srb->result = DID_IMM_RETRY << 16; usb_stor_invoke_transport() 856 if ((srb->result == SAM_STAT_GOOD || srb->sense_buffer[2] == 0) && usb_stor_invoke_transport() 858 srb->result = DID_ERROR << 16; usb_stor_invoke_transport() 878 result = usb_stor_port_reset(us); usb_stor_invoke_transport() 881 if (result < 0) { usb_stor_invoke_transport() 918 int result; usb_stor_CB_transport() local 922 result = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe, usb_stor_CB_transport() 929 result); usb_stor_CB_transport() 932 if (result == USB_STOR_XFER_STALLED) { usb_stor_CB_transport() 937 if (result != USB_STOR_XFER_GOOD) { usb_stor_CB_transport() 946 result = usb_stor_bulk_srb(us, pipe, srb); usb_stor_CB_transport() 947 usb_stor_dbg(us, "CBI data stage result is 0x%x\n", result); usb_stor_CB_transport() 950 if (result == USB_STOR_XFER_STALLED) usb_stor_CB_transport() 952 if (result > USB_STOR_XFER_STALLED) usb_stor_CB_transport() 964 result = usb_stor_intr_transfer(us, us->iobuf, 2); usb_stor_CB_transport() 967 if (result != USB_STOR_XFER_GOOD) usb_stor_CB_transport() 986 /* If not UFI, we interpret the data as a result code usb_stor_CB_transport() 1025 int result; usb_stor_Bulk_max_lun() local 1029 result = usb_stor_control_msg(us, us->recv_ctrl_pipe, usb_stor_Bulk_max_lun() 1035 usb_stor_dbg(us, "GetMaxLUN command result is %d, data is %d\n", usb_stor_Bulk_max_lun() 1036 result, us->iobuf[0]); usb_stor_Bulk_max_lun() 1039 * If we have a successful request, return the result if valid. The usb_stor_Bulk_max_lun() 1043 if (result > 0) { usb_stor_Bulk_max_lun() 1055 * pipe, they may return a zero-length result, they may do nothing at usb_stor_Bulk_max_lun() 1069 int result; usb_stor_Bulk_transport() local 1101 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, usb_stor_Bulk_transport() 1103 usb_stor_dbg(us, "Bulk command transfer result=%d\n", result); usb_stor_Bulk_transport() 1104 if (result != USB_STOR_XFER_GOOD) usb_stor_Bulk_transport() 1119 result = usb_stor_bulk_srb(us, pipe, srb); usb_stor_Bulk_transport() 1120 usb_stor_dbg(us, "Bulk data transfer result 0x%x\n", result); usb_stor_Bulk_transport() 1121 if (result == USB_STOR_XFER_ERROR) usb_stor_Bulk_transport() 1130 if (result == USB_STOR_XFER_LONG) usb_stor_Bulk_transport() 1139 if (result == USB_STOR_XFER_SHORT && usb_stor_Bulk_transport() 1165 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, usb_stor_Bulk_transport() 1172 if (result == USB_STOR_XFER_SHORT && cswlen == 0) { usb_stor_Bulk_transport() 1174 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, usb_stor_Bulk_transport() 1179 if (result == USB_STOR_XFER_STALLED) { usb_stor_Bulk_transport() 1183 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, usb_stor_Bulk_transport() 1188 usb_stor_dbg(us, "Bulk status result = %d\n", result); usb_stor_Bulk_transport() 1189 if (result != USB_STOR_XFER_GOOD) usb_stor_Bulk_transport() 1289 int result; usb_stor_reset_common() local 1297 result = usb_stor_control_msg(us, us->send_ctrl_pipe, usb_stor_reset_common() 1300 if (result < 0) { usb_stor_reset_common() 1301 usb_stor_dbg(us, "Soft reset failed: %d\n", result); usb_stor_reset_common() 1302 return result; usb_stor_reset_common() 1316 result = usb_stor_clear_halt(us, us->recv_bulk_pipe); usb_stor_reset_common() 1321 /* return a result code based on the result of the clear-halts */ usb_stor_reset_common() 1322 if (result >= 0) usb_stor_reset_common() 1323 result = result2; usb_stor_reset_common() 1324 if (result < 0) usb_stor_reset_common() 1328 return result; usb_stor_reset_common() 1362 int result; usb_stor_port_reset() local 1368 result = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf); usb_stor_port_reset() 1369 if (result < 0) usb_stor_port_reset() 1371 result); usb_stor_port_reset() 1375 result = -EIO; usb_stor_port_reset() 1378 result = usb_reset_device(us->pusb_dev); usb_stor_port_reset() 1380 result); usb_stor_port_reset() 1384 return result; usb_stor_port_reset() 264 interpret_urb_result(struct us_data *us, unsigned int pipe, unsigned int length, int result, unsigned int partial) interpret_urb_result() argument
|
H A D | sddr55.c | 136 int result; sddr55_status() local 145 result = sddr55_bulk_transport(us, sddr55_status() 148 usb_stor_dbg(us, "Result for send_command in status %d\n", result); sddr55_status() 150 if (result != USB_STOR_XFER_GOOD) { sddr55_status() 155 result = sddr55_bulk_transport(us, sddr55_status() 159 if (result == USB_STOR_XFER_SHORT || result == USB_STOR_XFER_STALLED) { sddr55_status() 173 if (result != USB_STOR_XFER_GOOD) { sddr55_status() 182 result = sddr55_bulk_transport(us, sddr55_status() 185 if (result != USB_STOR_XFER_GOOD) { sddr55_status() 189 return (result == USB_STOR_XFER_GOOD ? sddr55_status() 199 int result = USB_STOR_TRANSPORT_GOOD; sddr55_read_data() local 259 result = sddr55_bulk_transport(us, sddr55_read_data() 263 result); sddr55_read_data() 265 if (result != USB_STOR_XFER_GOOD) { sddr55_read_data() 266 result = USB_STOR_TRANSPORT_ERROR; sddr55_read_data() 271 result = sddr55_bulk_transport(us, sddr55_read_data() 274 if (result != USB_STOR_XFER_GOOD) { sddr55_read_data() 275 result = USB_STOR_TRANSPORT_ERROR; sddr55_read_data() 280 result = sddr55_bulk_transport(us, sddr55_read_data() 283 if (result != USB_STOR_XFER_GOOD) { sddr55_read_data() 284 result = USB_STOR_TRANSPORT_ERROR; sddr55_read_data() 291 result = USB_STOR_TRANSPORT_FAILED; sddr55_read_data() 305 result = USB_STOR_TRANSPORT_GOOD; sddr55_read_data() 310 return result; sddr55_read_data() 318 int result = USB_STOR_TRANSPORT_GOOD; sddr55_write_data() local 410 result = USB_STOR_TRANSPORT_FAILED; sddr55_write_data() 436 result = sddr55_bulk_transport(us, sddr55_write_data() 439 if (result != USB_STOR_XFER_GOOD) { sddr55_write_data() 441 result); sddr55_write_data() 445 result = USB_STOR_TRANSPORT_FAILED; sddr55_write_data() 450 result = sddr55_bulk_transport(us, sddr55_write_data() 453 if (result != USB_STOR_XFER_GOOD) { sddr55_write_data() 455 result); sddr55_write_data() 459 result = USB_STOR_TRANSPORT_FAILED; sddr55_write_data() 464 result = sddr55_bulk_transport(us, DMA_FROM_DEVICE, status, 6); sddr55_write_data() 466 if (result != USB_STOR_XFER_GOOD) { sddr55_write_data() 468 result); sddr55_write_data() 472 result = USB_STOR_TRANSPORT_FAILED; sddr55_write_data() 484 result = USB_STOR_TRANSPORT_FAILED; sddr55_write_data() 501 result = USB_STOR_TRANSPORT_FAILED; sddr55_write_data() 512 result = USB_STOR_TRANSPORT_GOOD; sddr55_write_data() 516 return result; sddr55_write_data() 523 int result; sddr55_read_deviceID() local 530 result = sddr55_bulk_transport(us, DMA_TO_DEVICE, command, 8); sddr55_read_deviceID() 533 result); sddr55_read_deviceID() 535 if (result != USB_STOR_XFER_GOOD) sddr55_read_deviceID() 538 result = sddr55_bulk_transport(us, sddr55_read_deviceID() 541 if (result != USB_STOR_XFER_GOOD) sddr55_read_deviceID() 548 result = sddr55_bulk_transport(us, sddr55_read_deviceID() 566 int result; sddr55_get_capacity() local 571 result = sddr55_read_deviceID(us, sddr55_get_capacity() 575 usb_stor_dbg(us, "Result of read_deviceID is %d\n", result); sddr55_get_capacity() 577 if (result != USB_STOR_XFER_GOOD) sddr55_get_capacity() 654 int result; sddr55_read_map() local 671 result = sddr55_bulk_transport(us, DMA_TO_DEVICE, command, 8); sddr55_read_map() 673 if ( result != USB_STOR_XFER_GOOD) { sddr55_read_map() 678 result = sddr55_bulk_transport(us, DMA_FROM_DEVICE, buffer, numblocks * 2); sddr55_read_map() 680 if ( result != USB_STOR_XFER_GOOD) { sddr55_read_map() 685 result = sddr55_bulk_transport(us, DMA_FROM_DEVICE, command, 2); sddr55_read_map() 687 if ( result != USB_STOR_XFER_GOOD) { sddr55_read_map() 779 int result; sddr55_transport() local 839 result = sddr55_status (us); sddr55_transport() 840 if (result) { sddr55_transport() 841 result = sddr55_status (us); sddr55_transport() 842 if (!result) { sddr55_transport() 976 int result; sddr55_probe() local 978 result = usb_stor_probe1(&us, intf, id, sddr55_probe() 980 if (result) sddr55_probe() 981 return result; sddr55_probe() 988 result = usb_stor_probe2(us); sddr55_probe() 989 return result; sddr55_probe()
|
H A D | karma.c | 104 int result, partial; rio_karma_send_command() local 117 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, rio_karma_send_command() 119 if (result != USB_STOR_XFER_GOOD) rio_karma_send_command() 122 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, rio_karma_send_command() 124 if (result != USB_STOR_XFER_GOOD) rio_karma_send_command() 207 int result; karma_probe() local 209 result = usb_stor_probe1(&us, intf, id, karma_probe() 211 if (result) karma_probe() 212 return result; karma_probe() 218 result = usb_stor_probe2(us); karma_probe() 219 return result; karma_probe()
|
/linux-4.1.27/arch/frv/lib/ |
H A D | checksum.c | 49 unsigned long result = 0; do_csum() local 55 result = *buff; do_csum() 62 result += *(unsigned short *) buff; do_csum() 74 result += carry; do_csum() 75 result += w; do_csum() 76 carry = (w > result); do_csum() 78 result += carry; do_csum() 79 result = (result & 0xffff) + (result >> 16); do_csum() 82 result += *(unsigned short *) buff; do_csum() 87 result += (*buff << 8); do_csum() 88 result = from32to16(result); do_csum() 90 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); do_csum() 92 return result; do_csum() 109 unsigned int result = do_csum(buff, len); csum_partial() local 112 result += (__force u32)sum; csum_partial() 113 if ((__force u32)sum > result) csum_partial() 114 result += 1; csum_partial() 115 return (__force __wsum)result; csum_partial()
|
/linux-4.1.27/drivers/net/wimax/i2400m/ |
H A D | debugfs.c | 173 int result; debugfs_i2400m_suspend_set() local 175 result = i2400m_cmd_enter_powersave(i2400m); debugfs_i2400m_suspend_set() 176 if (result >= 0) debugfs_i2400m_suspend_set() 177 result = 0; debugfs_i2400m_suspend_set() 178 return result; debugfs_i2400m_suspend_set() 202 int result; debugfs_i2400m_reset_set() local 209 result = i2400m_reset(i2400m, rt); debugfs_i2400m_reset_set() 210 if (result >= 0) debugfs_i2400m_reset_set() 211 result = 0; debugfs_i2400m_reset_set() 214 result = -EINVAL; debugfs_i2400m_reset_set() 216 return result; debugfs_i2400m_reset_set() 233 result = d_level_register_debugfs(prefix, name, parent); \ 234 if (result < 0) \ 241 int result; i2400m_debugfs_add() local 247 result = PTR_ERR(dentry); i2400m_debugfs_add() 249 if (result == -ENODEV) i2400m_debugfs_add() 250 result = 0; /* No debugfs support */ i2400m_debugfs_add() 265 result = PTR_ERR(fd); i2400m_debugfs_add() 266 if (IS_ERR(fd) && result != -ENODEV) { i2400m_debugfs_add() 268 "tx_in: %d\n", result); i2400m_debugfs_add() 274 result = PTR_ERR(fd); i2400m_debugfs_add() 275 if (IS_ERR(fd) && result != -ENODEV) { i2400m_debugfs_add() 277 "tx_out: %d\n", result); i2400m_debugfs_add() 283 result = PTR_ERR(fd); i2400m_debugfs_add() 284 if (IS_ERR(fd) && result != -ENODEV) { i2400m_debugfs_add() 286 "state: %d\n", result); i2400m_debugfs_add() 314 result = PTR_ERR(fd); i2400m_debugfs_add() 315 if (IS_ERR(fd) && result != -ENODEV) { i2400m_debugfs_add() 317 "trace_msg_from_user: %d\n", result); i2400m_debugfs_add() 323 result = PTR_ERR(fd); i2400m_debugfs_add() 324 if (IS_ERR(fd) && result != -ENODEV) { i2400m_debugfs_add() 326 "netdev_queue_stopped: %d\n", result); i2400m_debugfs_add() 332 result = PTR_ERR(fd); i2400m_debugfs_add() 333 if (IS_ERR(fd) && result != -ENODEV) { i2400m_debugfs_add() 335 "rx_stats: %d\n", result); i2400m_debugfs_add() 341 result = PTR_ERR(fd); i2400m_debugfs_add() 342 if (IS_ERR(fd) && result != -ENODEV) { i2400m_debugfs_add() 344 "tx_stats: %d\n", result); i2400m_debugfs_add() 349 result = PTR_ERR(fd); i2400m_debugfs_add() 350 if (IS_ERR(fd) && result != -ENODEV) { i2400m_debugfs_add() 352 result); i2400m_debugfs_add() 357 result = PTR_ERR(fd); i2400m_debugfs_add() 358 if (IS_ERR(fd) && result != -ENODEV) { i2400m_debugfs_add() 359 dev_err(dev, "Can't create debugfs entry reset: %d\n", result); i2400m_debugfs_add() 363 result = 0; i2400m_debugfs_add() 365 return result; i2400m_debugfs_add()
|
H A D | usb-fw.c | 92 int result; i2400mu_tx_bulk_out() local 98 result = usb_autopm_get_interface(i2400mu->usb_iface); i2400mu_tx_bulk_out() 99 if (result < 0) { i2400mu_tx_bulk_out() 100 dev_err(dev, "BM-CMD: can't get autopm: %d\n", result); i2400mu_tx_bulk_out() 106 result = usb_bulk_msg(i2400mu->usb_dev, pipe, buf, buf_size, &len, 200); i2400mu_tx_bulk_out() 107 switch (result) { i2400mu_tx_bulk_out() 112 result = -EIO; i2400mu_tx_bulk_out() 115 result = len; i2400mu_tx_bulk_out() 144 result = -ESHUTDOWN; i2400mu_tx_bulk_out() 154 result = -ENODEV; i2400mu_tx_bulk_out() 158 result); i2400mu_tx_bulk_out() 163 return result; i2400mu_tx_bulk_out() 185 ssize_t result; i2400mu_bus_bm_cmd_send() local 194 result = -E2BIG; i2400mu_bus_bm_cmd_send() 207 result = i2400mu_tx_bulk_out(i2400mu, i2400m->bm_cmd_buf, cmd_size); i2400mu_bus_bm_cmd_send() 208 if (result < 0) { i2400mu_bus_bm_cmd_send() 210 opcode, result); i2400mu_bus_bm_cmd_send() 213 if (result != cmd_size) { /* all was transferred? */ i2400mu_bus_bm_cmd_send() 215 "(%zd vs %zu submitted)\n", opcode, result, cmd_size); i2400mu_bus_bm_cmd_send() 216 result = -EIO; i2400mu_bus_bm_cmd_send() 223 i2400m, _cmd, cmd_size, result); i2400mu_bus_bm_cmd_send() 224 return result; i2400mu_bus_bm_cmd_send() 280 ssize_t result = -ENOMEM; i2400mu_bus_bm_wait_for_ack() local 293 result = usb_autopm_get_interface(i2400mu->usb_iface); i2400mu_bus_bm_wait_for_ack() 294 if (result < 0) { i2400mu_bus_bm_wait_for_ack() 295 dev_err(dev, "BM-ACK: can't get autopm: %d\n", (int) result); i2400mu_bus_bm_wait_for_ack() 303 result = i2400mu_notif_submit(i2400mu, ¬if_urb, i2400mu_bus_bm_wait_for_ack() 305 if (result < 0) i2400mu_bus_bm_wait_for_ack() 310 result = -ETIMEDOUT; i2400mu_bus_bm_wait_for_ack() 315 result = -EINTR; /* Interrupted */ i2400mu_bus_bm_wait_for_ack() 319 result = notif_urb.status; /* How was the ack? */ i2400mu_bus_bm_wait_for_ack() 320 switch (result) { i2400mu_bus_bm_wait_for_ack() 328 result = -ESHUTDOWN; i2400mu_bus_bm_wait_for_ack() 348 result = offset; i2400mu_bus_bm_wait_for_ack() 356 i2400m, ack, ack_size, (long) result); i2400mu_bus_bm_wait_for_ack() 357 return result; i2400mu_bus_bm_wait_for_ack()
|
H A D | driver.c | 131 int result; i2400m_op_msg_from_user() local 140 result = PTR_ERR(ack_skb); i2400m_op_msg_from_user() 143 result = wimax_msg_send(&i2400m->wimax_dev, ack_skb); i2400m_op_msg_from_user() 147 genl_info, result); i2400m_op_msg_from_user() 148 return result; i2400m_op_msg_from_user() 157 int result; member in struct:i2400m_reset_ctx 180 int result; i2400m_op_reset() local 185 .result = 0, i2400m_op_reset() 192 result = i2400m_reset(i2400m, I2400M_RT_WARM); i2400m_op_reset() 193 if (result < 0) i2400m_op_reset() 195 result = wait_for_completion_timeout(&ctx.completion, 4*HZ); i2400m_op_reset() 196 if (result == 0) i2400m_op_reset() 197 result = -ETIMEDOUT; i2400m_op_reset() 198 else if (result > 0) i2400m_op_reset() 199 result = ctx.result; i2400m_op_reset() 200 /* if result < 0, pass it on */ i2400m_op_reset() 205 d_fnend(4, dev, "(wimax_dev %p) = %d\n", wimax_dev, result); i2400m_op_reset() 206 return result; i2400m_op_reset() 220 int result; i2400m_check_mac_addr() local 229 result = PTR_ERR(skb); i2400m_check_mac_addr() 231 result); i2400m_check_mac_addr() 256 result = 0; i2400m_check_mac_addr() 259 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result); i2400m_check_mac_addr() 260 return result; i2400m_check_mac_addr() 286 int result; __i2400m_dev_start() local 294 result = i2400m_dev_bootstrap(i2400m, flags); __i2400m_dev_start() 295 if (result < 0) { __i2400m_dev_start() 296 dev_err(dev, "cannot bootstrap device: %d\n", result); __i2400m_dev_start() 299 result = i2400m_tx_setup(i2400m); __i2400m_dev_start() 300 if (result < 0) __i2400m_dev_start() 302 result = i2400m_rx_setup(i2400m); __i2400m_dev_start() 303 if (result < 0) __i2400m_dev_start() 307 result = -ENOMEM; __i2400m_dev_start() 312 result = i2400m->bus_dev_start(i2400m); __i2400m_dev_start() 313 if (result < 0) __i2400m_dev_start() 320 result = i2400m_firmware_check(i2400m); /* fw versions ok? */ __i2400m_dev_start() 321 if (result < 0) __i2400m_dev_start() 324 result = i2400m_check_mac_addr(i2400m); __i2400m_dev_start() 325 if (result < 0) __i2400m_dev_start() 327 result = i2400m_dev_initialize(i2400m); __i2400m_dev_start() 328 if (result < 0) __i2400m_dev_start() 343 net_dev, i2400m, result); __i2400m_dev_start() 344 return result; __i2400m_dev_start() 362 if (result == -EL3RST && times-- > 0) { __i2400m_dev_start() 367 net_dev, i2400m, result); __i2400m_dev_start() 368 return result; __i2400m_dev_start() 375 int result = 0; i2400m_dev_start() local 378 result = __i2400m_dev_start(i2400m, bm_flags); i2400m_dev_start() 379 if (result >= 0) { i2400m_dev_start() 386 return result; i2400m_dev_start() 534 int result = 0; i2400m_post_reset() local 540 result = i2400m->bus_setup(i2400m); i2400m_post_reset() 541 if (result < 0) { i2400m_post_reset() 543 result); i2400m_post_reset() 549 result = __i2400m_dev_start( i2400m_post_reset() 551 if (result < 0) i2400m_post_reset() 555 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result); i2400m_post_reset() 556 return result; i2400m_post_reset() 567 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result); i2400m_post_reset() 568 return result; i2400m_post_reset() 603 int result; __i2400m_dev_reset_handle() local 610 result = 0; __i2400m_dev_reset_handle() 630 result = __i2400m_dev_start(i2400m, __i2400m_dev_reset_handle() 632 if (result < 0) { __i2400m_dev_reset_handle() 634 reason, result); __i2400m_dev_reset_handle() 635 result = -EUCLEAN; __i2400m_dev_reset_handle() 638 result = -ENODEV; __i2400m_dev_reset_handle() 646 ctx->result = result; __i2400m_dev_reset_handle() 650 if (result == -EUCLEAN) { __i2400m_dev_reset_handle() 664 result = i2400m_reset(i2400m, I2400M_RT_BUS); __i2400m_dev_reset_handle() 665 if (result >= 0) __i2400m_dev_reset_handle() 666 result = -ENODEV; __i2400m_dev_reset_handle() 758 int result; i2400m_bm_buf_alloc() local 760 result = -ENOMEM; i2400m_bm_buf_alloc() 772 return result; i2400m_bm_buf_alloc() 861 int result = -ENODEV; i2400m_setup() local 871 result = i2400m_bm_buf_alloc(i2400m); i2400m_setup() 872 if (result < 0) { i2400m_setup() 878 result = i2400m->bus_setup(i2400m); i2400m_setup() 879 if (result < 0) { i2400m_setup() 881 result); i2400m_setup() 886 result = i2400m_bootrom_init(i2400m, bm_flags); i2400m_setup() 887 if (result < 0) { i2400m_setup() 889 "failed: %d\n", result); i2400m_setup() 892 result = i2400m_read_mac_addr(i2400m); i2400m_setup() 893 if (result < 0) i2400m_setup() 900 result = register_netdev(net_dev); /* Okey dokey, bring it up */ i2400m_setup() 901 if (result < 0) { i2400m_setup() 903 result); i2400m_setup() 912 result = wimax_dev_add(&i2400m->wimax_dev, net_dev); i2400m_setup() 913 if (result < 0) i2400m_setup() 917 result = sysfs_create_group(&net_dev->dev.kobj, &i2400m_dev_attr_group); i2400m_setup() 918 if (result < 0) { i2400m_setup() 919 dev_err(dev, "cannot setup i2400m's sysfs: %d\n", result); i2400m_setup() 923 result = i2400m_debugfs_add(i2400m); i2400m_setup() 924 if (result < 0) { i2400m_setup() 925 dev_err(dev, "cannot setup i2400m's debugfs: %d\n", result); i2400m_setup() 929 result = i2400m_dev_start(i2400m, bm_flags); i2400m_setup() 930 if (result < 0) i2400m_setup() 932 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result); i2400m_setup() 933 return result; i2400m_setup() 953 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result); i2400m_setup() 954 return result; i2400m_setup()
|
H A D | control.c | 285 int result; i2400m_msg_check_status() local 293 result = -EBADR; i2400m_msg_check_status() 296 result = ms_to_errno[status].errno; i2400m_msg_check_status() 300 return result; i2400m_msg_check_status() 567 int result; i2400m_msg_ack_hook() local 581 result = i2400m_msg_check_status( i2400m_msg_ack_hook() 583 if (result >= 0) i2400m_msg_ack_hook() 602 int result; i2400m_msg_size_check() local 611 result = -EIO; i2400m_msg_size_check() 619 result = -EIO; i2400m_msg_size_check() 621 result = 0; i2400m_msg_size_check() 625 i2400m, l3l4_hdr, msg_size, result); i2400m_msg_size_check() 626 return result; i2400m_msg_size_check() 710 int result; i2400m_msg_to_dev() local 729 result = i2400m_msg_size_check(i2400m, msg_l3l4_hdr, buf_len); i2400m_msg_to_dev() 730 if (result < 0) i2400m_msg_to_dev() 744 result = i2400m_tx(i2400m, buf, buf_len, I2400M_PT_CTRL); i2400m_msg_to_dev() 745 if (result < 0) { i2400m_msg_to_dev() 747 le16_to_cpu(msg_l3l4_hdr->type), result); i2400m_msg_to_dev() 768 result = wait_for_completion_interruptible_timeout( i2400m_msg_to_dev() 770 if (result == 0) { i2400m_msg_to_dev() 773 result = -ETIMEDOUT; i2400m_msg_to_dev() 774 i2400m_msg_to_dev_cancel_wait(i2400m, result); i2400m_msg_to_dev() 776 } else if (result < 0) { i2400m_msg_to_dev() 778 msg_type, result); i2400m_msg_to_dev() 779 i2400m_msg_to_dev_cancel_wait(i2400m, result); i2400m_msg_to_dev() 788 result = PTR_ERR(ack_skb); i2400m_msg_to_dev() 790 result = 0; i2400m_msg_to_dev() 793 if (result < 0) i2400m_msg_to_dev() 801 result = i2400m_msg_size_check(i2400m, ack_l3l4_hdr, ack_len); i2400m_msg_to_dev() 802 if (result < 0) { i2400m_msg_to_dev() 804 msg_type, result); i2400m_msg_to_dev() 810 result = -EIO; i2400m_msg_to_dev() 828 i2400m, buf, buf_len, result); i2400m_msg_to_dev() 829 return ERR_PTR(result); i2400m_msg_to_dev() 865 int result; i2400m_cmd_enter_powersave() local 871 result = -ENOMEM; i2400m_cmd_enter_powersave() 883 result = PTR_ERR(ack_skb); i2400m_cmd_enter_powersave() 886 result); i2400m_cmd_enter_powersave() 889 result = i2400m_msg_check_status(wimax_msg_data(ack_skb), i2400m_cmd_enter_powersave() 891 if (result == -EACCES) i2400m_cmd_enter_powersave() 893 else if (result < 0) i2400m_cmd_enter_powersave() 896 result, strerr); i2400m_cmd_enter_powersave() 903 return result; i2400m_cmd_enter_powersave() 929 int result; i2400m_get_device_info() local 954 result = i2400m_msg_check_status(ack, strerr, sizeof(strerr)); i2400m_get_device_info() 955 if (result < 0) { i2400m_get_device_info() 957 "%d - %s\n", I2400M_MT_GET_DEVICE_INFO, result, i2400m_get_device_info() 967 result = -EIO; i2400m_get_device_info() 980 return ERR_PTR(result); i2400m_get_device_info() 1011 int result; i2400m_firmware_check() local 1022 result = -ENOMEM; i2400m_firmware_check() 1032 result = PTR_ERR(ack_skb); i2400m_firmware_check() 1034 result); i2400m_firmware_check() 1038 result = i2400m_msg_check_status(ack, strerr, sizeof(strerr)); i2400m_firmware_check() 1039 if (result < 0) { i2400m_firmware_check() 1041 "%d - %s\n", I2400M_MT_GET_LM_VERSION, result, i2400m_firmware_check() 1050 result = -EIO; i2400m_firmware_check() 1057 result = -EINVAL; i2400m_firmware_check() 1063 result = 0; i2400m_firmware_check() 1078 return result; i2400m_firmware_check() 1095 int result; i2400m_cmd_exit_idle() local 1101 result = -ENOMEM; i2400m_cmd_exit_idle() 1110 result = PTR_ERR(ack_skb); i2400m_cmd_exit_idle() 1113 result); i2400m_cmd_exit_idle() 1116 result = i2400m_msg_check_status(wimax_msg_data(ack_skb), i2400m_cmd_exit_idle() 1122 return result; i2400m_cmd_exit_idle() 1143 int result; i2400m_cmd_get_state() local 1151 result = -ENOMEM; i2400m_cmd_get_state() 1163 result = PTR_ERR(ack_skb); i2400m_cmd_get_state() 1167 result = i2400m_msg_check_status(ack, strerr, sizeof(strerr)); i2400m_cmd_get_state() 1168 if (result < 0) { i2400m_cmd_get_state() 1170 "%d - %s\n", I2400M_MT_GET_STATE, result, strerr); i2400m_cmd_get_state() 1175 result = 0; i2400m_cmd_get_state() 1181 return result; i2400m_cmd_get_state() 1198 int result; i2400m_set_init_config() local 1208 result = 0; i2400m_set_init_config() 1221 result = -ENOMEM; i2400m_set_init_config() 1241 result = PTR_ERR(ack_skb); i2400m_set_init_config() 1244 result); i2400m_set_init_config() 1248 result = i2400m_msg_check_status(wimax_msg_data(ack_skb), i2400m_set_init_config() 1250 if (result < 0) i2400m_set_init_config() 1252 I2400M_MT_SET_INIT_CONFIG, result, strerr); i2400m_set_init_config() 1259 i2400m, arg, args, result); i2400m_set_init_config() 1260 return result; i2400m_set_init_config() 1284 int result; i2400m_set_idle_timeout() local 1295 result = -ENOSYS; i2400m_set_idle_timeout() 1298 result = -ENOMEM; i2400m_set_idle_timeout() 1315 result = PTR_ERR(ack_skb); i2400m_set_idle_timeout() 1319 result = i2400m_msg_check_status(ack, strerr, sizeof(strerr)); i2400m_set_idle_timeout() 1320 if (result < 0) { i2400m_set_idle_timeout() 1322 "%d - %s\n", I2400M_MT_GET_STATE, result, strerr); i2400m_set_idle_timeout() 1325 result = 0; i2400m_set_idle_timeout() 1331 return result; i2400m_set_idle_timeout() 1350 int result; i2400m_dev_initialize() local 1401 result = i2400m_set_init_config(i2400m, args, argc); i2400m_dev_initialize() 1402 if (result < 0) i2400m_dev_initialize() 1407 * result (System State TLV and RF Status TLV [done in the rx i2400m_dev_initialize() 1411 result = i2400m_cmd_get_state(i2400m); i2400m_dev_initialize() 1413 if (result < 0) i2400m_dev_initialize() 1414 dev_err(dev, "failed to initialize the device: %d\n", result); i2400m_dev_initialize() 1415 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result); i2400m_dev_initialize() 1416 return result; i2400m_dev_initialize()
|
H A D | sysfs.c | 46 ssize_t result; i2400m_idle_timeout_store() local 50 result = -EINVAL; i2400m_idle_timeout_store() 59 result = i2400m_set_idle_timeout(i2400m, val); i2400m_idle_timeout_store() 60 if (result >= 0) i2400m_idle_timeout_store() 61 result = size; i2400m_idle_timeout_store() 64 return result; i2400m_idle_timeout_store()
|
/linux-4.1.27/security/integrity/ima/ |
H A D | ima_api.c | 46 int i, result = 0; ima_alloc_init_template() local 58 result = field->field_init(iint, file, filename, ima_alloc_init_template() 61 if (result != 0) ima_alloc_init_template() 72 return result; ima_alloc_init_template() 98 int result; ima_store_template() local 109 result = ima_calc_field_array_hash(&entry->template_data[0], ima_store_template() 112 if (result < 0) { ima_store_template() 115 audit_cause, result, 0); ima_store_template() 116 return result; ima_store_template() 120 result = ima_add_template_entry(entry, violation, op, inode, filename); ima_store_template() 121 return result; ima_store_template() 137 int result; ima_add_violation() local 142 result = ima_alloc_init_template(NULL, file, filename, ima_add_violation() 144 if (result < 0) { ima_add_violation() 145 result = -ENOMEM; ima_add_violation() 148 result = ima_store_template(entry, violation, inode, filename); ima_add_violation() 149 if (result < 0) ima_add_violation() 153 op, cause, result, 0); ima_add_violation() 199 int result = 0; ima_collect_measurement() local 213 result = -EACCES; ima_collect_measurement() 223 result = ima_calc_file_hash(file, &hash.hdr); ima_collect_measurement() 224 if (!result) { ima_collect_measurement() 234 result = -ENOMEM; ima_collect_measurement() 238 if (result) ima_collect_measurement() 241 result, 0); ima_collect_measurement() 242 return result; ima_collect_measurement() 267 int result = -ENOMEM; ima_store_measurement() local 275 result = ima_alloc_init_template(iint, file, filename, ima_store_measurement() 277 if (result < 0) { ima_store_measurement() 279 op, audit_cause, result, 0); ima_store_measurement() 283 result = ima_store_template(entry, violation, inode, filename); ima_store_measurement() 284 if (!result || result == -EEXIST) ima_store_measurement() 286 if (result < 0) ima_store_measurement()
|
H A D | ima_queue.c | 94 int result = 0; ima_pcr_extend() local 97 return result; ima_pcr_extend() 99 result = tpm_pcr_extend(TPM_ANY_NUM, CONFIG_IMA_MEASURE_PCR_IDX, hash); ima_pcr_extend() 100 if (result != 0) ima_pcr_extend() 101 pr_err("Error Communicating to TPM chip, result: %d\n", result); ima_pcr_extend() 102 return result; ima_pcr_extend() 116 int result = 0, tpmresult = 0; ima_add_template_entry() local 123 result = -EEXIST; ima_add_template_entry() 128 result = ima_add_digest_entry(entry); ima_add_template_entry() 129 if (result < 0) { ima_add_template_entry() 148 op, audit_cause, result, audit_info); ima_add_template_entry() 149 return result; ima_add_template_entry()
|
H A D | ima_init.c | 58 int result = -ENOMEM; ima_add_boot_aggregate() local 72 result = ima_calc_boot_aggregate(&hash.hdr); ima_add_boot_aggregate() 73 if (result < 0) { ima_add_boot_aggregate() 79 result = ima_alloc_init_template(iint, NULL, boot_aggregate_name, ima_add_boot_aggregate() 81 if (result < 0) { ima_add_boot_aggregate() 86 result = ima_store_template(entry, violation, NULL, ima_add_boot_aggregate() 88 if (result < 0) { ima_add_boot_aggregate() 96 audit_cause, result, 0); ima_add_boot_aggregate() 97 return result; ima_add_boot_aggregate()
|
H A D | ima_policy.c | 184 int result; ima_lsm_update_rules() local 192 result = security_filter_rule_init(entry->lsm[i].type, ima_lsm_update_rules() 470 int result; ima_lsm_rule_init() local 480 result = security_filter_rule_init(entry->lsm[lsm_rule].type, ima_lsm_rule_init() 489 return result; ima_lsm_rule_init() 504 int result = 0; ima_parse_rule() local 516 if (result < 0) ima_parse_rule() 526 result = -EINVAL; ima_parse_rule() 534 result = -EINVAL; ima_parse_rule() 542 result = -EINVAL; ima_parse_rule() 550 result = -EINVAL; ima_parse_rule() 558 result = -EINVAL; ima_parse_rule() 566 result = -EINVAL; ima_parse_rule() 583 result = -EINVAL; ima_parse_rule() 584 if (!result) ima_parse_rule() 591 result = -EINVAL; ima_parse_rule() 606 result = -EINVAL; ima_parse_rule() 607 if (!result) ima_parse_rule() 615 result = -EINVAL; ima_parse_rule() 619 result = kstrtoul(args[0].from, 16, &entry->fsmagic); ima_parse_rule() 620 if (!result) ima_parse_rule() 628 result = -EINVAL; ima_parse_rule() 632 result = blk_part_pack_uuid(args[0].from, ima_parse_rule() 634 if (!result) ima_parse_rule() 644 result = -EINVAL; ima_parse_rule() 648 result = kstrtoul(args[0].from, 10, &lnum); ima_parse_rule() 649 if (!result) { ima_parse_rule() 654 result = -EINVAL; ima_parse_rule() 664 result = -EINVAL; ima_parse_rule() 668 result = kstrtoul(args[0].from, 10, &lnum); ima_parse_rule() 669 if (!result) { ima_parse_rule() 672 result = -EINVAL; ima_parse_rule() 679 result = ima_lsm_rule_init(entry, args, ima_parse_rule() 685 result = ima_lsm_rule_init(entry, args, ima_parse_rule() 691 result = ima_lsm_rule_init(entry, args, ima_parse_rule() 697 result = ima_lsm_rule_init(entry, args, ima_parse_rule() 703 result = ima_lsm_rule_init(entry, args, ima_parse_rule() 709 result = ima_lsm_rule_init(entry, args, ima_parse_rule() 715 result = -EINVAL; ima_parse_rule() 723 result = -EINVAL; ima_parse_rule() 730 result = -EINVAL; ima_parse_rule() 734 if (!result && (entry->action == UNKNOWN)) ima_parse_rule() 735 result = -EINVAL; ima_parse_rule() 740 audit_log_format(ab, "res=%d", !result); ima_parse_rule() 742 return result; ima_parse_rule() 757 ssize_t result, len; ima_parse_add_rule() local 776 result = ima_parse_rule(p, entry); ima_parse_add_rule() 777 if (result) { ima_parse_add_rule() 780 NULL, op, "invalid-policy", result, ima_parse_add_rule() 782 return result; ima_parse_add_rule()
|
/linux-4.1.27/drivers/uwb/ |
H A D | address.c | 63 int result; uwb_rc_dev_addr_mgmt() local 66 result = -ENOMEM; uwb_rc_dev_addr_mgmt() 84 result = uwb_rc_cmd(rc, "DEV-ADDR-MGMT", uwb_rc_dev_addr_mgmt() 87 if (result < 0) uwb_rc_dev_addr_mgmt() 89 if (result < sizeof(*reply)) { uwb_rc_dev_addr_mgmt() 92 "%d vs %zu bytes needed\n", result, sizeof(*reply)); uwb_rc_dev_addr_mgmt() 93 result = -ENOMSG; uwb_rc_dev_addr_mgmt() 99 result = -EIO; uwb_rc_dev_addr_mgmt() 101 result = 0; uwb_rc_dev_addr_mgmt() 105 return result; uwb_rc_dev_addr_mgmt() 127 int result; uwb_rc_addr_set() local 134 result = -EINVAL; uwb_rc_addr_set() 144 return result; uwb_rc_addr_set() 165 int result; uwb_rc_addr_get() local 172 result = -EINVAL; uwb_rc_addr_get() 182 return result; uwb_rc_addr_get() 184 result = uwb_rc_dev_addr_mgmt(rc, bmOperationType, baAddr, &evt); uwb_rc_addr_get() 185 if (result == 0) uwb_rc_addr_get() 198 return result; uwb_rc_addr_get() 222 int result = -EINVAL; uwb_rc_mac_addr_set() local 224 result = uwb_rc_addr_set(rc, addr, UWB_ADDR_MAC); uwb_rc_mac_addr_set() 226 return result; uwb_rc_mac_addr_set() 234 int result = -EINVAL; uwb_rc_dev_addr_set() local 236 result = uwb_rc_addr_set(rc, addr, UWB_ADDR_DEV); uwb_rc_dev_addr_set() 239 return result; uwb_rc_dev_addr_set() 314 ssize_t result; uwb_rc_mac_addr_show() local 317 result = uwb_rc_addr_get(rc, &addr, UWB_ADDR_MAC); uwb_rc_mac_addr_show() 319 if (result >= 0) { uwb_rc_mac_addr_show() 320 result = uwb_mac_addr_print(buf, UWB_ADDR_STRSIZE, &addr); uwb_rc_mac_addr_show() 321 buf[result++] = '\n'; uwb_rc_mac_addr_show() 323 return result; uwb_rc_mac_addr_show() 337 ssize_t result; uwb_rc_mac_addr_store() local 339 result = sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx\n", uwb_rc_mac_addr_store() 342 if (result != 6) { uwb_rc_mac_addr_store() 343 result = -EINVAL; uwb_rc_mac_addr_store() 349 result = -EINVAL; uwb_rc_mac_addr_store() 352 result = uwb_rc_mac_addr_set(rc, &addr); uwb_rc_mac_addr_store() 353 if (result == 0) uwb_rc_mac_addr_store() 356 return result < 0 ? result : size; uwb_rc_mac_addr_store() 364 size_t result; __uwb_addr_print() local 366 result = scnprintf(buf, buf_size, "%pM", addr); __uwb_addr_print() 368 result = scnprintf(buf, buf_size, "%02x:%02x", __uwb_addr_print() 370 return result; __uwb_addr_print()
|
H A D | lc-rc.c | 133 int result = 0; ASIE_show() local 136 result = scnprintf(buf, PAGE_SIZE, "\n"); ASIE_show() 146 result = uwb_ie_dump_hex(ie, ASIE_show() 154 return result; ASIE_show() 167 int result, ie_len = 0; ASIE_store() local 214 result = uwb_rc_ie_add(rc, ie, ie->length + sizeof(struct uwb_ie_hdr)); ASIE_store() 216 return result >= 0 ? size : result; ASIE_store() 258 int result; uwb_rc_mac_addr_setup() local 264 result = uwb_rc_mac_addr_get(rc, &addr); uwb_rc_mac_addr_setup() 265 if (result < 0) { uwb_rc_mac_addr_setup() 266 dev_err(dev, "cannot retrieve UWB EUI-48 address: %d\n", result); uwb_rc_mac_addr_setup() 267 return result; uwb_rc_mac_addr_setup() 274 result = uwb_rc_mac_addr_set(rc, &addr); uwb_rc_mac_addr_setup() 275 if (result < 0) { uwb_rc_mac_addr_setup() 278 devname, result); uwb_rc_mac_addr_setup() 279 return result; uwb_rc_mac_addr_setup() 290 int result; uwb_rc_setup() local 293 result = uwb_radio_setup(rc); uwb_rc_setup() 294 if (result < 0) { uwb_rc_setup() 295 dev_err(dev, "cannot setup UWB radio: %d\n", result); uwb_rc_setup() 298 result = uwb_rc_mac_addr_setup(rc); uwb_rc_setup() 299 if (result < 0) { uwb_rc_setup() 300 dev_err(dev, "cannot setup UWB MAC address: %d\n", result); uwb_rc_setup() 303 result = uwb_rc_dev_addr_assign(rc); uwb_rc_setup() 304 if (result < 0) { uwb_rc_setup() 305 dev_err(dev, "cannot assign UWB DevAddr: %d\n", result); uwb_rc_setup() 308 result = uwb_rc_ie_setup(rc); uwb_rc_setup() 309 if (result < 0) { uwb_rc_setup() 310 dev_err(dev, "cannot setup IE subsystem: %d\n", result); uwb_rc_setup() 313 result = uwb_rsv_setup(rc); uwb_rc_setup() 314 if (result < 0) { uwb_rc_setup() 315 dev_err(dev, "cannot setup reservation subsystem: %d\n", result); uwb_rc_setup() 325 return result; uwb_rc_setup() 341 int result; uwb_rc_add() local 358 result = rc->start(rc); uwb_rc_add() 359 if (result < 0) uwb_rc_add() 362 result = uwb_rc_setup(rc); uwb_rc_add() 363 if (result < 0) { uwb_rc_add() 364 dev_err(dev, "cannot setup UWB radio controller: %d\n", result); uwb_rc_add() 368 result = uwb_dev_add(&rc->uwb_dev, parent_dev, rc); uwb_rc_add() 369 if (result < 0 && result != -EADDRNOTAVAIL) uwb_rc_add() 372 result = uwb_rc_sys_add(rc); uwb_rc_add() 373 if (result < 0) { uwb_rc_add() 375 "dev attributes: %d\n", result); uwb_rc_add() 394 return result; uwb_rc_add()
|
H A D | scan.c | 61 int result; uwb_rc_scan() local 65 result = -ENOMEM; uwb_rc_scan() 77 result = uwb_rc_cmd(rc, "SCAN", &cmd->rccb, sizeof(*cmd), uwb_rc_scan() 79 if (result < 0) uwb_rc_scan() 85 result = -EIO; uwb_rc_scan() 94 return result; uwb_rc_scan() 105 ssize_t result; uwb_rc_scan_show() local 108 result = sprintf(buf, "%d %d\n", rc->scanning, rc->scan_type); uwb_rc_scan_show() 110 return result; uwb_rc_scan_show() 125 ssize_t result = -EINVAL; uwb_rc_scan_store() local 127 result = sscanf(buf, "%u %u %u\n", &channel, &type, &bpst_offset); uwb_rc_scan_store() 128 if (result >= 2 && type < UWB_SCAN_TOP) uwb_rc_scan_store() 129 result = uwb_rc_scan(rc, channel, type, bpst_offset); uwb_rc_scan_store() 131 return result < 0 ? result : size; uwb_rc_scan_store()
|
H A D | ie.c | 112 ssize_t result; uwb_rc_get_ie() local 124 result = uwb_rc_vcmd(uwb_rc, "GET_IE", cmd, sizeof(*cmd), uwb_rc_get_ie() 128 if (result < 0) uwb_rc_get_ie() 129 return result; uwb_rc_get_ie() 132 if (result < sizeof(*get_ie)) { uwb_rc_get_ie() 135 result, sizeof(*get_ie)); uwb_rc_get_ie() 137 } else if (result < sizeof(*get_ie) + le16_to_cpu(get_ie->wIELength)) { uwb_rc_get_ie() 139 "payload (%zu bytes received vs %zu needed)\n", result, uwb_rc_get_ie() 145 return result; uwb_rc_get_ie() 157 int result; uwb_rc_set_ie() local 163 result = uwb_rc_cmd(rc, "SET-IE", &cmd->rccb, uwb_rc_set_ie() 166 if (result < 0) uwb_rc_set_ie() 168 else if (result != sizeof(reply)) { uwb_rc_set_ie() 171 result, sizeof(reply)); uwb_rc_set_ie() 172 result = -EIO; uwb_rc_set_ie() 176 result = -EIO; uwb_rc_set_ie() 178 result = 0; uwb_rc_set_ie() 180 return result; uwb_rc_set_ie() 288 int result = 0; uwb_rc_ie_add() local 300 result = uwb_rc_ie_add_one(uwb_rc, ie); uwb_rc_ie_add() 301 if (result < 0) uwb_rc_ie_add() 304 if (result >= 0) { uwb_rc_ie_add() 307 result = uwb_rc_set_ie(uwb_rc, uwb_rc->ies); uwb_rc_ie_add() 309 result = -EINVAL; uwb_rc_ie_add() 314 return result; uwb_rc_ie_add() 367 int result = 0; uwb_rc_ie_rm() local 374 result = uwb_rc_set_ie(uwb_rc, uwb_rc->ies); uwb_rc_ie_rm() 378 return result; uwb_rc_ie_rm()
|
H A D | beacon.c | 45 int result; uwb_rc_start_beacon() local 58 result = uwb_rc_cmd(rc, "START-BEACON", &cmd->rccb, sizeof(*cmd), uwb_rc_start_beacon() 60 if (result < 0) uwb_rc_start_beacon() 66 result = -EIO; uwb_rc_start_beacon() 70 return result; uwb_rc_start_beacon() 75 int result; uwb_rc_stop_beacon() local 86 result = uwb_rc_cmd(rc, "STOP-BEACON", cmd, sizeof(*cmd), uwb_rc_stop_beacon() 88 if (result < 0) uwb_rc_stop_beacon() 94 result = -EIO; uwb_rc_stop_beacon() 98 return result; uwb_rc_stop_beacon() 117 int result; uwb_rc_beacon() local 124 result = uwb_rc_stop_beacon(rc); uwb_rc_beacon() 127 result = uwb_rc_start_beacon(rc, bpst_offset, channel); uwb_rc_beacon() 128 if (result < 0) { uwb_rc_beacon() 129 dev_err(dev, "Cannot start beaconing: %d\n", result); uwb_rc_beacon() 130 return result; uwb_rc_beacon() 133 result = uwb_rc_set_ie(rc, rc->ies); uwb_rc_beacon() 134 if (result < 0) { uwb_rc_beacon() 136 "%d\n", result); uwb_rc_beacon() 137 result = uwb_rc_stop_beacon(rc); uwb_rc_beacon() 144 if (result >= 0) uwb_rc_beacon() 146 return result; uwb_rc_beacon() 336 ssize_t result = 0; uwb_bce_print_IEs() local 350 result = uwb_ie_dump_hex(ies, ies_len, buf, size); uwb_bce_print_IEs() 355 return result; uwb_bce_print_IEs() 364 int result = -EINVAL; uwb_verify_beacon() local 377 result = 0; uwb_verify_beacon() 379 return result; uwb_verify_beacon() 395 int result = -EINVAL; uwbd_evt_handle_rc_beacon() local 403 result = uwb_verify_beacon(rc, evt, be); uwbd_evt_handle_rc_beacon() 404 if (result < 0) uwbd_evt_handle_rc_beacon() 405 return result; uwbd_evt_handle_rc_beacon() 471 int result = -EINVAL; uwbd_evt_handle_rc_beacon_size() local 493 result = 0; uwbd_evt_handle_rc_beacon_size() 495 return result; uwbd_evt_handle_rc_beacon_size() 542 int result = -EINVAL; uwbd_evt_handle_rc_bpoie_change() local 570 result = 0; uwbd_evt_handle_rc_bpoie_change() 572 return result; uwbd_evt_handle_rc_bpoie_change() 583 ssize_t result; uwb_rc_beacon_show() local 586 result = sprintf(buf, "%d\n", rc->beaconing); uwb_rc_beacon_show() 588 return result; uwb_rc_beacon_show() 601 ssize_t result = -EINVAL; uwb_rc_beacon_store() local 603 result = sscanf(buf, "%d", &channel); uwb_rc_beacon_store() 604 if (result >= 1) uwb_rc_beacon_store() 605 result = uwb_radio_force_channel(rc, channel); uwb_rc_beacon_store() 607 return result < 0 ? result : size; uwb_rc_beacon_store()
|
H A D | driver.c | 90 ssize_t result; beacon_timeout_ms_store() local 91 result = sscanf(buf, "%lu", &bt); beacon_timeout_ms_store() 92 if (result != 1) beacon_timeout_ms_store() 113 int result = 0; uwb_subsys_init() local 115 result = uwb_est_create(); uwb_subsys_init() 116 if (result < 0) { uwb_subsys_init() 121 result = class_register(&uwb_rc_class); uwb_subsys_init() 122 if (result < 0) uwb_subsys_init() 126 result = bus_register(&uwb_bus_type); uwb_subsys_init() 127 if (result) { uwb_subsys_init() 140 return result; uwb_subsys_init()
|
/linux-4.1.27/drivers/usb/wusbcore/ |
H A D | mmc.c | 97 int result = -ENOBUFS; wusbhc_mmcie_set() local 110 result = -ENOSYS; wusbhc_mmcie_set() 126 result = (wusbhc->mmcie_add)(wusbhc, interval, repeat_cnt, handle, wusbhc_mmcie_set() 128 if (result >= 0) wusbhc_mmcie_set() 132 return result; wusbhc_mmcie_set() 143 int result; wusbhc_mmcie_rm() local 157 result = (wusbhc->mmcie_rm)(wusbhc, handle); wusbhc_mmcie_rm() 158 if (result == 0) wusbhc_mmcie_rm() 194 int result; wusbhc_start() local 200 result = wusbhc_rsv_establish(wusbhc); wusbhc_start() 201 if (result < 0) { wusbhc_start() 203 result); wusbhc_start() 207 result = wusbhc_devconnect_start(wusbhc); wusbhc_start() 208 if (result < 0) { wusbhc_start() 210 result); wusbhc_start() 214 result = wusbhc_sec_start(wusbhc); wusbhc_start() 215 if (result < 0) { wusbhc_start() 217 result); wusbhc_start() 221 result = wusbhc->set_num_dnts(wusbhc, wusbhc->dnts_interval, wusbhc_start() 223 if (result < 0) { wusbhc_start() 224 dev_err(dev, "Cannot set DNTS parameters: %d\n", result); wusbhc_start() 227 result = wusbhc_mmc_start(wusbhc); wusbhc_start() 228 if (result < 0) { wusbhc_start() 229 dev_err(dev, "error starting wusbch: %d\n", result); wusbhc_start() 243 return result; wusbhc_start() 269 int result = 0; wusbhc_chid_set() local 288 result = -ENODEV; wusbhc_chid_set() 294 result = wusbhc_pal_register(wusbhc); wusbhc_chid_set() 295 if (result < 0) { wusbhc_chid_set() 303 result = uwb_radio_start(&wusbhc->pal); wusbhc_chid_set() 307 return result; wusbhc_chid_set() 315 return result; wusbhc_chid_set()
|
H A D | dev-sysfs.c | 61 ssize_t result; wusb_cdid_show() local 67 result = ckhdid_printf(buf, PAGE_SIZE, &wusb_dev->cdid); wusb_cdid_show() 70 return result + 1; wusb_cdid_show() 78 int result; wusb_ck_store() local 83 result = sscanf(buf, wusb_ck_store() 96 if (result != 16) wusb_ck_store() 103 result = wusb_dev_4way_handshake(wusbhc, usb_dev->wusb_dev, &ck); wusb_ck_store() 106 return result < 0 ? result : size; wusb_ck_store() 125 int result = sysfs_create_group(&usb_dev->dev.kobj, wusb_dev_sysfs_add() local 128 if (result < 0) wusb_dev_sysfs_add() 130 result); wusb_dev_sysfs_add() 131 return result; wusb_dev_sysfs_add()
|
H A D | wusbhc.c | 71 ssize_t result = -ENOSYS; wusb_trust_timeout_store() local 74 result = sscanf(buf, "%u", &trust_timeout); wusb_trust_timeout_store() 75 if (result != 1) { wusb_trust_timeout_store() 76 result = -EINVAL; wusb_trust_timeout_store() 85 return result < 0 ? result : size; wusb_trust_timeout_store() 98 ssize_t result = 0; wusb_chid_show() local 105 result += ckhdid_printf(buf, PAGE_SIZE, chid); wusb_chid_show() 106 result += sprintf(buf + result, "\n"); wusb_chid_show() 108 return result; wusb_chid_show() 125 ssize_t result; wusb_chid_store() local 127 result = sscanf(buf, wusb_chid_store() 140 if (result != 16) { wusb_chid_store() 142 "%d\n", (int)result); wusb_chid_store() 145 result = wusbhc_chid_set(wusbhc, &chid); wusb_chid_store() 146 return result < 0 ? result : size; wusb_chid_store() 166 ssize_t result; wusb_phy_rate_store() local 168 result = sscanf(buf, "%hhu", &phy_rate); wusb_phy_rate_store() 169 if (result != 1) wusb_phy_rate_store() 196 ssize_t result; wusb_dnts_store() local 198 result = sscanf(buf, "%hhu %hhu", &num_slots, &interval); wusb_dnts_store() 200 if (result != 2) wusb_dnts_store() 225 ssize_t result; wusb_retry_count_store() local 227 result = sscanf(buf, "%hhu", &retry_count); wusb_retry_count_store() 229 if (result != 1) wusb_retry_count_store() 270 int result = 0; wusbhc_create() local 280 result = wusbhc_mmcie_create(wusbhc); wusbhc_create() 281 if (result < 0) wusbhc_create() 283 result = wusbhc_devconnect_create(wusbhc); wusbhc_create() 284 if (result < 0) wusbhc_create() 286 result = wusbhc_rh_create(wusbhc); wusbhc_create() 287 if (result < 0) wusbhc_create() 289 result = wusbhc_sec_create(wusbhc); wusbhc_create() 290 if (result < 0) wusbhc_create() 301 return result; wusbhc_create() 322 int result = 0; wusbhc_b_create() local 325 result = sysfs_create_group(wusbhc_kobj(wusbhc), &wusbhc_attr_group); wusbhc_b_create() 326 if (result < 0) { wusbhc_b_create() 328 result); wusbhc_b_create() 334 return result; wusbhc_b_create() 471 int result; wusbcore_init() local 472 result = wusb_crypto_init(); wusbcore_init() 473 if (result < 0) wusbcore_init() 478 result = -ENOMEM; wusbcore_init() 490 return result; wusbcore_init()
|
H A D | security.c | 124 int result; wusbhc_sec_start() local 128 result = wusbhc->set_gtk(wusbhc, wusbhc->gtk_tkid, wusbhc_sec_start() 130 if (result < 0) wusbhc_sec_start() 132 result); wusbhc_sec_start() 134 return result; wusbhc_sec_start() 170 int result; wusb_dev_set_encryption() local 181 result = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0), wusb_dev_set_encryption() 185 if (result < 0) wusb_dev_set_encryption() 189 wusb_dev->ccm1_etd.bEncryptionValue, result); wusb_dev_set_encryption() 190 return result; wusb_dev_set_encryption() 218 int result, bytes, secd_size; wusb_dev_sec_add() local 227 result = -ENOMEM; wusb_dev_sec_add() 231 result = usb_get_descriptor(usb_dev, USB_DT_SECURITY, wusb_dev_sec_add() 233 if (result < sizeof(*secd)) { wusb_dev_sec_add() 235 "not enough data: %d\n", result); wusb_dev_sec_add() 246 result = usb_get_descriptor(usb_dev, USB_DT_SECURITY, wusb_dev_sec_add() 248 if (result < secd_size) { wusb_dev_sec_add() 250 "not enough data: %d\n", result); wusb_dev_sec_add() 255 top = (void *)secd + result; wusb_dev_sec_add() 285 result = -EINVAL; wusb_dev_sec_add() 292 result = 0; wusb_dev_sec_add() 295 return result; wusb_dev_sec_add() 314 int result = -ENOMEM; wusb_dev_update_address() local 320 result = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0), wusb_dev_update_address() 324 if (result < 0) { wusb_dev_update_address() 326 result); wusb_dev_update_address() 329 result = wusb_set_dev_addr(wusbhc, wusb_dev, 0); wusb_dev_update_address() 330 if (result < 0) wusb_dev_update_address() 336 result = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0), wusb_dev_update_address() 341 if (result < 0) { wusb_dev_update_address() 343 new_address, result); wusb_dev_update_address() 346 result = wusb_set_dev_addr(wusbhc, wusb_dev, new_address); wusb_dev_update_address() 347 if (result < 0) wusb_dev_update_address() 354 return result; wusb_dev_update_address() 365 int result = -ENOMEM; wusb_dev_4way_handshake() local 384 result = wusb_dev_set_encryption(usb_dev, 1); wusb_dev_4way_handshake() 385 if (result < 0) wusb_dev_4way_handshake() 399 result = usb_control_msg( wusb_dev_4way_handshake() 404 if (result < 0) { wusb_dev_4way_handshake() 405 dev_err(dev, "Handshake1: request failed: %d\n", result); wusb_dev_4way_handshake() 410 result = usb_control_msg( wusb_dev_4way_handshake() 415 if (result < 0) { wusb_dev_4way_handshake() 416 dev_err(dev, "Handshake2: request failed: %d\n", result); wusb_dev_4way_handshake() 420 result = -EINVAL; wusb_dev_4way_handshake() 453 result = wusb_key_derive(&keydvt_out, ck->data, &ccm_n, &keydvt_in); wusb_dev_4way_handshake() 454 if (result < 0) { wusb_dev_4way_handshake() 456 result); wusb_dev_4way_handshake() 461 result = wusb_oob_mic(mic, keydvt_out.kck, &ccm_n, &hs[1]); wusb_dev_4way_handshake() 462 if (result < 0) { wusb_dev_4way_handshake() 464 result); wusb_dev_4way_handshake() 480 result = wusb_oob_mic(hs[2].MIC, keydvt_out.kck, &ccm_n, &hs[2]); wusb_dev_4way_handshake() 481 if (result < 0) { wusb_dev_4way_handshake() 483 result); wusb_dev_4way_handshake() 487 result = usb_control_msg( wusb_dev_4way_handshake() 492 if (result < 0) { wusb_dev_4way_handshake() 493 dev_err(dev, "Handshake3: request failed: %d\n", result); wusb_dev_4way_handshake() 497 result = wusbhc->set_ptk(wusbhc, wusb_dev->port_idx, tkid, wusb_dev_4way_handshake() 499 if (result < 0) wusb_dev_4way_handshake() 502 result = wusb_dev_set_gtk(wusbhc, wusb_dev); wusb_dev_4way_handshake() 503 if (result < 0) { wusb_dev_4way_handshake() 505 result); wusb_dev_4way_handshake() 511 result = wusb_dev_update_address(wusbhc, wusb_dev); wusb_dev_4way_handshake() 512 if (result < 0) wusb_dev_4way_handshake() 515 result = 0; wusb_dev_4way_handshake() 529 if (result < 0) wusb_dev_4way_handshake() 534 return result; wusb_dev_4way_handshake()
|
H A D | wa-hc.c | 39 int result; wa_create() local 42 result = wa_rpipes_create(wa); wa_create() 43 if (result < 0) wa_create() 52 result = -ENOMEM; wa_create() 55 result = wa_nep_create(wa, iface); wa_create() 56 if (result < 0) { wa_create() 58 result); wa_create() 68 return result; wa_create()
|
H A D | cbaf.c | 134 int result; cbaf_check() local 142 result = usb_control_msg( cbaf_check() 148 if (result < 0) { cbaf_check() 150 result); cbaf_check() 151 return result; cbaf_check() 155 if (result < sizeof(*assoc_info)) { cbaf_check() 158 (size_t)result, sizeof(*assoc_info)); cbaf_check() 159 return result; cbaf_check() 163 if (result < assoc_size) { cbaf_check() 167 return result; cbaf_check() 281 int result; cbaf_cdid_get() local 287 result = usb_control_msg( cbaf_cdid_get() 293 if (result < 0) { cbaf_cdid_get() 295 result); cbaf_cdid_get() 296 return result; cbaf_cdid_get() 299 needed = result < sizeof(*di) ? sizeof(*di) : le32_to_cpu(di->Length); cbaf_cdid_get() 300 if (result < needed) { cbaf_cdid_get() 302 "%zu bytes needed)\n", (size_t)result, needed); cbaf_cdid_get() 329 ssize_t result; cbaf_wusb_chid_store() local 333 result = sscanf(buf, cbaf_wusb_chid_store() 347 if (result != 16) cbaf_wusb_chid_store() 350 result = cbaf_send_host_info(cbaf); cbaf_wusb_chid_store() 351 if (result < 0) cbaf_wusb_chid_store() 352 return result; cbaf_wusb_chid_store() 353 result = cbaf_cdid_get(cbaf); cbaf_wusb_chid_store() 354 if (result < 0) cbaf_wusb_chid_store() 355 return result; cbaf_wusb_chid_store() 374 ssize_t result; cbaf_wusb_host_name_store() local 378 result = sscanf(buf, "%63s", cbaf->host_name); cbaf_wusb_host_name_store() 379 if (result != 1) cbaf_wusb_host_name_store() 401 ssize_t result; cbaf_wusb_host_band_groups_store() local 406 result = sscanf(buf, "%04hx", &band_groups); cbaf_wusb_host_band_groups_store() 407 if (result != 1) cbaf_wusb_host_band_groups_store() 442 ssize_t result; cbaf_wusb_cdid_store() local 447 result = sscanf(buf, cbaf_wusb_cdid_store() 460 if (result != 16) cbaf_wusb_cdid_store() 517 int result; cbaf_cc_upload() local 536 result = usb_control_msg( cbaf_cc_upload() 543 return result; cbaf_cc_upload() 550 ssize_t result; cbaf_wusb_ck_store() local 554 result = sscanf(buf, cbaf_wusb_ck_store() 567 if (result != 16) cbaf_wusb_ck_store() 570 result = cbaf_cc_upload(cbaf); cbaf_wusb_ck_store() 571 if (result < 0) cbaf_wusb_ck_store() 572 return result; cbaf_wusb_ck_store() 599 int result = -ENOMEM; cbaf_probe() local 611 result = cbaf_check(cbaf); cbaf_probe() 612 if (result < 0) { cbaf_probe() 618 result = sysfs_create_group(&dev->kobj, &cbaf_dev_attr_group); cbaf_probe() 619 if (result < 0) { cbaf_probe() 620 dev_err(dev, "Can't register sysfs attr group: %d\n", result); cbaf_probe() 634 return result; cbaf_probe()
|
H A D | wa-xfer.c | 29 * the NEP endpoint and a transfer result (struct xfer_result) will 130 ssize_t result; /* bytes xfered or error */ member in struct:wa_seg 161 int result; member in struct:wa_xfer 275 * We take xfer->lock for setting the result; this is a barrier 289 wusbhc_giveback_urb(xfer->wa->wusb, xfer->urb, xfer->result); wa_xfer_giveback() 340 unsigned result, cnt; __wa_xfer_is_done() local 345 result = xfer->segs_done == xfer->segs_submitted; __wa_xfer_is_done() 346 if (result == 0) __wa_xfer_is_done() 353 if (found_short && seg->result > 0) { __wa_xfer_is_done() 356 seg->result); __wa_xfer_is_done() 360 urb->actual_length += seg->result; __wa_xfer_is_done() 362 && seg->result < xfer->seg_size __wa_xfer_is_done() 366 "result %zu urb->actual_length %d\n", __wa_xfer_is_done() 368 seg->result, urb->actual_length); __wa_xfer_is_done() 371 xfer->result = seg->result; __wa_xfer_is_done() 372 dev_dbg(dev, "xfer %p ID %08X#%u: ERROR result %zi(0x%08zX)\n", __wa_xfer_is_done() 373 xfer, wa_xfer_id(xfer), seg->index, seg->result, __wa_xfer_is_done() 374 seg->result); __wa_xfer_is_done() 377 xfer->result = seg->result; __wa_xfer_is_done() 378 dev_dbg(dev, "xfer %p ID %08X#%u: ABORTED result %zi(0x%08zX)\n", __wa_xfer_is_done() 379 xfer, wa_xfer_id(xfer), seg->index, seg->result, __wa_xfer_is_done() 380 seg->result); __wa_xfer_is_done() 385 xfer->result = -EINVAL; __wa_xfer_is_done() 389 xfer->result = 0; __wa_xfer_is_done() 391 return result; __wa_xfer_is_done() 458 dev_err(dev, "%s: Transfer Abort request failed. result: %d\n", __wa_xfer_abort_cb() 510 int result = -ENOMEM; __wa_xfer_abort() local 529 result = usb_submit_urb(&b->urb, GFP_ATOMIC); __wa_xfer_abort() 530 if (result < 0) __wa_xfer_abort() 532 return result; /* callback frees! */ __wa_xfer_abort() 539 xfer, result); __wa_xfer_abort() 542 return result; __wa_xfer_abort() 595 ssize_t result; __wa_xfer_setup_sizes() local 604 result = sizeof(struct wa_xfer_ctl); __wa_xfer_setup_sizes() 609 result = sizeof(struct wa_xfer_bi); __wa_xfer_setup_sizes() 613 result = sizeof(struct wa_xfer_hwaiso); __wa_xfer_setup_sizes() 618 result = -EINVAL; /* shut gcc up */ __wa_xfer_setup_sizes() 633 result = -EINVAL; __wa_xfer_setup_sizes() 662 result = -EINVAL; __wa_xfer_setup_sizes() 666 return result; __wa_xfer_setup_sizes() 757 int result; wa_seg_dto_cb() local 792 seg->result += urb->actual_length; wa_seg_dto_cb() 795 wa_xfer_id(xfer), seg->index, seg->result); wa_seg_dto_cb() 810 result = usb_submit_urb(seg->dto_urb, GFP_ATOMIC); wa_seg_dto_cb() 811 if (result < 0) { wa_seg_dto_cb() 813 wa_xfer_id(xfer), seg->index, result); wa_seg_dto_cb() 853 seg->result = urb->status; wa_seg_dto_cb() 922 seg->result = urb->status; wa_seg_iso_pack_desc_cb() 950 * because sometimes the xfer result callback arrives before this 1000 seg->result = urb->status; wa_seg_tr_cb() 1122 int result = 0; __wa_populate_dto_urb() local 1157 result = -ENOMEM; __wa_populate_dto_urb() 1162 return result; __wa_populate_dto_urb() 1175 int result, cnt, isoc_frame_offset = 0; __wa_xfer_setup_segs() local 1183 result = -ENOMEM; __wa_xfer_setup_segs() 1269 result = __wa_populate_dto_urb(xfer, seg, __wa_xfer_setup_segs() 1271 if (result < 0) __wa_xfer_setup_segs() 1296 return result; __wa_xfer_setup_segs() 1311 int result; __wa_xfer_setup() local 1317 result = __wa_xfer_setup_sizes(xfer, &xfer_type); __wa_xfer_setup() 1318 if (result < 0) __wa_xfer_setup() 1320 xfer_hdr_size = result; __wa_xfer_setup() 1321 result = __wa_xfer_setup_segs(xfer, xfer_hdr_size); __wa_xfer_setup() 1322 if (result < 0) { __wa_xfer_setup() 1324 xfer, xfer->segs, result); __wa_xfer_setup() 1378 result = 0; __wa_xfer_setup() 1381 return result; __wa_xfer_setup() 1392 int result; __wa_seg_submit() local 1404 result = usb_submit_urb(&seg->tr_urb, GFP_ATOMIC); __wa_seg_submit() 1405 if (result < 0) { __wa_seg_submit() 1407 __func__, xfer, seg->index, result); __wa_seg_submit() 1414 result = usb_submit_urb(seg->isoc_pack_desc_urb, GFP_ATOMIC); __wa_seg_submit() 1416 if (result < 0) { __wa_seg_submit() 1418 __func__, xfer, seg->index, result); __wa_seg_submit() 1427 result = usb_submit_urb(seg->dto_urb, GFP_ATOMIC); __wa_seg_submit() 1428 if (result < 0) { __wa_seg_submit() 1430 __func__, xfer, seg->index, result); __wa_seg_submit() 1452 seg->result = result; __wa_seg_submit() 1454 return result; __wa_seg_submit() 1466 int result, dto_acquired = 0, dto_done = 0; __wa_xfer_delayed_run() local 1488 result = __wa_seg_submit(rpipe, xfer, seg, &dto_done); __wa_xfer_delayed_run() 1494 atomic_read(&rpipe->segs_available), result); __wa_xfer_delayed_run() 1495 if (unlikely(result < 0)) { __wa_xfer_delayed_run() 1556 int result, dto_acquired = 0, dto_done = 0, dto_waiting = 0; __wa_xfer_submit() local 1572 result = 0; __wa_xfer_submit() 1588 result = __wa_seg_submit(rpipe, xfer, seg, __wa_xfer_submit() 1596 if (result < 0) { __wa_xfer_submit() 1627 return result; __wa_xfer_submit() 1648 * the submitted URBs or from the xfer-result path to kick in. If xfer 1649 * result never kicks in, the xfer will timeout from the USB code and 1654 int result; wa_urb_enqueue_b() local 1662 result = rpipe_get_by_ep(wa, xfer->ep, urb, xfer->gfp); wa_urb_enqueue_b() 1663 if (result < 0) { wa_urb_enqueue_b() 1667 result = -ENODEV; wa_urb_enqueue_b() 1686 result = urb->status; wa_urb_enqueue_b() 1692 result = __wa_xfer_setup(xfer, urb); wa_urb_enqueue_b() 1693 if (result < 0) { wa_urb_enqueue_b() 1703 result = __wa_xfer_submit(xfer); wa_urb_enqueue_b() 1704 if (result < 0) { wa_urb_enqueue_b() 1726 xfer->result = result; wa_urb_enqueue_b() 1727 return result; wa_urb_enqueue_b() 1731 xfer->result = result; wa_urb_enqueue_b() 1836 int result; wa_urb_enqueue() local 1851 result = usb_hcd_link_urb_to_ep(&(wa->wusb->usb_hcd), urb); wa_urb_enqueue() 1853 if (result < 0) wa_urb_enqueue() 1856 result = -ENOMEM; wa_urb_enqueue() 1861 result = -ENOENT; wa_urb_enqueue() 1884 result = wa_urb_enqueue_b(xfer); wa_urb_enqueue() 1885 if (result < 0) { wa_urb_enqueue() 1892 __func__, result); wa_urb_enqueue() 1898 return result; wa_urb_enqueue() 1910 return result; wa_urb_enqueue() 1940 int result; wa_urb_dequeue() local 1944 result = usb_hcd_check_unlink_urb(&(wa->wusb->usb_hcd), urb, status); wa_urb_dequeue() 1945 if ((result == 0) && urb->hcpriv) { wa_urb_dequeue() 1953 if (result) wa_urb_dequeue() 1954 return result; wa_urb_dequeue() 1966 result = -ENOENT; wa_urb_dequeue() 1976 result = -ENOENT; wa_urb_dequeue() 2012 seg->result = -ENOENT; wa_urb_dequeue() 2053 xfer->result = urb->status; /* -ENOENT or -ECONNRESET */ wa_urb_dequeue() 2061 return result; wa_urb_dequeue() 2066 return result; wa_urb_dequeue() 2071 xfer->result = urb->status; wa_urb_dequeue() 2130 * If a last segment flag and/or a transfer result error is encountered, 2233 int result = 0; wa_populate_buf_in_urb() local 2270 result = -ENOMEM; wa_populate_buf_in_urb() 2278 return result; wa_populate_buf_in_urb() 2282 * Process a xfer result completion message 2291 int result; wa_xfer_result_chew() local 2324 seg->result = wa_xfer_status_to_errno(usb_status); wa_xfer_result_chew() 2352 result = wa_populate_buf_in_urb(buf_in_urb, xfer, seg_idx, wa_xfer_result_chew() 2354 if (result < 0) wa_xfer_result_chew() 2357 result = usb_submit_urb(buf_in_urb, GFP_ATOMIC); wa_xfer_result_chew() 2358 if (result < 0) { wa_xfer_result_chew() 2364 seg->result = bytes_transferred; wa_xfer_result_chew() 2383 xfer, seg_idx, result); wa_xfer_result_chew() 2384 seg->result = result; wa_xfer_result_chew() 2455 /* We have a xfer result buffer; check it */ wa_process_iso_packet_status() 2513 int result, total_frames_read = 0, urb_index = 0; wa_process_iso_packet_status() local 2534 result = usb_submit_urb(buf_in_urb, GFP_ATOMIC); wa_process_iso_packet_status() 2549 } while ((result == 0) && (urb_index < WA_MAX_BUF_IN_URBS) wa_process_iso_packet_status() 2553 if (result < 0) { wa_process_iso_packet_status() 2556 result); wa_process_iso_packet_status() 2647 seg->result += urb->actual_length; wa_buf_in_cb() 2649 int result, urb_frame_count; wa_buf_in_cb() local 2657 result = usb_submit_urb(urb, GFP_ATOMIC); wa_buf_in_cb() 2658 if (result < 0) { wa_buf_in_cb() 2661 result); wa_buf_in_cb() 2677 seg->result); wa_buf_in_cb() 2709 seg->result = urb->status; wa_buf_in_cb() 2724 int result; wa_buf_in_cb() local 2728 result = usb_submit_urb(wa->dti_urb, GFP_ATOMIC); wa_buf_in_cb() 2729 if (result < 0) { wa_buf_in_cb() 2731 result); wa_buf_in_cb() 2738 * Handle an incoming transfer result buffer 2740 * Given a transfer result buffer, it completes the transfer (possibly 2742 * new transfer result read. 2765 int result, dti_busy = 0; wa_dti_cb() local 2778 /* We have a xfer result buffer; check it */ wa_dti_cb() 2779 dev_dbg(dev, "DTI: xfer result %d bytes at %p\n", wa_dti_cb() 2782 dev_err(dev, "DTI Error: xfer result--bad size xfer result (%d bytes vs %zu needed)\n", wa_dti_cb() 2789 dev_err(dev, "DTI Error: xfer result--bad header length %u\n", wa_dti_cb() 2794 dev_err(dev, "DTI Error: xfer result--bad header type 0x%02x\n", wa_dti_cb() 2810 dev_err(dev, "DTI Error: xfer result--unknown xfer 0x%08x (status 0x%02x)\n", wa_dti_cb() 2843 result = usb_submit_urb(wa->dti_urb, GFP_ATOMIC); wa_dti_cb() 2844 if (result < 0) { wa_dti_cb() 2846 result); wa_dti_cb() 2855 * Initialize the DTI URB for reading transfer result notifications and also 2862 int result = -ENOMEM, index; wa_dti_start() local 2886 result = usb_submit_urb(wa->dti_urb, GFP_KERNEL); wa_dti_start() 2887 if (result < 0) { wa_dti_start() 2889 result); wa_dti_start() 2899 return result; wa_dti_start() 2906 * that some endpoint has some transfer result data available. We are
|
H A D | wa-rpipe.c | 71 ssize_t result; __rpipe_get_descr() local 77 result = usb_control_msg( __rpipe_get_descr() 83 if (result < 0) { __rpipe_get_descr() 85 index, (int)result); __rpipe_get_descr() 88 if (result < sizeof(*descr)) { __rpipe_get_descr() 91 index, result, sizeof(*descr)); __rpipe_get_descr() 92 result = -EINVAL; __rpipe_get_descr() 95 result = 0; __rpipe_get_descr() 98 return result; __rpipe_get_descr() 109 ssize_t result; __rpipe_set_descr() local 115 result = usb_control_msg( __rpipe_set_descr() 121 if (result < 0) { __rpipe_set_descr() 123 index, (int)result); __rpipe_set_descr() 126 if (result < sizeof(*descr)) { __rpipe_set_descr() 129 index, result, sizeof(*descr)); __rpipe_set_descr() 130 result = -EINVAL; __rpipe_set_descr() 133 result = 0; __rpipe_set_descr() 136 return result; __rpipe_set_descr() 196 int result; rpipe_get_idle() local 211 result = __rpipe_get_descr(wa, &rpipe->descr, rpipe_idx); rpipe_get_idle() 212 if (result < 0) rpipe_get_idle() 214 rpipe_idx, result); rpipe_get_idle() 232 int result; __rpipe_reset() local 235 result = usb_control_msg( __rpipe_reset() 240 if (result < 0) __rpipe_reset() 242 index, result); __rpipe_reset() 243 return result; __rpipe_reset() 316 int result = -ENOMSG; /* better code for lack of companion? */ rpipe_aim() local 379 result = __rpipe_set_descr(wa, &rpipe->descr, rpipe_aim() 381 if (result < 0) { rpipe_aim() 382 dev_err(dev, "Cannot aim rpipe: %d\n", result); rpipe_aim() 385 result = 0; rpipe_aim() 387 return result; rpipe_aim() 400 int result = 0; rpipe_check_aim() local 410 result = -EINVAL; \ rpipe_check_aim() 422 return result; rpipe_check_aim() 440 int result = 0; rpipe_get_by_ep() local 449 result = rpipe_check_aim(rpipe, wa, ep, urb, gfp); rpipe_get_by_ep() 450 if (result < 0) rpipe_get_by_ep() 459 result = -ENOBUFS; rpipe_get_by_ep() 461 result = rpipe_get_idle(&rpipe, wa, 1 << eptype, gfp); rpipe_get_by_ep() 462 if (result < 0) rpipe_get_by_ep() 464 result = rpipe_aim(rpipe, wa, ep, urb, gfp); rpipe_get_by_ep() 465 if (result < 0) { rpipe_get_by_ep() 478 return result; rpipe_get_by_ep()
|
H A D | crypto.c | 168 * the previous crypto result (16 bytes) and crypt it, repeat the next 204 int result = 0; wusb_ccm_mac() local 224 result = -ENOMEM; wusb_ccm_mac() 264 result = crypto_blkcipher_encrypt(&desc, &sg_dst, sg, dst_size); wusb_ccm_mac() 265 if (result < 0) { wusb_ccm_mac() 267 result); wusb_ccm_mac() 284 result = 8; wusb_ccm_mac() 288 return result; wusb_ccm_mac() 302 ssize_t result, bytes = 0, bitr; wusb_prf() local 311 result = PTR_ERR(tfm_cbc); wusb_prf() 312 printk(KERN_ERR "E: can't load CBC(AES): %d\n", (int)result); wusb_prf() 315 result = crypto_blkcipher_setkey(tfm_cbc, key, 16); wusb_prf() 316 if (result < 0) { wusb_prf() 317 printk(KERN_ERR "E: can't set CBC key: %d\n", (int)result); wusb_prf() 323 result = PTR_ERR(tfm_aes); wusb_prf() 324 printk(KERN_ERR "E: can't load AES: %d\n", (int)result); wusb_prf() 327 result = crypto_cipher_setkey(tfm_aes, key, 16); wusb_prf() 328 if (result < 0) { wusb_prf() 329 printk(KERN_ERR "E: can't set AES key: %d\n", (int)result); wusb_prf() 336 result = wusb_ccm_mac(tfm_cbc, tfm_aes, out + bytes, wusb_prf() 338 if (result < 0) wusb_prf() 340 bytes += result; wusb_prf() 342 result = bytes; wusb_prf() 350 return result; wusb_prf() 372 int result; wusb_oob_mic_verify() local 395 result = wusb_oob_mic(mic, stv_hsmic_key, &stv_hsmic_n, &stv_hsmic_hs); wusb_oob_mic_verify() 396 if (result < 0) wusb_oob_mic_verify() 397 printk(KERN_ERR "E: WUSB OOB MIC test: failed: %d\n", result); wusb_oob_mic_verify() 400 "mismatch between MIC result and WUSB1.0[A2]\n"); wusb_oob_mic_verify() 411 result = -EINVAL; wusb_oob_mic_verify() 413 result = 0; wusb_oob_mic_verify() 414 return result; wusb_oob_mic_verify() 452 int result = 0; wusb_key_derive_verify() local 469 result = wusb_key_derive(&keydvt_out, stv_key_a1, &stv_keydvt_n_a1, wusb_key_derive_verify() 471 if (result < 0) wusb_key_derive_verify() 473 "derivation failed: %d\n", result); wusb_key_derive_verify() 476 "mismatch between key derivation result " wusb_key_derive_verify() 488 result = -EINVAL; wusb_key_derive_verify() 490 result = 0; wusb_key_derive_verify() 491 return result; wusb_key_derive_verify() 502 int result; wusb_crypto_init() local 505 result = wusb_key_derive_verify(); wusb_crypto_init() 506 if (result < 0) wusb_crypto_init() 507 return result; wusb_crypto_init()
|
/linux-4.1.27/arch/ia64/include/asm/ |
H A D | delay.h | 32 unsigned long result; ia64_get_itm() local 34 result = ia64_getreg(_IA64_REG_CR_ITM); ia64_get_itm() 36 return result; ia64_get_itm() 62 unsigned long result; ia64_get_itc() local 64 result = ia64_getreg(_IA64_REG_AR_ITC); ia64_get_itc() 67 while (unlikely((__s32) result == -1)) { ia64_get_itc() 68 result = ia64_getreg(_IA64_REG_AR_ITC); ia64_get_itc() 72 return result; ia64_get_itc()
|
/linux-4.1.27/fs/ncpfs/ |
H A D | sock.c | 64 int result; member in struct:ncp_request_reply 134 static inline void ncp_finish_request(struct ncp_server *server, struct ncp_request_reply *req, int result) ncp_finish_request() argument 136 req->result = result; ncp_finish_request() 220 int result; __ncptcp_try_send() local 228 result = do_send(server->ncp_sock, iovc, rq->tx_iovlen, __ncptcp_try_send() 231 if (result == -EAGAIN) __ncptcp_try_send() 234 if (result < 0) { __ncptcp_try_send() 235 pr_err("tcp: Send failed: %d\n", result); __ncptcp_try_send() 236 __ncp_abort_request(server, rq, result); __ncptcp_try_send() 239 if (result >= rq->tx_totallen) { __ncptcp_try_send() 244 rq->tx_totallen -= result; __ncptcp_try_send() 246 while (iov->iov_len <= result) { __ncptcp_try_send() 247 result -= iov->iov_len; __ncptcp_try_send() 251 iov->iov_base += result; __ncptcp_try_send() 252 iov->iov_len -= result; __ncptcp_try_send() 392 int result; ncpdgram_rcv_proc() local 394 result = _recv(sock, &reply, sizeof(reply), MSG_PEEK | MSG_DONTWAIT); ncpdgram_rcv_proc() 395 if (result < 0) { ncpdgram_rcv_proc() 398 if (result >= sizeof(reply)) { ncpdgram_rcv_proc() 407 result = _recv(sock, buf, sizeof(buf), MSG_DONTWAIT); ncpdgram_rcv_proc() 408 if (result < 0) { ncpdgram_rcv_proc() 409 ncp_dbg(1, "recv failed with %d\n", result); ncpdgram_rcv_proc() 412 if (result < 10) { ncpdgram_rcv_proc() 413 ncp_dbg(1, "too short (%u) watchdog packet\n", result); ncpdgram_rcv_proc() 425 result = _recv(sock, server->unexpected_packet.data, sizeof(server->unexpected_packet.data), MSG_DONTWAIT); ncpdgram_rcv_proc() 426 if (result < 0) { ncpdgram_rcv_proc() 429 info_server(server, 0, server->unexpected_packet.data, result); ncpdgram_rcv_proc() 441 result = _recv(sock, server->rxbuf, req->datalen, MSG_DONTWAIT); ncpdgram_rcv_proc() 443 if (result >= 0 && server->sign_active && req->tx_type != NCP_DEALLOC_SLOT_REQUEST) { ncpdgram_rcv_proc() 444 if (result < 8 + 8) { ncpdgram_rcv_proc() 445 result = -EIO; ncpdgram_rcv_proc() 449 result -= 8; ncpdgram_rcv_proc() 451 if (sign_verify_reply(server, server->rxbuf + hdrl, result - hdrl, cpu_to_le32(result), server->rxbuf + result)) { ncpdgram_rcv_proc() 453 result = -EIO; ncpdgram_rcv_proc() 460 ncp_finish_request(server, req, result); ncpdgram_rcv_proc() 512 int result; do_tcp_rcv() local 515 result = _recv(server->ncp_sock, buffer, len, MSG_DONTWAIT); do_tcp_rcv() 522 result = _recv(server->ncp_sock, dummy, len, MSG_DONTWAIT); do_tcp_rcv() 524 if (result < 0) { do_tcp_rcv() 525 return result; do_tcp_rcv() 527 if (result > len) { do_tcp_rcv() 528 pr_err("tcp: bug in recvmsg (%u > %Zu)\n", result, len); do_tcp_rcv() 531 return result; do_tcp_rcv() 536 /* We have to check the result, so store the complete header */ __ncptcp_rcv_proc() 538 int result; __ncptcp_rcv_proc() local 544 result = do_tcp_rcv(server, server->rcv.ptr, server->rcv.len); __ncptcp_rcv_proc() 545 if (result == -EAGAIN) { __ncptcp_rcv_proc() 548 if (result <= 0) { __ncptcp_rcv_proc() 555 if (result < 0) { __ncptcp_rcv_proc() 556 pr_err("tcp: error in recvmsg: %d\n", result); __ncptcp_rcv_proc() 563 server->rcv.ptr += result; __ncptcp_rcv_proc() 565 server->rcv.len -= result; __ncptcp_rcv_proc() 703 int result; do_ncp_rpc_call() local 718 result = ncp_add_request(server, req); do_ncp_rpc_call() 719 if (result < 0) do_ncp_rpc_call() 724 result = -EINTR; do_ncp_rpc_call() 728 result = req->result; do_ncp_rpc_call() 733 return result; do_ncp_rpc_call() 743 int result; ncp_do_request() local 777 result = do_ncp_rpc_call(server, size, reply, max_reply_size); ncp_do_request() 785 ncp_dbg(2, "do_ncp_rpc_call returned %d\n", result); ncp_do_request() 787 return result; ncp_do_request() 799 int result; ncp_request2() local 813 result = ncp_do_request(server, server->current_size, reply, size); ncp_request2() 814 if (result < 0) { ncp_request2() 815 ncp_dbg(1, "ncp_request_error: %d\n", result); ncp_request2() 820 server->reply_size = result; ncp_request2() 821 server->ncp_reply_size = result - sizeof(struct ncp_reply_header); ncp_request2() 823 result = reply->completion_code; ncp_request2() 825 if (result != 0) ncp_request2() 826 ncp_vdbg("completion code=%x\n", result); ncp_request2() 828 return result; ncp_request2() 834 int result; ncp_connect() local 844 result = ncp_do_request(server, sizeof(*h), server->packet, server->packet_size); ncp_connect() 845 if (result < 0) ncp_connect() 848 result = 0; ncp_connect() 850 return result; ncp_connect()
|
H A D | ncplib_kernel.c | 155 int result; ncp_negotiate_buffersize() local 160 if ((result = ncp_request(server, 33)) != 0) { ncp_negotiate_buffersize() 162 return result; ncp_negotiate_buffersize() 178 int result; ncp_negotiate_size_and_options() local 187 if ((result = ncp_request(server, 0x61)) != 0) ncp_negotiate_size_and_options() 190 return result; ncp_negotiate_size_and_options() 194 result = ncp_reply_be16(server, 0); ncp_negotiate_size_and_options() 195 if (result >= NCP_BLOCK_SIZE) ncp_negotiate_size_and_options() 196 size = min(result, size); ncp_negotiate_size_and_options() 206 int result; ncp_get_volume_info_with_number() local 212 if ((result = ncp_request(server, 22)) != 0) { ncp_get_volume_info_with_number() 225 result = -EIO; ncp_get_volume_info_with_number() 232 result = 0; ncp_get_volume_info_with_number() 235 return result; ncp_get_volume_info_with_number() 240 int result; ncp_get_directory_info() local 246 if ((result = ncp_request(server, 22)) != 0) { ncp_get_directory_info() 259 result = -EIO; ncp_get_directory_info() 266 result = 0; ncp_get_directory_info() 269 return result; ncp_get_directory_info() 275 int result; ncp_close_file() local 281 result = ncp_request(server, 66); ncp_close_file() 283 return result; ncp_close_file() 327 int result; ncp_dirhandle_alloc() local 335 if ((result = ncp_request(server, 87)) == 0) { ncp_dirhandle_alloc() 339 return result; ncp_dirhandle_alloc() 343 int result; ncp_dirhandle_free() local 347 result = ncp_request(server, 22); ncp_dirhandle_free() 349 return result; ncp_dirhandle_free() 379 int result = 0; ncp_obtain_nfs_info() local 395 if ((result = ncp_request(server, 87)) == 0) { ncp_obtain_nfs_info() 412 return result; ncp_obtain_nfs_info() 424 int result; ncp_obtain_info() local 438 if ((result = ncp_request(server, 87)) != 0) ncp_obtain_info() 443 result = ncp_obtain_nfs_info(server, target); ncp_obtain_info() 444 return result; ncp_obtain_info() 448 return result; ncp_obtain_info() 458 int result; ncp_obtain_DOS_dir_base() local 468 if ((result = ncp_request(server, 87)) == 0) ncp_obtain_DOS_dir_base() 473 return result; ncp_obtain_DOS_dir_base() 481 int result; ncp_get_known_namespace() local 490 if ((result = ncp_request(server, 87)) != 0) { ncp_get_known_namespace() 492 return NW_NS_DOS; /* not result ?? */ ncp_get_known_namespace() 495 result = NW_NS_DOS; ncp_get_known_namespace() 505 result = NW_NS_NFS; ncp_get_known_namespace() 512 result = NW_NS_OS2; ncp_get_known_namespace() 519 return result; ncp_get_known_namespace() 547 int result; ncp_ObtainSpecificDirBase() local 557 if ((result = ncp_request(server, 87)) != 0) ncp_ObtainSpecificDirBase() 560 return result; ncp_ObtainSpecificDirBase() 577 int result; ncp_mount_subdir() local 580 if ((result = ncp_ObtainSpecificDirBase(server, srcNS, dstNS, volNumber, ncp_mount_subdir() 583 return result; ncp_mount_subdir() 595 int result; ncp_get_volume_root() local 612 if ((result = ncp_request(server, 87)) != 0) { ncp_get_volume_root() 614 return result; ncp_get_volume_root() 626 int result; ncp_lookup_volume() local 629 result = ncp_get_volume_root(server, volname, ncp_lookup_volume() 631 if (result) { ncp_lookup_volume() 632 return result; ncp_lookup_volume() 653 int result; ncp_modify_file_or_subdir_dos_info_path() local 665 result = ncp_request(server, 87); ncp_modify_file_or_subdir_dos_info_path() 667 return result; ncp_modify_file_or_subdir_dos_info_path() 684 int result = 0; ncp_modify_nfs_info() local 699 result = ncp_request(server, 87); ncp_modify_nfs_info() 702 return result; ncp_modify_nfs_info() 712 int result; ncp_DeleteNSEntry() local 721 result = ncp_request(server, 87); ncp_DeleteNSEntry() 723 return result; ncp_DeleteNSEntry() 754 int result; ncp_del_file_or_subdir() local 756 result=ncp_obtain_DOS_dir_base(server, name_space, volnum, dirent, name, &dirent); ncp_del_file_or_subdir() 757 if (result) return result; ncp_del_file_or_subdir() 786 int result; ncp_open_create_file_or_subdir() local 806 if ((result = ncp_request(server, 87)) != 0) ncp_open_create_file_or_subdir() 825 return result; ncp_open_create_file_or_subdir() 834 int result; ncp_initialize_search() local 842 result = ncp_request(server, 87); ncp_initialize_search() 843 if (result) ncp_initialize_search() 849 return result; ncp_initialize_search() 861 int result; ncp_search_for_fileset() local 881 result = ncp_request2(server, 87, buffer, bufsize); ncp_search_for_fileset() 882 if (result) { ncp_search_for_fileset() 884 return result; ncp_search_for_fileset() 905 int result = -EINVAL; ncp_RenameNSEntry() local 934 result = ncp_request(server, 87); ncp_RenameNSEntry() 937 return result; ncp_RenameNSEntry() 944 int result; ncp_ren_or_mov_file_or_subdir() local 948 result = ncp_RenameNSEntry(server, old_dir, old_name, old_type, ncp_ren_or_mov_file_or_subdir() 950 if (result == 0xFF) /* File Not Found, try directory */ ncp_ren_or_mov_file_or_subdir() 953 result = ncp_RenameNSEntry(server, old_dir, old_name, old_type, ncp_ren_or_mov_file_or_subdir() 956 if (result != 0x92) return result; /* All except NO_FILES_RENAMED */ ncp_ren_or_mov_file_or_subdir() 957 result = ncp_del_file_or_subdir(server, new_dir, new_name); ncp_ren_or_mov_file_or_subdir() 958 if (result != 0) return -EACCES; ncp_ren_or_mov_file_or_subdir() 959 result = ncp_RenameNSEntry(server, old_dir, old_name, old_type, ncp_ren_or_mov_file_or_subdir() 961 return result; ncp_ren_or_mov_file_or_subdir() 971 int result; ncp_read_kernel() local 979 if ((result = ncp_request(server, 72)) != 0) { ncp_read_kernel() 988 return result; ncp_read_kernel() 994 Now copying read result by copy_to_user causes pagefault. This pagefault 1007 int result; ncp_read_bounce() local 1014 result = ncp_request2(server, 72, bounce, bufsize); ncp_read_bounce() 1016 if (!result) { ncp_read_bounce() 1019 result = -EIO; ncp_read_bounce() 1027 result = 0; ncp_read_bounce() 1029 result = -EFAULT; ncp_read_bounce() 1032 return result; ncp_read_bounce() 1040 int result; ncp_write_kernel() local 1049 if ((result = ncp_request(server, 73)) == 0) ncp_write_kernel() 1052 return result; ncp_write_kernel() 1060 int result; ncp_LogPhysicalRecord() local 1069 if ((result = ncp_request(server, 0x1A)) != 0) ncp_LogPhysicalRecord() 1072 return result; ncp_LogPhysicalRecord() 1082 int result; ncp_ClearPhysicalRecord() local 1090 if ((result = ncp_request(server, 0x1E)) != 0) ncp_ClearPhysicalRecord() 1093 return result; ncp_ClearPhysicalRecord()
|
H A D | ioctl.c | 260 int result; __ncp_ioctl() local 304 result = ncp_request2(server, request.function, __ncp_ioctl() 306 if (result < 0) __ncp_ioctl() 307 result = -EIO; __ncp_ioctl() 309 result = server->reply_size; __ncp_ioctl() 311 ncp_dbg(1, "copy %d bytes\n", result); __ncp_ioctl() 312 if (result >= 0) __ncp_ioctl() 313 if (copy_to_user(request.data, bouncebuffer, result)) __ncp_ioctl() 314 result = -EFAULT; __ncp_ioctl() 316 return result; __ncp_ioctl() 324 result = -EBUSY; __ncp_ioctl() 326 result = ncp_conn_logged_in(inode->i_sb); __ncp_ioctl() 327 if (result == 0) __ncp_ioctl() 331 return result; __ncp_ioctl() 373 result = -EACCES; __ncp_ioctl() 385 result = 0; __ncp_ioctl() 394 result = 0; __ncp_ioctl() 397 if (!result && copy_to_user(argp, &sr, sizeof(sr))) __ncp_ioctl() 398 result = -EFAULT; __ncp_ioctl() 399 return result; __ncp_ioctl() 414 result = -EBUSY; __ncp_ioctl() 421 result = 0; __ncp_ioctl() 423 result = -EINVAL; __ncp_ioctl() 427 result = -ENOENT; __ncp_ioctl() 429 result = 0; __ncp_ioctl() 431 if (result == 0) { __ncp_ioctl() 443 result = -EIO; __ncp_ioctl() 447 result = -EIO; __ncp_ioctl() 453 return result; __ncp_ioctl() 500 result = 0; __ncp_ioctl() 505 result = -EINVAL; __ncp_ioctl() 510 return result; __ncp_ioctl() 541 if ((result = ncp_make_open(inode, O_RDWR)) != 0) __ncp_ioctl() 543 return result; __ncp_ioctl() 545 result = -EISDIR; __ncp_ioctl() 550 result = ncp_ClearPhysicalRecord(NCP_SERVER(inode), __ncp_ioctl() 554 if (result > 0) result = 0; /* no such lock */ __ncp_ioctl() 566 result = ncp_LogPhysicalRecord(NCP_SERVER(inode), __ncp_ioctl() 572 if (result > 0) result = -EAGAIN; __ncp_ioctl() 576 return result; __ncp_ioctl() 594 result = 0; __ncp_ioctl() 599 result = -EFAULT; __ncp_ioctl() 602 if (!result && copy_to_user(argp, &user, sizeof(user))) __ncp_ioctl() 603 result = -EFAULT; __ncp_ioctl() 604 return result; __ncp_ioctl() 621 result = 0; __ncp_ioctl() 626 result = -EFAULT; __ncp_ioctl() 629 if (!result && copy_to_user(argp, &user, sizeof(user))) __ncp_ioctl() 630 result = -EFAULT; __ncp_ioctl() 631 return result; __ncp_ioctl() 709 result = 0; __ncp_ioctl() 714 result = -EFAULT; __ncp_ioctl() 717 if (result) __ncp_ioctl() 718 return result; __ncp_ioctl()
|
/linux-4.1.27/net/bluetooth/ |
H A D | ecc.c | 148 /* Computes result = in << c, returning carry. Can modify in place 149 * (if result == in). 0 < shift < 64. 151 static u64 vli_lshift(u64 *result, const u64 *in, vli_lshift() argument 160 result[i] = (temp << shift) | carry; vli_lshift() 182 /* Computes result = left + right, returning carry. Can modify in place. */ vli_add() 183 static u64 vli_add(u64 *result, const u64 *left, vli_add() argument 196 result[i] = sum; vli_add() 202 /* Computes result = left - right, returning borrow. Can modify in place. */ vli_sub() 203 static u64 vli_sub(u64 *result, const u64 *left, const u64 *right) vli_sub() argument 215 result[i] = diff; vli_sub() 231 uint128_t result; mul_64_64() local 240 result.m_low = (m0 & 0xffffffffull) | (m2 << 32); mul_64_64() 241 result.m_high = m3 + (m2 >> 32); mul_64_64() 243 return result; mul_64_64() 248 uint128_t result; add_128_128() local 250 result.m_low = a.m_low + b.m_low; add_128_128() 251 result.m_high = a.m_high + b.m_high + (result.m_low < a.m_low); add_128_128() 253 return result; add_128_128() 256 static void vli_mult(u64 *result, const u64 *left, const u64 *right) vli_mult() argument 262 /* Compute each digit of result in sequence, maintaining the vli_mult() 282 result[k] = r01.m_low; vli_mult() 288 result[NUM_ECC_DIGITS * 2 - 1] = r01.m_low; vli_mult() 291 static void vli_square(u64 *result, const u64 *left) vli_square() argument 321 result[k] = r01.m_low; vli_square() 327 result[NUM_ECC_DIGITS * 2 - 1] = r01.m_low; vli_square() 330 /* Computes result = (left + right) % mod. 331 * Assumes that left < mod and right < mod, result != mod. 333 static void vli_mod_add(u64 *result, const u64 *left, const u64 *right, vli_mod_add() argument 338 carry = vli_add(result, left, right); vli_mod_add() 340 /* result > mod (result = mod + remainder), so subtract mod to vli_mod_add() 343 if (carry || vli_cmp(result, mod) >= 0) vli_mod_add() 344 vli_sub(result, result, mod); vli_mod_add() 347 /* Computes result = (left - right) % mod. 348 * Assumes that left < mod and right < mod, result != mod. 350 static void vli_mod_sub(u64 *result, const u64 *left, const u64 *right, vli_mod_sub() argument 353 u64 borrow = vli_sub(result, left, right); vli_mod_sub() 356 * Since -x % d == d - x, we can get the correct result from vli_mod_sub() 357 * result + mod (with overflow). vli_mod_sub() 360 vli_add(result, result, mod); vli_mod_sub() 363 /* Computes result = product % curve_p 365 static void vli_mmod_fast(u64 *result, const u64 *product) vli_mmod_fast() argument 371 vli_set(result, product); vli_mmod_fast() 379 carry += vli_add(result, result, tmp); vli_mmod_fast() 386 carry += vli_add(result, result, tmp); vli_mmod_fast() 393 carry += vli_add(result, result, tmp); vli_mmod_fast() 400 carry += vli_add(result, result, tmp); vli_mmod_fast() 407 carry -= vli_sub(result, result, tmp); vli_mmod_fast() 414 carry -= vli_sub(result, result, tmp); vli_mmod_fast() 421 carry -= vli_sub(result, result, tmp); vli_mmod_fast() 428 carry -= vli_sub(result, result, tmp); vli_mmod_fast() 432 carry += vli_add(result, result, curve_p); vli_mmod_fast() 435 while (carry || vli_cmp(curve_p, result) != 1) vli_mmod_fast() 436 carry -= vli_sub(result, result, curve_p); vli_mmod_fast() 440 /* Computes result = (left * right) % curve_p. */ vli_mod_mult_fast() 441 static void vli_mod_mult_fast(u64 *result, const u64 *left, const u64 *right) vli_mod_mult_fast() argument 446 vli_mmod_fast(result, product); vli_mod_mult_fast() 449 /* Computes result = left^2 % curve_p. */ vli_mod_square_fast() 450 static void vli_mod_square_fast(u64 *result, const u64 *left) vli_mod_square_fast() argument 455 vli_mmod_fast(result, product); vli_mod_square_fast() 459 /* Computes result = (1 / p_input) % mod. All VLIs are the same size. 463 static void vli_mod_inv(u64 *result, const u64 *input, const u64 *mod) vli_mod_inv() argument 471 vli_clear(result); vli_mod_inv() 533 vli_set(result, u); vli_mod_inv() 689 static void ecc_point_mult(struct ecc_point *result, ecc_point_mult() argument 726 vli_set(result->x, rx[0]); ecc_point_mult() 727 vli_set(result->y, ry[0]); ecc_point_mult()
|
/linux-4.1.27/drivers/usb/serial/ |
H A D | ssu100.c | 121 int result; update_mctrl() local 135 result = ssu100_setregister(dev, 0, UART_MCR, urb_value); update_mctrl() 136 if (result < 0) update_mctrl() 139 return result; update_mctrl() 145 int result = 0; ssu100_initdevice() local 151 result = ssu100_getdevice(dev, data); ssu100_initdevice() 152 if (result < 0) { ssu100_initdevice() 153 dev_dbg(&dev->dev, "%s - get_device failed %i\n", __func__, result); ssu100_initdevice() 159 result = ssu100_setdevice(dev, data); ssu100_initdevice() 160 if (result < 0) { ssu100_initdevice() 161 dev_dbg(&dev->dev, "%s - setdevice failed %i\n", __func__, result); ssu100_initdevice() 165 result = ssu100_control_msg(dev, QT_GET_SET_PREBUF_TRIG_LVL, 128, 0); ssu100_initdevice() 166 if (result < 0) { ssu100_initdevice() 167 dev_dbg(&dev->dev, "%s - set prebuffer level failed %i\n", __func__, result); ssu100_initdevice() 171 result = ssu100_control_msg(dev, QT_SET_ATF, ATC_DISABLED, 0); ssu100_initdevice() 172 if (result < 0) { ssu100_initdevice() 173 dev_dbg(&dev->dev, "%s - set ATFprebuffer level failed %i\n", __func__, result); ssu100_initdevice() 177 result = ssu100_getdevice(dev, data); ssu100_initdevice() 178 if (result < 0) { ssu100_initdevice() 179 dev_dbg(&dev->dev, "%s - get_device failed %i\n", __func__, result); ssu100_initdevice() 188 result = ssu100_setdevice(dev, data); ssu100_initdevice() 189 if (result < 0) { ssu100_initdevice() 190 dev_dbg(&dev->dev, "%s - setdevice failed %i\n", __func__, result); ssu100_initdevice() 195 return result; ssu100_initdevice() 209 int result; ssu100_set_termios() local 248 result = ssu100_control_msg(dev, QT_GET_SET_UART, divisor, urb_value); ssu100_set_termios() 249 if (result < 0) ssu100_set_termios() 253 result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, ssu100_set_termios() 256 result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, ssu100_set_termios() 258 if (result < 0) ssu100_set_termios() 264 result = ssu100_control_msg(dev, QT_SW_FLOW_CONTROL_MASK, ssu100_set_termios() 267 result = ssu100_control_msg(dev, QT_SW_FLOW_CONTROL_MASK, ssu100_set_termios() 270 if (result < 0) ssu100_set_termios() 281 int result; ssu100_open() local 288 result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), ssu100_open() 292 if (result < 0) { ssu100_open() 293 dev_dbg(&port->dev, "%s - open failed %i\n", __func__, result); ssu100_open() 295 return result; ssu100_open() 306 result = ssu100_control_msg(dev, QT_GET_SET_UART, 0x30, 0x0300); ssu100_open() 307 if (result < 0) ssu100_open()
|
H A D | navman.c | 35 int result; navman_read_int_callback() local 62 result = usb_submit_urb(urb, GFP_ATOMIC); navman_read_int_callback() 63 if (result) navman_read_int_callback() 66 __func__, result); navman_read_int_callback() 71 int result = 0; navman_open() local 76 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); navman_open() 77 if (result) navman_open() 80 __func__, result); navman_open() 82 return result; navman_open()
|
H A D | ipw.c | 142 int result; ipw_open() local 152 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), ipw_open() 160 if (result < 0) ipw_open() 161 dev_err(dev, "Init of modem failed (error = %d)\n", result); ipw_open() 173 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), ipw_open() 181 if (result < 0) ipw_open() 182 dev_err(dev, "Enabling bulk RxRead failed (error = %d)\n", result); ipw_open() 186 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), ipw_open() 194 if (result < 0) ipw_open() 195 dev_err(dev, "initial flowcontrol failed (error = %d)\n", result); ipw_open() 226 int result; ipw_dtr_rts() local 230 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), ipw_dtr_rts() 238 if (result < 0) ipw_dtr_rts() 239 dev_err(dev, "setting dtr failed (error = %d)\n", result); ipw_dtr_rts() 241 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), ipw_dtr_rts() 249 if (result < 0) ipw_dtr_rts() 250 dev_err(dev, "setting rts failed (error = %d)\n", result); ipw_dtr_rts() 257 int result; ipw_close() local 261 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), ipw_close() 269 if (result < 0) ipw_close() 270 dev_err(dev, "purge failed (error = %d)\n", result); ipw_close() 275 result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), ipw_close() 284 if (result < 0) ipw_close() 285 dev_err(dev, "Disabling bulk RxRead failed (error = %d)\n", result); ipw_close()
|
H A D | oti6858.c | 199 int result; setup_line() local 209 result = usb_control_msg(port->serial->dev, setup_line() 217 if (result != OTI6858_CTRL_PKT_SIZE) { setup_line() 233 result = usb_control_msg(port->serial->dev, setup_line() 242 result = 0; setup_line() 247 if (result != OTI6858_CTRL_PKT_SIZE) setup_line() 253 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); setup_line() 254 if (result != 0) { setup_line() 256 __func__, result); setup_line() 265 int count = 0, result; send_data() local 291 result = usb_control_msg(port->serial->dev, send_data() 296 if (result != 1 || *allow != 0) send_data() 305 result = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO); send_data() 306 if (result != 0) { send_data() 308 __func__, result); send_data() 317 result = usb_submit_urb(port->write_urb, GFP_NOIO); send_data() 318 if (result != 0) { send_data() 320 __func__, result); send_data() 510 int result; oti6858_open() local 519 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), oti6858_open() 525 if (result != OTI6858_CTRL_PKT_SIZE) { oti6858_open() 545 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); oti6858_open() 546 if (result != 0) { oti6858_open() 548 __func__, result); oti6858_open() 550 return result; oti6858_open() 619 unsigned result = 0; oti6858_tiocmget() local 627 result |= TIOCM_RTS; oti6858_tiocmget() 629 result |= TIOCM_CTS; oti6858_tiocmget() 631 result |= TIOCM_DSR; oti6858_tiocmget() 633 result |= TIOCM_DTR; oti6858_tiocmget() 635 result |= TIOCM_RI; oti6858_tiocmget() 637 result |= TIOCM_CD; oti6858_tiocmget() 639 dev_dbg(&port->dev, "%s() = 0x%08x\n", __func__, result); oti6858_tiocmget() 641 return result; oti6858_tiocmget() 729 int result; oti6858_read_int_callback() local 731 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); oti6858_read_int_callback() 732 if (result != 0) { oti6858_read_int_callback() 735 " error %d\n", __func__, result); oti6858_read_int_callback() 756 int result; oti6858_read_int_callback() local 759 result = usb_submit_urb(urb, GFP_ATOMIC); oti6858_read_int_callback() 760 if (result != 0) { oti6858_read_int_callback() 763 " error %d\n", __func__, result); oti6858_read_int_callback() 775 int result; oti6858_read_bulk_callback() local 792 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); oti6858_read_bulk_callback() 793 if (result != 0 && result != -EPERM) { oti6858_read_bulk_callback() 795 " error %d\n", __func__, result); oti6858_read_bulk_callback() 804 int result; oti6858_write_bulk_callback() local 823 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); oti6858_write_bulk_callback() 824 if (result) { oti6858_write_bulk_callback() 826 " error %d\n", __func__, result); oti6858_write_bulk_callback() 836 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); oti6858_write_bulk_callback() 837 if (result != 0) { oti6858_write_bulk_callback() 839 " error %d\n", __func__, result); oti6858_write_bulk_callback()
|
H A D | kobil_sct.c | 172 int result = 0; kobil_open() local 185 result = usb_control_msg(port->serial->dev, kobil_open() 195 dev_dbg(dev, "%s - Send get_HW_version URB returns: %i\n", __func__, result); kobil_open() 200 result = usb_control_msg(port->serial->dev, kobil_open() 210 dev_dbg(dev, "%s - Send get_FW_version URB returns: %i\n", __func__, result); kobil_open() 217 result = usb_control_msg(port->serial->dev, kobil_open() 228 dev_dbg(dev, "%s - Send set_baudrate URB returns: %i\n", __func__, result); kobil_open() 231 result = usb_control_msg(port->serial->dev, kobil_open() 241 dev_dbg(dev, "%s - Send reset_all_queues URB returns: %i\n", __func__, result); kobil_open() 247 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); kobil_open() 248 dev_dbg(dev, "%s - Send read URB returns: %i\n", __func__, result); kobil_open() 266 int result; kobil_read_int_callback() local 283 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); kobil_read_int_callback() 284 dev_dbg(&port->dev, "%s - Send read URB returns: %i\n", __func__, result); kobil_read_int_callback() 297 int result = 0; kobil_write() local 338 result = usb_submit_urb(port->interrupt_out_urb, kobil_write() 340 dev_dbg(&port->dev, "%s - Send write URB returns: %i\n", __func__, result); kobil_write() 353 result = usb_submit_urb(port->interrupt_in_urb, kobil_write() 355 dev_dbg(&port->dev, "%s - Send read URB returns: %i\n", __func__, result); kobil_write() 373 int result; kobil_tiocmget() local 389 result = usb_control_msg(port->serial->dev, kobil_tiocmget() 400 __func__, result, transfer_buffer[0]); kobil_tiocmget() 402 result = 0; kobil_tiocmget() 404 result = TIOCM_DSR; kobil_tiocmget() 406 return result; kobil_tiocmget() 415 int result; kobil_tiocmset() local 441 result = usb_control_msg(port->serial->dev, kobil_tiocmset() 455 result = usb_control_msg(port->serial->dev, kobil_tiocmset() 465 dev_dbg(dev, "%s - Send set_status_line URB returns: %i\n", __func__, result); kobil_tiocmset() 466 return (result < 0) ? result : 0; kobil_tiocmset() 473 int result; kobil_set_termios() local 509 result = usb_control_msg(port->serial->dev, kobil_set_termios() 526 int result; kobil_ioctl() local 535 result = usb_control_msg(port->serial->dev, kobil_ioctl() 548 __func__, result); kobil_ioctl() 549 return (result < 0) ? -EIO: 0; kobil_ioctl()
|
H A D | symbolserial.c | 41 int result; symbol_int_callback() local 85 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); symbol_int_callback() 86 if (result) symbol_int_callback() 89 __func__, result); symbol_int_callback() 99 int result = 0; symbol_open() local 107 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); symbol_open() 108 if (result) symbol_open() 111 __func__, result); symbol_open() 112 return result; symbol_open() 134 int result; symbol_unthrottle() local 144 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); symbol_unthrottle() 145 if (result) symbol_unthrottle() 148 __func__, result); symbol_unthrottle()
|
H A D | cyberjack.c | 106 int result; cyberjack_port_probe() local 119 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); cyberjack_port_probe() 120 if (result) cyberjack_port_probe() 143 int result = 0; cyberjack_open() local 155 return result; cyberjack_open() 170 int result; cyberjack_write() local 220 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); cyberjack_write() 221 if (result) { cyberjack_write() 224 __func__, result); cyberjack_write() 262 int result; cyberjack_read_int_callback() local 295 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); cyberjack_read_int_callback() 296 if (result) cyberjack_read_int_callback() 298 __func__, result); cyberjack_read_int_callback() 304 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); cyberjack_read_int_callback() 305 if (result) cyberjack_read_int_callback() 317 int result; cyberjack_read_bulk_callback() local 347 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); cyberjack_read_bulk_callback() 348 if (result) cyberjack_read_bulk_callback() 350 __func__, result); cyberjack_read_bulk_callback() 373 int length, blksize, result; cyberjack_write_bulk_callback() local 388 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); cyberjack_write_bulk_callback() 389 if (result) { cyberjack_write_bulk_callback() 391 __func__, result); cyberjack_write_bulk_callback()
|
/linux-4.1.27/tools/testing/selftests/powerpc/pmu/ |
H A D | event.c | 107 rc = read(e->fd, &e->result, sizeof(e->result)); event_read() 108 if (rc != sizeof(e->result)) { event_read() 118 printf("%*s: result %*llu ", name_width, e->name, result_width, event_report_justified() 119 e->result.value); event_report_justified() 121 if (e->result.running == e->result.enabled) event_report_justified() 122 printf("running/enabled %llu\n", e->result.running); event_report_justified() 124 printf("running %llu enabled %llu\n", e->result.running, event_report_justified() 125 e->result.enabled); event_report_justified()
|
H A D | l3_bank_test.c | 36 FAIL_IF(event.result.running == 0); l3_bank_test() 37 FAIL_IF(event.result.enabled == 0); l3_bank_test()
|
H A D | count_instructions.c | 46 difference = events[0].result.value - expected; do_count_loop() 47 percentage = (double)difference / events[0].result.value * 100; do_count_loop() 55 printf("Actual %llu\n", events[0].result.value); do_count_loop() 67 if (difference / events[0].result.value) do_count_loop() 80 overhead = events[0].result.value; determine_overhead() 84 current = events[0].result.value; determine_overhead()
|
/linux-4.1.27/drivers/staging/lustre/lustre/lclient/ |
H A D | glimpse.c | 94 int result; cl_glimpse_lock() local 96 result = 0; cl_glimpse_lock() 139 result = cl_wait(env, lock); cl_glimpse_lock() 140 if (result == 0) { cl_glimpse_lock() 161 return result; cl_glimpse_lock() 171 int result; cl_io_get() local 180 result = 1; cl_io_get() 182 result = PTR_ERR(env); cl_io_get() 184 result = 0; cl_io_get() 185 return result; cl_io_get() 202 int result; cl_glimpse_size0() local 205 result = cl_io_get(inode, &env, &io, &refcheck); cl_glimpse_size0() 206 if (result > 0) { cl_glimpse_size0() 209 result = cl_io_init(env, io, CIT_MISC, io->ci_obj); cl_glimpse_size0() 210 if (result > 0) cl_glimpse_size0() 215 result = io->ci_result; cl_glimpse_size0() 216 else if (result == 0) cl_glimpse_size0() 217 result = cl_glimpse_lock(env, io, inode, io->ci_obj, cl_glimpse_size0() 226 return result; cl_glimpse_size0() 237 int result; cl_local_size() local 243 result = cl_io_get(inode, &env, &io, &refcheck); cl_local_size() 244 if (result <= 0) cl_local_size() 245 return result; cl_local_size() 248 result = cl_io_init(env, io, CIT_MISC, clob); cl_local_size() 249 if (result > 0) cl_local_size() 250 result = io->ci_result; cl_local_size() 251 else if (result == 0) { cl_local_size() 262 result = 0; cl_local_size() 264 result = -ENODATA; cl_local_size() 268 return result; cl_local_size()
|
/linux-4.1.27/drivers/media/pci/saa7164/ |
H A D | saa7164-dvb.c | 170 int ret = 0, result; saa7164_dvb_start_port() local 177 result = saa7164_api_transition_port(port, SAA_DMASTATE_ACQUIRE); saa7164_dvb_start_port() 178 if ((result != SAA_OK) && (result != SAA_ERR_ALREADY_STOPPED)) { saa7164_dvb_start_port() 180 __func__, result); saa7164_dvb_start_port() 183 result = saa7164_api_transition_port(port, SAA_DMASTATE_STOP); saa7164_dvb_start_port() 184 if ((result != SAA_OK) && (result != SAA_ERR_ALREADY_STOPPED)) { saa7164_dvb_start_port() 186 "failed, res = 0x%x\n", __func__, result); saa7164_dvb_start_port() 194 result = saa7164_api_transition_port(port, SAA_DMASTATE_PAUSE); saa7164_dvb_start_port() 195 if ((result != SAA_OK) && (result != SAA_ERR_ALREADY_STOPPED)) { saa7164_dvb_start_port() 197 __func__, result); saa7164_dvb_start_port() 200 result = saa7164_api_transition_port(port, SAA_DMASTATE_STOP); saa7164_dvb_start_port() 201 if ((result != SAA_OK) && (result != SAA_ERR_ALREADY_STOPPED)) { saa7164_dvb_start_port() 203 "failed, res = 0x%x\n", __func__, result); saa7164_dvb_start_port() 212 result = saa7164_api_transition_port(port, SAA_DMASTATE_RUN); saa7164_dvb_start_port() 213 if ((result != SAA_OK) && (result != SAA_ERR_ALREADY_STOPPED)) { saa7164_dvb_start_port() 214 printk(KERN_ERR "%s() run transition failed, result = 0x%x\n", saa7164_dvb_start_port() 215 __func__, result); saa7164_dvb_start_port() 218 result = saa7164_api_transition_port(port, SAA_DMASTATE_STOP); saa7164_dvb_start_port() 219 if ((result != SAA_OK) && (result != SAA_ERR_ALREADY_STOPPED)) { saa7164_dvb_start_port() 221 "failed, res = 0x%x\n", __func__, result); saa7164_dvb_start_port() 284 int result, i; dvb_register() local 293 result = -ENOMEM; dvb_register() 296 DRIVER_NAME, result); dvb_register() 322 result = -ENOMEM; dvb_register() 325 DRIVER_NAME, result); dvb_register() 335 result = dvb_register_adapter(&dvb->adapter, DRIVER_NAME, THIS_MODULE, dvb_register() 337 if (result < 0) { dvb_register() 339 "(errno = %d)\n", DRIVER_NAME, result); dvb_register() 345 result = dvb_register_frontend(&dvb->adapter, dvb->frontend); dvb_register() 346 if (result < 0) { dvb_register() 348 "(errno = %d)\n", DRIVER_NAME, result); dvb_register() 361 result = dvb_dmx_init(&dvb->demux); dvb_register() 362 if (result < 0) { dvb_register() 364 DRIVER_NAME, result); dvb_register() 371 result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); dvb_register() 372 if (result < 0) { dvb_register() 374 DRIVER_NAME, result); dvb_register() 379 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); dvb_register() 380 if (result < 0) { dvb_register() 382 "(DMX_FRONTEND_0, errno = %d)\n", DRIVER_NAME, result); dvb_register() 387 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); dvb_register() 388 if (result < 0) { dvb_register() 390 "(DMX_MEMORY_FE, errno = %d)\n", DRIVER_NAME, result); dvb_register() 394 result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw); dvb_register() 395 if (result < 0) { dvb_register() 397 DRIVER_NAME, result); dvb_register() 419 return result; dvb_register()
|
/linux-4.1.27/samples/bpf/ |
H A D | test_verifier.c | 31 } result; member in struct:bpf_test 47 .result = ACCEPT, 56 .result = REJECT, 66 .result = REJECT, 75 .result = REJECT, 84 .result = REJECT, 98 .result = REJECT, 111 .result = REJECT, 125 .result = REJECT, 134 .result = REJECT, 142 .result = REJECT, 150 .result = REJECT, 159 .result = REJECT, 171 .result = REJECT, 183 .result = REJECT, 192 .result = REJECT, 201 .result = REJECT, 210 .result = REJECT, 221 .result = REJECT, 230 .result = REJECT, 239 .result = REJECT, 248 .result = REJECT, 257 .result = REJECT, 270 .result = REJECT, 280 .result = REJECT, 296 .result = ACCEPT, 313 .result = REJECT, 322 .result = REJECT, 331 .result = REJECT, 340 .result = REJECT, 349 .result = REJECT, 358 .result = REJECT, 367 .result = REJECT, 376 .result = REJECT, 385 .result = REJECT, 394 .result = REJECT, 403 .result = REJECT, 413 .result = REJECT, 426 .result = REJECT, 441 .result = REJECT, 457 .result = REJECT, 475 .result = REJECT, 497 .result = ACCEPT, 523 .result = ACCEPT, 557 .result = ACCEPT, 605 .result = ACCEPT, 644 .result = ACCEPT, 672 .result = ACCEPT, 681 .result = REJECT, 701 .result = REJECT, 722 .result = REJECT, 744 .result = REJECT, 796 if (tests[i].result == ACCEPT) { test()
|
/linux-4.1.27/arch/m32r/include/asm/ |
H A D | atomic.h | 52 int result; \ 61 : "=&r" (result) \ 73 int result; \ 82 : "=&r" (result) \ 89 return result; \ 102 * atomic_sub_and_test - subtract value from variable and test result 107 * true if the result is zero, or false for all 116 * Atomically increments @v by 1 and returns the result. 121 int result; atomic_inc_return() local 130 : "=&r" (result) atomic_inc_return() 137 return result; atomic_inc_return() 144 * Atomically decrements @v by 1 and returns the result. 149 int result; atomic_dec_return() local 158 : "=&r" (result) atomic_dec_return() 165 return result; atomic_dec_return() 189 * and returns true if the result is zero, or false for all 199 * returns true if the result is 0, or false for all 210 * if the result is negative, or false when 211 * result is greater than or equal to zero.
|
H A D | local.h | 58 long result; local_add_return() local 67 : "=&r" (result) local_add_return() 76 return result; local_add_return() 89 long result; local_sub_return() local 98 : "=&r" (result) local_sub_return() 107 return result; local_sub_return() 129 * local_sub_and_test - subtract value from variable and test result 134 * true if the result is zero, or false for all 143 * Atomically increments @l by 1 and returns the result. 148 long result; local_inc_return() local 157 : "=&r" (result) local_inc_return() 166 return result; local_inc_return() 173 * Atomically decrements @l by 1 and returns the result. 178 long result; local_dec_return() local 187 : "=&r" (result) local_dec_return() 196 return result; local_dec_return() 220 * and returns true if the result is zero, or false for all 230 * returns true if the result is 0, or false for all 241 * if the result is negative, or false when 242 * result is greater than or equal to zero.
|
/linux-4.1.27/drivers/cpufreq/ |
H A D | speedstep-smi.c | 64 u32 command, result, magic, dummy; speedstep_smi_ownership() local 78 : "=D" (result), speedstep_smi_ownership() 86 pr_debug("result is %x\n", result); speedstep_smi_ownership() 88 return result; speedstep_smi_ownership() 102 u32 command, result = 0, edi, high_mhz, low_mhz, dummy; speedstep_smi_get_freqs() local 120 : "=a" (result), speedstep_smi_get_freqs() 130 pr_debug("result %x, low_freq %u, high_freq %u\n", speedstep_smi_get_freqs() 131 result, low_mhz, high_mhz); speedstep_smi_get_freqs() 140 return result; speedstep_smi_get_freqs() 150 unsigned int result = 0, command, new_state, dummy; speedstep_set_state() local 178 pr_debug("retry %u, previous result %u, waiting...\n", speedstep_set_state() 179 retry, result); speedstep_set_state() 189 : "=b" (new_state), "=D" (result), speedstep_set_state() 203 "with result %u\n", speedstep_set_state() 205 retry, result); speedstep_set_state() 208 "failed with new_state %u and result %u\n", speedstep_set_state() 209 state, new_state, result); speedstep_set_state() 232 int result; speedstep_cpu_init() local 239 result = speedstep_smi_ownership(); speedstep_cpu_init() 240 if (result) { speedstep_cpu_init() 249 result = speedstep_smi_get_freqs(low, high); speedstep_cpu_init() 250 if (result) { speedstep_cpu_init() 255 result = speedstep_get_freqs(speedstep_processor, speedstep_cpu_init() 260 if (result) { speedstep_cpu_init() 263 return result; speedstep_cpu_init() 282 int result = speedstep_smi_ownership(); speedstep_resume() local 284 if (result) speedstep_resume() 287 return result; speedstep_resume()
|
/linux-4.1.27/drivers/ps3/ |
H A D | ps3-vuart.c | 136 int result; _dump_port_params() local 141 result = lv1_get_virtual_uart_param(port_number, i, &value); _dump_port_params() 143 if (result) { _dump_port_params() 145 port_number, strings[i], ps3_result(result)); _dump_port_params() 157 int result; ps3_vuart_get_triggers() local 162 result = lv1_get_virtual_uart_param(dev->port_number, ps3_vuart_get_triggers() 166 if (result) { ps3_vuart_get_triggers() 168 __func__, __LINE__, ps3_result(result)); ps3_vuart_get_triggers() 169 return result; ps3_vuart_get_triggers() 172 result = lv1_get_virtual_uart_param(dev->port_number, ps3_vuart_get_triggers() 175 if (result) { ps3_vuart_get_triggers() 177 __func__, __LINE__, ps3_result(result)); ps3_vuart_get_triggers() 178 return result; ps3_vuart_get_triggers() 181 result = lv1_get_virtual_uart_param(dev->port_number, ps3_vuart_get_triggers() 184 if (result) { ps3_vuart_get_triggers() 186 __func__, __LINE__, ps3_result(result)); ps3_vuart_get_triggers() 187 return result; ps3_vuart_get_triggers() 195 return result; ps3_vuart_get_triggers() 201 int result; ps3_vuart_set_triggers() local 204 result = lv1_set_virtual_uart_param(dev->port_number, ps3_vuart_set_triggers() 207 if (result) { ps3_vuart_set_triggers() 209 __func__, __LINE__, ps3_result(result)); ps3_vuart_set_triggers() 210 return result; ps3_vuart_set_triggers() 213 result = lv1_get_virtual_uart_param(dev->port_number, ps3_vuart_set_triggers() 216 if (result) { ps3_vuart_set_triggers() 218 __func__, __LINE__, ps3_result(result)); ps3_vuart_set_triggers() 219 return result; ps3_vuart_set_triggers() 222 result = lv1_set_virtual_uart_param(dev->port_number, ps3_vuart_set_triggers() 225 if (result) { ps3_vuart_set_triggers() 227 __func__, __LINE__, ps3_result(result)); ps3_vuart_set_triggers() 228 return result; ps3_vuart_set_triggers() 234 return result; ps3_vuart_set_triggers() 240 int result; ps3_vuart_get_rx_bytes_waiting() local 242 result = lv1_get_virtual_uart_param(dev->port_number, ps3_vuart_get_rx_bytes_waiting() 245 if (result) ps3_vuart_get_rx_bytes_waiting() 247 __func__, __LINE__, ps3_result(result)); ps3_vuart_get_rx_bytes_waiting() 251 return result; ps3_vuart_get_rx_bytes_waiting() 263 int result; ps3_vuart_set_interrupt_mask() local 270 result = lv1_set_virtual_uart_param(dev->port_number, ps3_vuart_set_interrupt_mask() 273 if (result) ps3_vuart_set_interrupt_mask() 275 __func__, __LINE__, ps3_result(result)); ps3_vuart_set_interrupt_mask() 277 return result; ps3_vuart_set_interrupt_mask() 283 int result; ps3_vuart_get_interrupt_status() local 287 result = lv1_get_virtual_uart_param(dev->port_number, ps3_vuart_get_interrupt_status() 290 if (result) ps3_vuart_get_interrupt_status() 292 __func__, __LINE__, ps3_result(result)); ps3_vuart_get_interrupt_status() 299 return result; ps3_vuart_get_interrupt_status() 366 int result; ps3_vuart_raw_write() local 369 result = lv1_write_virtual_uart(dev->port_number, ps3_vuart_raw_write() 372 if (result) { ps3_vuart_raw_write() 374 "%s\n", __func__, __LINE__, ps3_result(result)); ps3_vuart_raw_write() 375 return result; ps3_vuart_raw_write() 383 return result; ps3_vuart_raw_write() 396 int result; ps3_vuart_raw_read() local 401 result = lv1_read_virtual_uart(dev->port_number, ps3_vuart_raw_read() 404 if (result) { ps3_vuart_raw_read() 406 __func__, __LINE__, ps3_result(result)); ps3_vuart_raw_read() 407 return result; ps3_vuart_raw_read() 415 return result; ps3_vuart_raw_read() 429 int result; ps3_vuart_clear_rx_bytes() local 434 result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes_waiting); ps3_vuart_clear_rx_bytes() 436 BUG_ON(result); ps3_vuart_clear_rx_bytes() 490 int result; ps3_vuart_write() local 503 result = ps3_vuart_raw_write(dev, buf, bytes, &bytes_written); ps3_vuart_write() 507 if (result) { ps3_vuart_write() 511 return result; ps3_vuart_write() 559 int result; ps3_vuart_queue_rx_bytes() local 566 result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes); ps3_vuart_queue_rx_bytes() 567 BUG_ON(result); ps3_vuart_queue_rx_bytes() 569 if (result) ps3_vuart_queue_rx_bytes() 613 int result; ps3_vuart_read() local 629 result = ps3_vuart_queue_rx_bytes(dev, &tmp); ps3_vuart_read() 630 if (result || !tmp) { ps3_vuart_read() 732 int result = 0; ps3_vuart_handle_interrupt_tx() local 746 result = ps3_vuart_raw_write(dev, lb->head, lb->tail - lb->head, ps3_vuart_handle_interrupt_tx() 749 if (result) { ps3_vuart_handle_interrupt_tx() 779 return result; ps3_vuart_handle_interrupt_tx() 792 int result; ps3_vuart_handle_interrupt_rx() local 800 result = ps3_vuart_queue_rx_bytes(dev, &bytes); ps3_vuart_handle_interrupt_rx() 802 if (result) { ps3_vuart_handle_interrupt_rx() 804 return result; ps3_vuart_handle_interrupt_rx() 816 return result; ps3_vuart_handle_interrupt_rx() 837 int result; ps3_vuart_handle_port_interrupt() local 841 result = ps3_vuart_get_interrupt_status(dev, &status); ps3_vuart_handle_port_interrupt() 843 if (result) ps3_vuart_handle_port_interrupt() 844 return result; ps3_vuart_handle_port_interrupt() 851 result = ps3_vuart_handle_interrupt_disconnect(dev); ps3_vuart_handle_port_interrupt() 852 if (result) ps3_vuart_handle_port_interrupt() 858 result = ps3_vuart_handle_interrupt_tx(dev); ps3_vuart_handle_port_interrupt() 859 if (result) ps3_vuart_handle_port_interrupt() 865 result = ps3_vuart_handle_interrupt_rx(dev); ps3_vuart_handle_port_interrupt() 866 if (result) ps3_vuart_handle_port_interrupt() 916 int result; ps3_vuart_bus_interrupt_get() local 933 result = -ENOMEM; ps3_vuart_bus_interrupt_get() 937 result = ps3_vuart_irq_setup(PS3_BINDING_CPU_ANY, vuart_bus_priv.bmp, ps3_vuart_bus_interrupt_get() 940 if (result) { ps3_vuart_bus_interrupt_get() 942 __func__, __LINE__, result); ps3_vuart_bus_interrupt_get() 943 result = -EPERM; ps3_vuart_bus_interrupt_get() 947 result = request_irq(vuart_bus_priv.virq, ps3_vuart_irq_handler, ps3_vuart_bus_interrupt_get() 950 if (result) { ps3_vuart_bus_interrupt_get() 952 __func__, __LINE__, result); ps3_vuart_bus_interrupt_get() 957 return result; ps3_vuart_bus_interrupt_get() 968 return result; ps3_vuart_bus_interrupt_get() 996 int result; ps3_vuart_probe() local 1016 result = ps3_vuart_bus_interrupt_get(); ps3_vuart_probe() 1018 if (result) ps3_vuart_probe() 1024 result = -EBUSY; ps3_vuart_probe() 1036 result = -ENOMEM; ps3_vuart_probe() 1061 result = drv->probe(dev); ps3_vuart_probe() 1063 result = 0; ps3_vuart_probe() 1068 if (result) { ps3_vuart_probe() 1076 return result; ps3_vuart_probe() 1089 return result; ps3_vuart_probe() 1239 int result; ps3_vuart_port_driver_register() local 1250 result = ps3_system_bus_driver_register(&drv->core); ps3_vuart_port_driver_register() 1251 return result; ps3_vuart_port_driver_register()
|
/linux-4.1.27/drivers/net/wan/ |
H A D | hdlc_x25.c | 92 int result; x25_xmit() local 99 if ((result = lapb_data_request(dev, skb)) != LAPB_OK) x25_xmit() 104 if ((result = lapb_connect_request(dev))!= LAPB_OK) { x25_xmit() 105 if (result == LAPB_CONNECTED) x25_xmit() 110 result); x25_xmit() 115 if ((result = lapb_disconnect_request(dev)) != LAPB_OK) { x25_xmit() 116 if (result == LAPB_NOTCONNECTED) x25_xmit() 121 result); x25_xmit() 137 int result; x25_open() local 147 result = lapb_register(dev, &cb); x25_open() 148 if (result != LAPB_OK) x25_open() 149 return result; x25_open() 193 int result; x25_ioctl() local 209 result=hdlc->attach(dev, ENCODING_NRZ,PARITY_CRC16_PR1_CCITT); x25_ioctl() 210 if (result) x25_ioctl() 211 return result; x25_ioctl() 213 if ((result = attach_hdlc_protocol(dev, &proto, 0))) x25_ioctl() 214 return result; x25_ioctl()
|
H A D | hdlc_raw.c | 45 int result; raw_ioctl() local 76 result = hdlc->attach(dev, new_settings.encoding, raw_ioctl() 78 if (result) raw_ioctl() 79 return result; raw_ioctl() 81 result = attach_hdlc_protocol(dev, &proto, raw_ioctl() 83 if (result) raw_ioctl() 84 return result; raw_ioctl()
|
/linux-4.1.27/arch/alpha/boot/ |
H A D | main.c | 38 unsigned long result; find_pa() local 40 result = vptb[address >> 13]; find_pa() 41 result >>= 32; find_pa() 42 result <<= 13; find_pa() 43 result |= address & 0x1fff; find_pa() 44 return (void *) result; find_pa() 107 long result; openboot() local 109 result = callback_getenv(ENV_BOOTED_DEV, bootdev, 255); openboot() 110 if (result < 0) openboot() 111 return result; openboot() 112 return callback_open(bootdev, result & 255); openboot() 124 long result, boot_size = &_end - (char *) BOOT_ADDR; load() local 126 result = callback_getenv(ENV_BOOTED_FILE, bootfile, 255); load() 127 if (result < 0) load() 128 return result; load() 129 result &= 255; load() 130 bootfile[result] = '\0'; load() 131 if (result) load()
|
/linux-4.1.27/drivers/media/v4l2-core/ |
H A D | videobuf2-dvb.c | 84 int result; vb2_dvb_register_adapter() local 89 result = dvb_register_adapter(&fe->adapter, adapter_name, module, vb2_dvb_register_adapter() 91 if (result < 0) { vb2_dvb_register_adapter() 93 adapter_name, result); vb2_dvb_register_adapter() 98 return result; vb2_dvb_register_adapter() 104 int result; vb2_dvb_register_frontend() local 107 result = dvb_register_frontend(adapter, dvb->frontend); vb2_dvb_register_frontend() 108 if (result < 0) { vb2_dvb_register_frontend() 110 dvb->name, result); vb2_dvb_register_frontend() 123 result = dvb_dmx_init(&dvb->demux); vb2_dvb_register_frontend() 124 if (result < 0) { vb2_dvb_register_frontend() 126 dvb->name, result); vb2_dvb_register_frontend() 133 result = dvb_dmxdev_init(&dvb->dmxdev, adapter); vb2_dvb_register_frontend() 135 if (result < 0) { vb2_dvb_register_frontend() 137 dvb->name, result); vb2_dvb_register_frontend() 142 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); vb2_dvb_register_frontend() 143 if (result < 0) { vb2_dvb_register_frontend() 145 dvb->name, result); vb2_dvb_register_frontend() 150 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); vb2_dvb_register_frontend() 151 if (result < 0) { vb2_dvb_register_frontend() 153 dvb->name, result); vb2_dvb_register_frontend() 157 result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw); vb2_dvb_register_frontend() 158 if (result < 0) { vb2_dvb_register_frontend() 160 dvb->name, result); vb2_dvb_register_frontend() 165 result = dvb_net_init(adapter, &dvb->net, &dvb->demux.dmx); vb2_dvb_register_frontend() 166 if (result < 0) { vb2_dvb_register_frontend() 168 dvb->name, result); vb2_dvb_register_frontend() 187 return result; vb2_dvb_register_frontend()
|
H A D | videobuf-dvb.c | 144 int result; videobuf_dvb_register_adapter() local 149 result = dvb_register_adapter(&fe->adapter, adapter_name, module, videobuf_dvb_register_adapter() 151 if (result < 0) { videobuf_dvb_register_adapter() 153 adapter_name, result); videobuf_dvb_register_adapter() 158 return result; videobuf_dvb_register_adapter() 164 int result; videobuf_dvb_register_frontend() local 167 result = dvb_register_frontend(adapter, dvb->frontend); videobuf_dvb_register_frontend() 168 if (result < 0) { videobuf_dvb_register_frontend() 170 dvb->name, result); videobuf_dvb_register_frontend() 183 result = dvb_dmx_init(&dvb->demux); videobuf_dvb_register_frontend() 184 if (result < 0) { videobuf_dvb_register_frontend() 186 dvb->name, result); videobuf_dvb_register_frontend() 193 result = dvb_dmxdev_init(&dvb->dmxdev, adapter); videobuf_dvb_register_frontend() 195 if (result < 0) { videobuf_dvb_register_frontend() 197 dvb->name, result); videobuf_dvb_register_frontend() 202 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); videobuf_dvb_register_frontend() 203 if (result < 0) { videobuf_dvb_register_frontend() 205 dvb->name, result); videobuf_dvb_register_frontend() 210 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); videobuf_dvb_register_frontend() 211 if (result < 0) { videobuf_dvb_register_frontend() 213 dvb->name, result); videobuf_dvb_register_frontend() 217 result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw); videobuf_dvb_register_frontend() 218 if (result < 0) { videobuf_dvb_register_frontend() 220 dvb->name, result); videobuf_dvb_register_frontend() 225 result = dvb_net_init(adapter, &dvb->net, &dvb->demux.dmx); videobuf_dvb_register_frontend() 226 if (result < 0) { videobuf_dvb_register_frontend() 228 dvb->name, result); videobuf_dvb_register_frontend() 247 return result; videobuf_dvb_register_frontend()
|
/linux-4.1.27/arch/metag/include/asm/ |
H A D | atomic_lnkget.h | 51 int result, temp; \ 63 : "=&d" (temp), "=&da" (result) \ 69 return result; \ 117 int result, temp; atomic_cmpxchg() local 131 : "=&d" (temp), "=&d" (result) atomic_cmpxchg() 137 return result; atomic_cmpxchg() 160 int result, temp; __atomic_add_unless() local 175 : "=&d" (temp), "=&d" (result) __atomic_add_unless() 181 return result; __atomic_add_unless() 186 int result, temp; atomic_sub_if_positive() local 198 : "=&d" (temp), "=&da" (result) atomic_sub_if_positive() 202 return result; atomic_sub_if_positive()
|
/linux-4.1.27/kernel/time/ |
H A D | timeconv.c | 75 * @result pointer to struct tm variable to receive broken-down time 77 void time_to_tm(time_t totalsecs, int offset, struct tm *result) time_to_tm() argument 94 result->tm_hour = rem / SECS_PER_HOUR; time_to_tm() 96 result->tm_min = rem / 60; time_to_tm() 97 result->tm_sec = rem % 60; time_to_tm() 100 result->tm_wday = (4 + days) % 7; time_to_tm() 101 if (result->tm_wday < 0) time_to_tm() 102 result->tm_wday += 7; time_to_tm() 115 result->tm_year = y - 1900; time_to_tm() 117 result->tm_yday = days; time_to_tm() 124 result->tm_mon = y; time_to_tm() 125 result->tm_mday = days + 1; time_to_tm()
|
/linux-4.1.27/sound/aoa/codecs/ |
H A D | tas-basstreble.h | 129 u8 result = tas3004_treble_table[idx]; tas3004_bass() local 132 result += tas3004_bass_diff_to_treble[idx-50]; tas3004_bass() 133 return result; tas3004_bass()
|
/linux-4.1.27/drivers/isdn/mISDN/ |
H A D | dsp_dtmf.c | 126 s32 result[NCOEFF], tresh, treshl; dsp_dtmf_goertzel_decode() local 166 result[k] = dsp_dtmf_goertzel_decode() 200 result[k] = dsp_dtmf_goertzel_decode() 212 if (result[i] < 0) dsp_dtmf_goertzel_decode() 213 result[i] = 0; dsp_dtmf_goertzel_decode() 214 if (result[i] > dsp->dtmf.treshold) { dsp_dtmf_goertzel_decode() 215 if (result[i] > tresh) dsp_dtmf_goertzel_decode() 216 tresh = result[i]; dsp_dtmf_goertzel_decode() 236 result[0] / 10000, result[1] / 10000, result[2] / 10000, dsp_dtmf_goertzel_decode() 237 result[3] / 10000, result[4] / 10000, result[5] / 10000, dsp_dtmf_goertzel_decode() 238 result[6] / 10000, result[7] / 10000, tresh / 10000, dsp_dtmf_goertzel_decode() 239 result[0] / (tresh_100), result[1] / (tresh_100), dsp_dtmf_goertzel_decode() 240 result[2] / (tresh_100), result[3] / (tresh_100), dsp_dtmf_goertzel_decode() 241 result[4] / (tresh_100), result[5] / (tresh_100), dsp_dtmf_goertzel_decode() 242 result[6] / (tresh_100), result[7] / (tresh_100)); dsp_dtmf_goertzel_decode() 251 if (result[i] < treshl) dsp_dtmf_goertzel_decode() 253 if (result[i] < tresh) { dsp_dtmf_goertzel_decode()
|
/linux-4.1.27/drivers/infiniband/core/ |
H A D | ucm.c | 353 int result = 0; ib_ucm_event_handler() local 367 result = ib_ucm_event_process(event, uevent); ib_ucm_event_handler() 368 if (result) ib_ucm_event_handler() 392 int result = 0; ib_ucm_event() local 419 result = -ENOMEM; ib_ucm_event() 430 result = -EFAULT; ib_ucm_event() 436 result = -ENOMEM; ib_ucm_event() 441 result = -EFAULT; ib_ucm_event() 448 result = -ENOMEM; ib_ucm_event() 453 result = -EFAULT; ib_ucm_event() 467 return result; ib_ucm_event() 477 int result; ib_ucm_create_id() local 495 result = PTR_ERR(ctx->cm_id); ib_ucm_create_id() 502 result = -EFAULT; ib_ucm_create_id() 514 return result; ib_ucm_create_id() 524 int result = 0; ib_ucm_destroy_id() local 556 result = -EFAULT; ib_ucm_destroy_id() 559 return result; ib_ucm_destroy_id() 569 int result = 0; ib_ucm_attr_id() local 588 result = -EFAULT; ib_ucm_attr_id() 591 return result; ib_ucm_attr_id() 602 int result = 0; ib_ucm_init_qp_attr() local 617 result = ib_cm_init_qp_attr(ctx->cm_id, &qp_attr, &resp.qp_attr_mask); ib_ucm_init_qp_attr() 618 if (result) ib_ucm_init_qp_attr() 625 result = -EFAULT; ib_ucm_init_qp_attr() 629 return result; ib_ucm_init_qp_attr() 649 int result; ib_ucm_listen() local 658 result = ucm_validate_listen(cmd.service_id, cmd.service_mask); ib_ucm_listen() 659 if (result) ib_ucm_listen() 662 result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask, ib_ucm_listen() 666 return result; ib_ucm_listen() 675 int result; ib_ucm_notify() local 684 result = ib_cm_notify(ctx->cm_id, (enum ib_event_type) cmd.event); ib_ucm_notify() 686 return result; ib_ucm_notify() 739 int result; ib_ucm_send_req() local 748 result = ib_ucm_alloc_data(¶m.private_data, cmd.data, cmd.len); ib_ucm_send_req() 749 if (result) ib_ucm_send_req() 752 result = ib_ucm_path_get(¶m.primary_path, cmd.primary_path); ib_ucm_send_req() 753 if (result) ib_ucm_send_req() 756 result = ib_ucm_path_get(¶m.alternate_path, cmd.alternate_path); ib_ucm_send_req() 757 if (result) ib_ucm_send_req() 778 result = ib_send_cm_req(ctx->cm_id, ¶m); ib_ucm_send_req() 781 result = PTR_ERR(ctx); ib_ucm_send_req() 787 return result; ib_ucm_send_req() 797 int result; ib_ucm_send_rep() local 804 result = ib_ucm_alloc_data(¶m.private_data, cmd.data, cmd.len); ib_ucm_send_rep() 805 if (result) ib_ucm_send_rep() 806 return result; ib_ucm_send_rep() 821 result = ib_send_cm_rep(ctx->cm_id, ¶m); ib_ucm_send_rep() 824 result = PTR_ERR(ctx); ib_ucm_send_rep() 827 return result; ib_ucm_send_rep() 839 int result; ib_ucm_send_private_data() local 844 result = ib_ucm_alloc_data(&private_data, cmd.data, cmd.len); ib_ucm_send_private_data() 845 if (result) ib_ucm_send_private_data() 846 return result; ib_ucm_send_private_data() 850 result = func(ctx->cm_id, private_data, cmd.len); ib_ucm_send_private_data() 853 result = PTR_ERR(ctx); ib_ucm_send_private_data() 856 return result; ib_ucm_send_private_data() 893 int result; ib_ucm_send_info() local 898 result = ib_ucm_alloc_data(&data, cmd.data, cmd.data_len); ib_ucm_send_info() 899 if (result) ib_ucm_send_info() 902 result = ib_ucm_alloc_data(&info, cmd.info, cmd.info_len); ib_ucm_send_info() 903 if (result) ib_ucm_send_info() 908 result = func(ctx->cm_id, cmd.status, info, cmd.info_len, ib_ucm_send_info() 912 result = PTR_ERR(ctx); ib_ucm_send_info() 917 return result; ib_ucm_send_info() 941 int result; ib_ucm_send_mra() local 946 result = ib_ucm_alloc_data(&data, cmd.data, cmd.len); ib_ucm_send_mra() 947 if (result) ib_ucm_send_mra() 948 return result; ib_ucm_send_mra() 952 result = ib_send_cm_mra(ctx->cm_id, cmd.timeout, data, cmd.len); ib_ucm_send_mra() 955 result = PTR_ERR(ctx); ib_ucm_send_mra() 958 return result; ib_ucm_send_mra() 969 int result; ib_ucm_send_lap() local 974 result = ib_ucm_alloc_data(&data, cmd.data, cmd.len); ib_ucm_send_lap() 975 if (result) ib_ucm_send_lap() 978 result = ib_ucm_path_get(&path, cmd.path); ib_ucm_send_lap() 979 if (result) ib_ucm_send_lap() 984 result = ib_send_cm_lap(ctx->cm_id, path, data, cmd.len); ib_ucm_send_lap() 987 result = PTR_ERR(ctx); ib_ucm_send_lap() 992 return result; ib_ucm_send_lap() 1002 int result; ib_ucm_send_sidr_req() local 1010 result = ib_ucm_alloc_data(¶m.private_data, cmd.data, cmd.len); ib_ucm_send_sidr_req() 1011 if (result) ib_ucm_send_sidr_req() 1014 result = ib_ucm_path_get(¶m.path, cmd.path); ib_ucm_send_sidr_req() 1015 if (result) ib_ucm_send_sidr_req() 1025 result = ib_send_cm_sidr_req(ctx->cm_id, ¶m); ib_ucm_send_sidr_req() 1028 result = PTR_ERR(ctx); ib_ucm_send_sidr_req() 1033 return result; ib_ucm_send_sidr_req() 1043 int result; ib_ucm_send_sidr_rep() local 1050 result = ib_ucm_alloc_data(¶m.private_data, ib_ucm_send_sidr_rep() 1052 if (result) ib_ucm_send_sidr_rep() 1055 result = ib_ucm_alloc_data(¶m.info, cmd.info, cmd.info_len); ib_ucm_send_sidr_rep() 1056 if (result) ib_ucm_send_sidr_rep() 1067 result = ib_send_cm_sidr_rep(ctx->cm_id, ¶m); ib_ucm_send_sidr_rep() 1070 result = PTR_ERR(ctx); ib_ucm_send_sidr_rep() 1075 return result; ib_ucm_send_sidr_rep() 1106 ssize_t result; ib_ucm_write() local 1123 result = ucm_cmd_table[hdr.cmd](file, buf + sizeof(hdr), ib_ucm_write() 1125 if (!result) ib_ucm_write() 1126 result = len; ib_ucm_write() 1128 return result; ib_ucm_write()
|
/linux-4.1.27/drivers/infiniband/ulp/ipoib/ |
H A D | ipoib_vlan.c | 55 int result; __ipoib_vlan_add() local 64 result = ipoib_set_dev_features(priv, ppriv->ca); __ipoib_vlan_add() 65 if (result) __ipoib_vlan_add() 74 result = ipoib_dev_init(priv->dev, ppriv->ca, ppriv->port); __ipoib_vlan_add() 75 if (result < 0) { __ipoib_vlan_add() 82 result = register_netdevice(priv->dev); __ipoib_vlan_add() 83 if (result) { __ipoib_vlan_add() 84 ipoib_warn(priv, "failed to initialize; error %i", result); __ipoib_vlan_add() 109 result = -ENOMEM; __ipoib_vlan_add() 117 return result; __ipoib_vlan_add() 125 int result; ipoib_vlan_add() local 149 result = -ENOTUNIQ; ipoib_vlan_add() 156 result = -ENOTUNIQ; ipoib_vlan_add() 161 result = __ipoib_vlan_add(ppriv, priv, pkey, IPOIB_LEGACY_CHILD); ipoib_vlan_add() 166 if (result) ipoib_vlan_add() 171 return result; ipoib_vlan_add()
|
/linux-4.1.27/arch/um/kernel/skas/ |
H A D | syscall.c | 18 long result; handle_syscall() local 34 result = -ENOSYS; handle_syscall() 35 else result = EXECUTE_SYSCALL(syscall, regs); handle_syscall() 37 PT_REGS_SET_SYSCALL_RETURN(regs, result); handle_syscall()
|
/linux-4.1.27/arch/powerpc/include/asm/ |
H A D | perf_event.h | 30 * Overload regs->result to specify whether we should use the MSR (result 31 * is zero) or the SIAR (result is non zero). 35 (regs)->result = 0; \
|
/linux-4.1.27/arch/arm/mach-bcm/ |
H A D | kona_l2_cache.c | 23 unsigned int result; kona_l2_cache_init() local 33 result = bcm_kona_smc(SSAPI_ENABLE_L2_CACHE, 0, 0, 0, 0); kona_l2_cache_init() 34 if (result != SEC_ROM_RET_OK) { kona_l2_cache_init() 36 result); kona_l2_cache_init()
|
/linux-4.1.27/drivers/i2c/busses/ |
H A D | i2c-octeon.c | 203 int result; octeon_i2c_wait() local 207 result = wait_event_timeout(i2c->queue, octeon_i2c_wait() 213 if (result < 0) { octeon_i2c_wait() 215 return result; octeon_i2c_wait() 216 } else if (result == 0) { octeon_i2c_wait() 233 int result; octeon_i2c_start() local 238 result = octeon_i2c_wait(i2c); octeon_i2c_start() 239 if (result) { octeon_i2c_start() 250 result = octeon_i2c_wait(i2c); octeon_i2c_start() 252 if (result) octeon_i2c_start() 253 return result; octeon_i2c_start() 301 int i, result; octeon_i2c_write() local 304 result = octeon_i2c_start(i2c); octeon_i2c_write() 305 if (result) octeon_i2c_write() 306 return result; octeon_i2c_write() 311 result = octeon_i2c_wait(i2c); octeon_i2c_write() 312 if (result) octeon_i2c_write() 313 return result; octeon_i2c_write() 327 result = octeon_i2c_wait(i2c); octeon_i2c_write() 328 if (result) octeon_i2c_write() 329 return result; octeon_i2c_write() 349 int i, result; octeon_i2c_read() local 355 result = octeon_i2c_start(i2c); octeon_i2c_read() 356 if (result) octeon_i2c_read() 357 return result; octeon_i2c_read() 362 result = octeon_i2c_wait(i2c); octeon_i2c_read() 363 if (result) octeon_i2c_read() 364 return result; octeon_i2c_read() 382 result = octeon_i2c_wait(i2c); octeon_i2c_read() 383 if (result) octeon_i2c_read() 384 return result; octeon_i2c_read() 513 int irq, result = 0; octeon_i2c_probe() local 525 result = -ENOMEM; octeon_i2c_probe() 534 result = -ENXIO; octeon_i2c_probe() 551 result = -ENXIO; octeon_i2c_probe() 568 result = devm_request_irq(&pdev->dev, i2c->irq, octeon_i2c_probe() 570 if (result < 0) { octeon_i2c_probe() 575 result = octeon_i2c_initlowlevel(i2c); octeon_i2c_probe() 576 if (result) { octeon_i2c_probe() 581 result = octeon_i2c_setclock(i2c); octeon_i2c_probe() 582 if (result) { octeon_i2c_probe() 593 result = i2c_add_adapter(&i2c->adap); octeon_i2c_probe() 594 if (result < 0) { octeon_i2c_probe() 603 return result; octeon_i2c_probe()
|
/linux-4.1.27/arch/mips/cavium-octeon/executive/ |
H A D | cvmx-helper-board.c | 61 * port. A result of -1 means there isn't a MII capable PHY 227 cvmx_helper_link_info_t result; __cvmx_helper_board_link_get() local 236 result.u64 = 0; __cvmx_helper_board_link_get() 245 result.s.link_up = 1; __cvmx_helper_board_link_get() 246 result.s.full_duplex = 1; __cvmx_helper_board_link_get() 247 result.s.speed = 1000; __cvmx_helper_board_link_get() 248 return result; __cvmx_helper_board_link_get() 255 result.s.link_up = 1; __cvmx_helper_board_link_get() 256 result.s.full_duplex = 1; __cvmx_helper_board_link_get() 257 result.s.speed = 1000; __cvmx_helper_board_link_get() 258 return result; __cvmx_helper_board_link_get() 265 result.s.link_up = 1; __cvmx_helper_board_link_get() 266 result.s.full_duplex = 1; __cvmx_helper_board_link_get() 267 result.s.speed = 1000; __cvmx_helper_board_link_get() 268 return result; __cvmx_helper_board_link_get() 276 result.u64 = 0; __cvmx_helper_board_link_get() 277 return result; __cvmx_helper_board_link_get() 280 result.s.link_up = 1; __cvmx_helper_board_link_get() 281 result.s.full_duplex = 1; __cvmx_helper_board_link_get() 282 result.s.speed = 1000; __cvmx_helper_board_link_get() 283 return result; __cvmx_helper_board_link_get() 289 result.s.link_up = 1; __cvmx_helper_board_link_get() 290 result.s.full_duplex = 1; __cvmx_helper_board_link_get() 291 result.s.speed = 1000; __cvmx_helper_board_link_get() 292 return result; __cvmx_helper_board_link_get() 313 result.u64 = 0; __cvmx_helper_board_link_get() 316 result.s.link_up = 1; __cvmx_helper_board_link_get() 317 result.s.full_duplex = 0; __cvmx_helper_board_link_get() 318 result.s.speed = 10; __cvmx_helper_board_link_get() 321 result.s.link_up = 1; __cvmx_helper_board_link_get() 322 result.s.full_duplex = 1; __cvmx_helper_board_link_get() 323 result.s.speed = 10; __cvmx_helper_board_link_get() 326 result.s.link_up = 1; __cvmx_helper_board_link_get() 327 result.s.full_duplex = 0; __cvmx_helper_board_link_get() 328 result.s.speed = 100; __cvmx_helper_board_link_get() 331 result.s.link_up = 1; __cvmx_helper_board_link_get() 332 result.s.full_duplex = 1; __cvmx_helper_board_link_get() 333 result.s.speed = 100; __cvmx_helper_board_link_get() 336 result.s.link_up = 1; __cvmx_helper_board_link_get() 337 result.s.full_duplex = 1; __cvmx_helper_board_link_get() 338 result.s.speed = 100; __cvmx_helper_board_link_get() 341 result.s.link_up = 1; __cvmx_helper_board_link_get() 342 result.s.full_duplex = 0; __cvmx_helper_board_link_get() 343 result.s.speed = 1000; __cvmx_helper_board_link_get() 346 result.s.link_up = 1; __cvmx_helper_board_link_get() 347 result.s.full_duplex = 1; __cvmx_helper_board_link_get() 348 result.s.speed = 1000; __cvmx_helper_board_link_get() 383 result.s.link_up = 1; __cvmx_helper_board_link_get() 384 result.s.full_duplex = ((phy_status >> 13) & 1); __cvmx_helper_board_link_get() 387 result.s.speed = 10; __cvmx_helper_board_link_get() 390 result.s.speed = 100; __cvmx_helper_board_link_get() 393 result.s.speed = 1000; __cvmx_helper_board_link_get() 396 result.u64 = 0; __cvmx_helper_board_link_get() 417 result.s.link_up = inband_status.s.status; __cvmx_helper_board_link_get() 418 result.s.full_duplex = inband_status.s.duplex; __cvmx_helper_board_link_get() 421 result.s.speed = 10; __cvmx_helper_board_link_get() 424 result.s.speed = 100; __cvmx_helper_board_link_get() 427 result.s.speed = 1000; __cvmx_helper_board_link_get() 430 result.u64 = 0; __cvmx_helper_board_link_get() 440 result.u64 = 0; __cvmx_helper_board_link_get() 444 if (!result.s.link_up) __cvmx_helper_board_link_get() 445 result.u64 = 0; __cvmx_helper_board_link_get() 447 return result; __cvmx_helper_board_link_get()
|
H A D | cvmx-helper-spi.c | 137 * auto negotiation. The result of this function may not match 147 cvmx_helper_link_info_t result; __cvmx_helper_spi_link_get() local 150 result.u64 = 0; __cvmx_helper_spi_link_get() 154 result.s.link_up = 1; __cvmx_helper_spi_link_get() 155 result.s.full_duplex = 1; __cvmx_helper_spi_link_get() 156 result.s.speed = 10000; __cvmx_helper_spi_link_get() 160 result.s.link_up = inband.s.status; __cvmx_helper_spi_link_get() 161 result.s.full_duplex = inband.s.duplex; __cvmx_helper_spi_link_get() 164 result.s.speed = 10; __cvmx_helper_spi_link_get() 167 result.s.speed = 100; __cvmx_helper_spi_link_get() 170 result.s.speed = 1000; __cvmx_helper_spi_link_get() 173 result.s.speed = 0; __cvmx_helper_spi_link_get() 174 result.s.link_up = 0; __cvmx_helper_spi_link_get() 180 result.s.link_up = 1; __cvmx_helper_spi_link_get() 181 result.s.full_duplex = 1; __cvmx_helper_spi_link_get() 182 result.s.speed = 10000; __cvmx_helper_spi_link_get() 184 return result; __cvmx_helper_spi_link_get()
|
/linux-4.1.27/drivers/misc/altera-stapl/ |
H A D | altera-comp.c | 38 u32 result = SHORT_BITS; altera_bits_req() local 41 result = 1; altera_bits_req() 46 --result; altera_bits_req() 50 return result; altera_bits_req() 56 u32 result = 0; altera_read_packed() local 62 result |= (((databyte >> (CHAR_BITS - *bits_avail)) altera_read_packed() 66 result &= (0xffff >> (SHORT_BITS - (bits + shift))); altera_read_packed() 77 return result; altera_read_packed()
|
/linux-4.1.27/drivers/staging/lustre/lustre/lov/ |
H A D | lov_lock.c | 200 int result = 0; lov_sublock_lock() local 206 result = cl_lock_closure_build(env, child, closure); lov_sublock_lock() 207 if (result == 0) { lov_sublock_lock() 227 result = CLO_REPEAT; lov_sublock_lock() 234 result = PTR_ERR(subenv); lov_sublock_lock() 240 return result; lov_sublock_lock() 244 * Updates the result of a top-lock operation from a result of sub-lock 259 static int lov_subresult(int result, int rc) lov_subresult() argument 264 LASSERTF(result <= 0 || result == CLO_REPEAT || result == CLO_WAIT, lov_subresult() 265 "result = %d", result); lov_subresult() 271 result_rank = result < 0 ? 1 + CLO_REPEAT : result; lov_subresult() 275 result = rc; lov_subresult() 276 return result; lov_subresult() 290 int result = 0; lov_lock_sub_init() local 357 return result; lov_lock_sub_init() 455 int result; lov_lock_enqueue_wait() local 460 result = cl_lock_enqueue_wait(env, sublock, 0); lov_lock_enqueue_wait() 462 return result ?: CLO_REPEAT; lov_lock_enqueue_wait() 476 int result; lov_lock_enqueue_one() local 479 result = cl_enqueue_try(env, sublock, io, enqflags); lov_lock_enqueue_one() 483 result = cl_wait_try(env, sublock); lov_lock_enqueue_one() 484 if (result == CLO_REENQUEUED) lov_lock_enqueue_one() 485 result = CLO_WAIT; lov_lock_enqueue_one() 492 if ((result == CLO_WAIT) && (sublock->cll_state <= CLS_HELD) && lov_lock_enqueue_one() 494 result = 0; lov_lock_enqueue_one() 495 return result; lov_lock_enqueue_one() 506 int result; lov_sublock_fill() local 530 result = CLO_REPEAT; lov_sublock_fill() 532 result = PTR_ERR(sublock); lov_sublock_fill() 533 return result; lov_sublock_fill() 551 int result; lov_lock_enqueue() local 554 for (result = 0, minstate = CLS_FREEING, i = 0; i < lck->lls_nr; ++i) { lov_lock_enqueue() 567 LASSERT(i > 0 && result != 0); lov_lock_enqueue() 578 result = lov_sublock_fill(env, lock, io, lck, i); lov_lock_enqueue() 627 result = lov_subresult(result, rc); lov_lock_enqueue() 628 if (result != 0) lov_lock_enqueue() 632 return result ?: minstate >= CLS_ENQUEUED ? 0 : CLO_WAIT; lov_lock_enqueue() 641 int result; lov_lock_unuse() local 643 for (result = 0, i = 0; i < lck->lls_nr; ++i) { lov_lock_unuse() 670 result = lov_subresult(result, rc); lov_lock_unuse() 673 if (result == 0 && lck->lls_cancel_race) { lov_lock_unuse() 675 result = -ESTALE; lov_lock_unuse() 678 return result; lov_lock_unuse() 688 int result; lov_lock_cancel() local 690 for (result = 0, i = 0; i < lck->lls_nr; ++i) { lov_lock_cancel() 730 result = lov_subresult(result, rc); lov_lock_cancel() 733 if (result) lov_lock_cancel() 735 "lov_lock_cancel fails with %d.\n", result); lov_lock_cancel() 747 int result; lov_lock_wait() local 751 for (result = 0, minstate = CLS_FREEING, i = 0, reenqueued = 0; lov_lock_wait() 776 result = lov_subresult(result, rc); lov_lock_wait() 777 if (result != 0) lov_lock_wait() 782 if (result == 0 && reenqueued != 0) lov_lock_wait() 785 return result ?: minstate >= CLS_HELD ? 0 : CLO_WAIT; lov_lock_wait() 793 int result; lov_lock_use() local 798 for (result = 0, i = 0; i < lck->lls_nr; ++i) { lov_lock_use() 814 result = -ESTALE; lov_lock_use() 831 result = -ESTALE; lov_lock_use() 832 lov_sublock_release(env, lck, i, 1, result); lov_lock_use() 836 result = lov_subresult(result, rc); lov_lock_use() 837 if (result != 0) lov_lock_use() 849 LASSERT(result != 0); lov_lock_use() 850 result = -ESTALE; lov_lock_use() 853 return result; lov_lock_use() 887 result = 0; 907 int result; lov_lock_stripe_is_matching() local 919 result = 0; lov_lock_stripe_is_matching() 930 result = 1; lov_lock_stripe_is_matching() 934 if (result != 0) { lov_lock_stripe_is_matching() 942 result = lov_stripe_intersects(lsm, stripe, start, end, lov_lock_stripe_is_matching() 944 LASSERT(result); lov_lock_stripe_is_matching() 947 result = cl_lock_ext_match(child, subd); lov_lock_stripe_is_matching() 949 return result; lov_lock_stripe_is_matching() 968 int result; lov_lock_fits_into() local 982 result = cl_lock_ext_match(&lov->lls_orig, need); lov_lock_fits_into() 985 result = lov_lock_stripe_is_matching(env, lov_lock_fits_into() 995 result = 0; lov_lock_fits_into() 1005 result = cl_lock_ext_match(&lov->lls_orig, need); lov_lock_fits_into() 1009 result); lov_lock_fits_into() 1010 return result; lov_lock_fits_into() 1051 * top-lock, e.g., as a result of inode destruction. 1140 int result; lov_lock_init_raid0() local 1145 result = lov_lock_sub_init(env, lck, io); lov_lock_init_raid0() 1147 result = -ENOMEM; lov_lock_init_raid0() 1148 return result; lov_lock_init_raid0() 1175 int result = -ENOMEM; lov_lock_init_empty() local 1181 result = 0; lov_lock_init_empty() 1183 return result; lov_lock_init_empty()
|
/linux-4.1.27/drivers/usb/gadget/ |
H A D | u_os_desc.h | 86 int result; usb_ext_prop_put_name() local 89 result = utf8s_to_utf16s(name, strlen(name), UTF16_LITTLE_ENDIAN, usb_ext_prop_put_name() 91 if (result < 0) usb_ext_prop_put_name() 92 return result; usb_ext_prop_put_name() 109 int result; usb_ext_prop_put_unicode() local 111 result = utf8s_to_utf16s(string, data_len >> 1, UTF16_LITTLE_ENDIAN, usb_ext_prop_put_unicode() 114 if (result < 0) usb_ext_prop_put_unicode() 115 return result; usb_ext_prop_put_unicode()
|
/linux-4.1.27/drivers/usb/misc/ |
H A D | idmouse.c | 133 int result; idmouse_create_image() local 139 result = ftip_command(dev, FTIP_RELEASE, 0, 0); idmouse_create_image() 140 if (result < 0) idmouse_create_image() 142 result = ftip_command(dev, FTIP_BLINK, 1, 0); idmouse_create_image() 143 if (result < 0) idmouse_create_image() 148 result = ftip_command(dev, FTIP_ACQUIRE, 0, 0); idmouse_create_image() 149 if (result < 0) idmouse_create_image() 151 result = ftip_command(dev, FTIP_ACQUIRE, 0, 0); idmouse_create_image() 152 if (result < 0) idmouse_create_image() 157 result = ftip_command(dev, FTIP_RESET, 0, 0); idmouse_create_image() 158 if (result < 0) idmouse_create_image() 160 result = ftip_command(dev, FTIP_RESET, 0, 0); idmouse_create_image() 161 if (result < 0) idmouse_create_image() 166 result = usb_bulk_msg (dev->udev, idmouse_create_image() 170 if (result < 0) { idmouse_create_image() 175 result = -EAGAIN; idmouse_create_image() 180 result = -EINTR; idmouse_create_image() 204 return result; idmouse_create_image() 228 int result; idmouse_open() local 251 result = -EBUSY; idmouse_open() 256 result = usb_autopm_get_interface(interface); idmouse_open() 257 if (result) idmouse_open() 259 result = idmouse_create_image (dev); idmouse_open() 260 if (result) idmouse_open() 276 return result; idmouse_open() 317 int result; idmouse_read() local 328 result = simple_read_from_buffer(buffer, count, ppos, idmouse_read() 332 return result; idmouse_read() 342 int result; idmouse_probe() local 385 result = usb_register_dev(interface, &idmouse_class); idmouse_probe() 386 if (result) { idmouse_probe() 391 return result; idmouse_probe()
|
/linux-4.1.27/drivers/staging/i2o/ |
H A D | i2o_proc.c | 794 } *result; i2o_seq_show_ddm_table() local 799 result = kmalloc(sizeof(*result), GFP_KERNEL); i2o_seq_show_ddm_table() 800 if (!result) i2o_seq_show_ddm_table() 804 NULL, 0, result, sizeof(*result)); i2o_seq_show_ddm_table() 814 ddm_table = result->ddm_table[0]; i2o_seq_show_ddm_table() 816 for (i = 0; i < result->row_count; ddm_table = result->ddm_table[++i]) { i2o_seq_show_ddm_table() 840 kfree(result); i2o_seq_show_ddm_table() 898 i2o_driver_result_table *result; i2o_seq_show_drivers_stored() local 902 result = kmalloc(sizeof(i2o_driver_result_table), GFP_KERNEL); i2o_seq_show_drivers_stored() 903 if (result == NULL) i2o_seq_show_drivers_stored() 907 NULL, 0, result, sizeof(*result)); i2o_seq_show_drivers_stored() 912 kfree(result); i2o_seq_show_drivers_stored() 919 for (i = 0, dst = &result->dst[0]; i < result->row_count; i2o_seq_show_drivers_stored() 920 dst = &result->dst[++i]) { i2o_seq_show_drivers_stored() 944 kfree(result); i2o_seq_show_drivers_stored() 973 } *result; i2o_seq_show_groups() local 975 result = kmalloc(sizeof(*result), GFP_KERNEL); i2o_seq_show_groups() 976 if (!result) i2o_seq_show_groups() 980 result, sizeof(*result)); i2o_seq_show_groups() 990 for (i = 0; i < result->row_count; i++) { i2o_seq_show_groups() 992 seq_printf(seq, "0x%04X ", result->group[i].group_number); i2o_seq_show_groups() 993 seq_printf(seq, "%10d ", result->group[i].field_count); i2o_seq_show_groups() 994 seq_printf(seq, "%8d ", result->group[i].row_count); i2o_seq_show_groups() 996 properties = result->group[i].properties; i2o_seq_show_groups() 1017 if (result->more_flag) i2o_seq_show_groups() 1020 kfree(result); i2o_seq_show_groups() 1040 } result; i2o_seq_show_phys_device() local 1043 &result, sizeof(result)); i2o_seq_show_phys_device() 1051 if (result.row_count) i2o_seq_show_phys_device() 1054 for (i = 0; i < result.row_count; i++) { i2o_seq_show_phys_device() 1056 seq_printf(seq, "%#7x\n", result.adapter_id[i]); i2o_seq_show_phys_device() 1059 if (result.more_flag) i2o_seq_show_phys_device() 1081 } result; i2o_seq_show_claimed() local 1084 &result, sizeof(result)); i2o_seq_show_claimed() 1091 if (result.row_count) i2o_seq_show_claimed() 1094 for (i = 0; i < result.row_count; i++) { i2o_seq_show_claimed() 1096 seq_printf(seq, "%#7x\n", result.claimed_tid[i]); i2o_seq_show_claimed() 1099 if (result.more_flag) i2o_seq_show_claimed() 1129 } *result; i2o_seq_show_users() local 1131 result = kmalloc(sizeof(*result), GFP_KERNEL); i2o_seq_show_users() 1132 if (!result) i2o_seq_show_users() 1136 result, sizeof(*result)); i2o_seq_show_users() 1145 for (i = 0; i < result->row_count; i++) { i2o_seq_show_users() 1147 seq_printf(seq, "%#8x ", result->user[i].instance); i2o_seq_show_users() 1148 seq_printf(seq, "%#7x ", result->user[i].user_tid); i2o_seq_show_users() 1149 seq_printf(seq, "%#9x\n", result->user[i].claim_type); i2o_seq_show_users() 1152 if (result->more_flag) i2o_seq_show_users() 1155 kfree(result); i2o_seq_show_users() 1181 } result; i2o_seq_show_priv_msgs() local 1184 &result, sizeof(result)); i2o_seq_show_priv_msgs() 1194 for (i = 0; i < result.row_count; i++) { i2o_seq_show_priv_msgs() 1195 seq_printf(seq, "%0#9x ", result.extension[i].ext_instance); i2o_seq_show_priv_msgs() 1196 seq_printf(seq, "%0#6x ", result.extension[i].organization_id); i2o_seq_show_priv_msgs() 1197 seq_printf(seq, "%0#6x", result.extension[i].x_function_code); i2o_seq_show_priv_msgs() 1202 if (result.more_flag) i2o_seq_show_priv_msgs() 1224 } result; i2o_seq_show_authorized_users() local 1227 &result, sizeof(result)); i2o_seq_show_authorized_users() 1235 if (result.row_count) i2o_seq_show_authorized_users() 1238 for (i = 0; i < result.row_count; i++) { i2o_seq_show_authorized_users() 1240 seq_printf(seq, "%#7x ", result.alternate_tid[i]); i2o_seq_show_authorized_users() 1243 if (result.more_flag) i2o_seq_show_authorized_users() 1311 } result; i2o_seq_show_ddm_identity() local 1315 token = i2o_parm_field_get(d, 0xF101, -1, &result, sizeof(result)); i2o_seq_show_ddm_identity() 1322 seq_printf(seq, "Registering DDM TID : 0x%03x\n", result.ddm_tid); i2o_seq_show_ddm_identity() 1324 chtostr(tmp, result.module_name, 24)); i2o_seq_show_ddm_identity() 1326 chtostr(tmp, result.module_rev, 8)); i2o_seq_show_ddm_identity() 1329 print_serial_number(seq, result.serial_number, sizeof(result) - 36); i2o_seq_show_ddm_identity() 1348 } result; i2o_seq_show_uinfo() local 1352 token = i2o_parm_field_get(d, 0xF102, -1, &result, sizeof(result)); i2o_seq_show_uinfo() 1360 chtostr(tmp, result.device_name, 64)); i2o_seq_show_uinfo() 1362 chtostr(tmp, result.service_name, 64)); i2o_seq_show_uinfo() 1364 chtostr(tmp, result.physical_location, 64)); i2o_seq_show_uinfo() 1366 chtostr(tmp, result.instance_number, 4)); i2o_seq_show_uinfo() 1449 } result; i2o_seq_show_sensors() local 1451 token = i2o_parm_field_get(d, 0xF200, -1, &result, sizeof(result)); i2o_seq_show_sensors() 1459 seq_printf(seq, "Sensor instance : %d\n", result.sensor_instance); i2o_seq_show_sensors() 1461 seq_printf(seq, "Component : %d = ", result.component); i2o_seq_show_sensors() 1462 switch (result.component) { i2o_seq_show_sensors() 1488 result.component_instance); i2o_seq_show_sensors() 1490 result.sensor_class ? "Analog" : "Digital"); i2o_seq_show_sensors() 1492 seq_printf(seq, "Sensor type : %d = ", result.sensor_type); i2o_seq_show_sensors() 1493 switch (result.sensor_type) { i2o_seq_show_sensors() 1521 result.scaling_exponent); i2o_seq_show_sensors() 1522 seq_printf(seq, "Actual reading : %d\n", result.actual_reading); i2o_seq_show_sensors() 1523 seq_printf(seq, "Minimum reading : %d\n", result.minimum_reading); i2o_seq_show_sensors() 1525 result.low2lowcat_treshold); i2o_seq_show_sensors() 1527 result.lowcat2low_treshold); i2o_seq_show_sensors() 1529 result.lowwarn2low_treshold); i2o_seq_show_sensors() 1531 result.low2lowwarn_treshold); i2o_seq_show_sensors() 1533 result.norm2lowwarn_treshold); i2o_seq_show_sensors() 1535 result.lowwarn2norm_treshold); i2o_seq_show_sensors() 1536 seq_printf(seq, "Nominal reading : %d\n", result.nominal_reading); i2o_seq_show_sensors() 1538 result.hiwarn2norm_treshold); i2o_seq_show_sensors() 1540 result.norm2hiwarn_treshold); i2o_seq_show_sensors() 1542 result.high2hiwarn_treshold); i2o_seq_show_sensors() 1544 result.hiwarn2high_treshold); i2o_seq_show_sensors() 1546 result.hicat2high_treshold); i2o_seq_show_sensors() 1548 result.hi2hicat_treshold); i2o_seq_show_sensors() 1549 seq_printf(seq, "Maximum reading : %d\n", result.maximum_reading); i2o_seq_show_sensors() 1551 seq_printf(seq, "Sensor state : %d = ", result.sensor_state); i2o_seq_show_sensors() 1552 switch (result.sensor_state) { i2o_seq_show_sensors() 1582 seq_printf(seq, "Event_enable : 0x%02X\n", result.event_enable); i2o_seq_show_sensors() 1584 (result.event_enable & 0x01) ? "+" : "-"); i2o_seq_show_sensors() 1586 (result.event_enable & 0x02) ? "+" : "-"); i2o_seq_show_sensors() 1588 (result.event_enable & 0x04) ? "+" : "-"); i2o_seq_show_sensors() 1590 (result.event_enable & 0x08) ? "+" : "-"); i2o_seq_show_sensors() 1593 (result.event_enable & 0x10) ? "+" : "-"); i2o_seq_show_sensors() 1595 (result.event_enable & 0x20) ? "+" : "-"); i2o_seq_show_sensors() 1597 (result.event_enable & 0x40) ? "+" : "-"); i2o_seq_show_sensors() 1599 (result.event_enable & 0x80) ? "+" : "-"); i2o_seq_show_sensors()
|
/linux-4.1.27/drivers/staging/lustre/lustre/llite/ |
H A D | llite_mmap.c | 176 int result; ll_page_mkwrite0() local 185 result = PTR_ERR(io); ll_page_mkwrite0() 189 result = io->ci_result; ll_page_mkwrite0() 190 if (result < 0) ll_page_mkwrite0() 209 result = cl_io_loop(env, io); ll_page_mkwrite0() 215 if (result == 0) { ll_page_mkwrite0() 226 if (result == 0) ll_page_mkwrite0() 227 result = -ENODATA; ll_page_mkwrite0() 241 result = -EAGAIN; ll_page_mkwrite0() 244 if (result == 0) { ll_page_mkwrite0() 255 CDEBUG(D_MMAP, "%s mkwrite with %d\n", current->comm, result); ll_page_mkwrite0() 256 LASSERT(ergo(result == 0, PageLocked(vmpage))); ll_page_mkwrite0() 258 return result; ll_page_mkwrite0() 263 static inline int to_fault_error(int result) to_fault_error() argument 265 switch (result) { to_fault_error() 267 result = VM_FAULT_LOCKED; to_fault_error() 270 result = VM_FAULT_NOPAGE; to_fault_error() 273 result = VM_FAULT_OOM; to_fault_error() 276 result = VM_FAULT_SIGBUS; to_fault_error() 279 return result; to_fault_error() 301 int result; ll_fault0() local 308 result = io->ci_result; ll_fault0() 309 if (result == 0) { ll_fault0() 317 result = cl_io_loop(env, io); ll_fault0() 325 if (result != 0 && vmpage != NULL) { ll_fault0() 334 if (result != 0 && !(fault_ret & VM_FAULT_RETRY)) ll_fault0() 335 fault_ret |= to_fault_error(result); ll_fault0() 338 current->comm, fault_ret, result); ll_fault0() 346 int result; ll_fault() local 355 result = ll_fault0(vma, vmf); ll_fault() 356 LASSERT(!(result & VM_FAULT_LOCKED)); ll_fault() 357 if (result == 0) { ll_fault() 376 result = VM_FAULT_LOCKED; ll_fault() 379 return result; ll_fault() 387 int result; ll_page_mkwrite() local 391 result = ll_page_mkwrite0(vma, vmf->page, &retry); ll_page_mkwrite() 401 switch (result) { ll_page_mkwrite() 404 result = VM_FAULT_LOCKED; ll_page_mkwrite() 408 result = VM_FAULT_NOPAGE; ll_page_mkwrite() 411 result = VM_FAULT_OOM; ll_page_mkwrite() 414 result = VM_FAULT_RETRY; ll_page_mkwrite() 417 result = VM_FAULT_SIGBUS; ll_page_mkwrite() 421 return result; ll_page_mkwrite()
|
H A D | vvp_io.c | 215 int result; vvp_mmap_locks() local 266 result = cl_io_lock_alloc_add(env, io, descr); vvp_mmap_locks() 272 if (result < 0) { vvp_mmap_locks() 274 return result; vvp_mmap_locks() 292 int result; vvp_io_rw_lock() local 301 result = vvp_mmap_locks(env, cio, io); vvp_io_rw_lock() 302 if (result == 0) vvp_io_rw_lock() 303 result = ccc_io_one_lock(env, io, ast_flags, mode, start, end); vvp_io_rw_lock() 304 return result; vvp_io_rw_lock() 312 int result; vvp_io_read_lock() local 314 result = vvp_io_rw_lock(env, io, CLM_READ, rd->crw_pos, vvp_io_read_lock() 317 return result; vvp_io_read_lock() 388 int result; vvp_do_vmtruncate() local 393 result = inode_newsize_ok(inode, size); vvp_do_vmtruncate() 394 if (result < 0) { vvp_do_vmtruncate() 396 return result; vvp_do_vmtruncate() 400 return result; vvp_do_vmtruncate() 417 int result; vvp_io_setattr_time() local 430 result = cl_object_attr_set(env, obj, attr, valid); vvp_io_setattr_time() 433 return result; vvp_io_setattr_time() 441 int result = 0; vvp_io_setattr_start() local 445 result = vvp_io_setattr_trunc(env, ios, inode, vvp_io_setattr_start() 447 if (result == 0) vvp_io_setattr_start() 448 result = vvp_io_setattr_time(env, ios); vvp_io_setattr_start() 449 return result; vvp_io_setattr_start() 484 int result; vvp_io_read_start() local 497 result = ccc_prep_size(env, obj, io, pos, tot, &exceed); vvp_io_read_start() 498 if (result != 0) vvp_io_read_start() 499 return result; vvp_io_read_start() 526 result = generic_file_read_iter(cio->cui_iocb, cio->cui_iter); vvp_io_read_start() 529 result = generic_file_splice_read(file, &pos, vvp_io_read_start() 543 if (result >= 0) { vvp_io_read_start() 544 if (result < cnt) vvp_io_read_start() 546 io->ci_nob += result; vvp_io_read_start() 548 cio->cui_fd, pos, result, READ); vvp_io_read_start() local 549 result = 0; vvp_io_read_start() 551 return result; vvp_io_read_start() 572 ssize_t result = 0; vvp_io_write_start() local 593 result = 0; vvp_io_write_start() 595 result = generic_file_write_iter(cio->cui_iocb, cio->cui_iter); vvp_io_write_start() 597 if (result > 0) { vvp_io_write_start() 598 if (result < cnt) vvp_io_write_start() 600 io->ci_nob += result; vvp_io_write_start() 602 cio->cui_fd, pos, result, WRITE); vvp_io_write_start() local 603 result = 0; vvp_io_write_start() 605 return result; vvp_io_write_start() 658 int result = 0; vvp_io_fault_start() local 673 result = ccc_prep_size(env, obj, io, 0, offset + 1, NULL); vvp_io_fault_start() 674 if (result != 0) vvp_io_fault_start() 675 return result; vvp_io_fault_start() 682 result = vvp_io_kernel_fault(cfio); vvp_io_fault_start() 683 if (result != 0) vvp_io_fault_start() 684 return result; vvp_io_fault_start() 702 result = +1; vvp_io_fault_start() 731 result = -ENODATA; vvp_io_fault_start() 738 result = PTR_ERR(page); vvp_io_fault_start() 758 result = cl_page_cache_add(env, io, page, CRT_WRITE); vvp_io_fault_start() 762 if (result < 0) { vvp_io_fault_start() 770 if (result == -EDQUOT) vvp_io_fault_start() 771 result = -ENOSPC; vvp_io_fault_start() 802 return result; vvp_io_fault_start() 870 int result; vvp_page_sync_io() local 877 result = cl_io_submit_sync(env, io, crt, queue, 0); vvp_page_sync_io() 888 return result; vvp_page_sync_io() 901 int result; vvp_io_prepare_partial() local 904 result = cl_object_attr_get(env, obj, attr); vvp_io_prepare_partial() 906 if (result == 0) { vvp_io_prepare_partial() 920 result = vvp_page_sync_io(env, io, pg, cp, CRT_READ); vvp_io_prepare_partial() 929 if (result == 0) vvp_io_prepare_partial() 932 return result; vvp_io_prepare_partial() 945 int result; vvp_io_prepare_write() local 950 result = 0; vvp_io_prepare_write() 962 result = vvp_io_prepare_partial(env, ios->cis_io, obj, vvp_io_prepare_write() 966 return result; vvp_io_prepare_write() 983 int result; vvp_io_commit_write() local 1015 result = cl_page_cache_add(env, io, pg, CRT_WRITE); vvp_io_commit_write() 1016 if (result == 0) { vvp_io_commit_write() 1020 } else if (result == -EDQUOT) { vvp_io_commit_write() 1048 result = vvp_page_sync_io(env, io, pg, cp, CRT_WRITE); vvp_io_commit_write() 1049 if (result) vvp_io_commit_write() 1051 pg->cp_index, inode, result); vvp_io_commit_write() 1055 result = 0; vvp_io_commit_write() 1067 if (result == 0) { vvp_io_commit_write() 1076 if (result == 0) { vvp_io_commit_write() 1089 return result; vvp_io_commit_write() 1139 int result; vvp_io_init() local 1152 result = 0; vvp_io_init() 1161 result = 1; vvp_io_init() 1186 if (result == 0 && !io->ci_ignore_layout) { vvp_io_init() 1187 result = ll_layout_refresh(inode, &cio->cui_layout_gen); vvp_io_init() 1188 if (result == -ENOENT) vvp_io_init() 1193 result = 0; vvp_io_init() 1194 if (result < 0) vvp_io_init() 1197 PFID(lu_object_fid(&obj->co_lu)), result); vvp_io_init() 1200 return result; vvp_io_init()
|
/linux-4.1.27/drivers/staging/unisys/common-spar/include/ |
H A D | iovmcall_gnuc.h | 21 unsigned long result = 0; __unisys_vmcall_gnuc() local 28 __asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) : __unisys_vmcall_gnuc() 30 return result; __unisys_vmcall_gnuc() 39 unsigned long result = 0; __unisys_extended_vmcall_gnuc() local 46 __asm__ __volatile__(".byte 0x00f, 0x001, 0x0c1" : "=a"(result) : __unisys_extended_vmcall_gnuc() 48 return result; __unisys_extended_vmcall_gnuc()
|
/linux-4.1.27/arch/alpha/include/asm/ |
H A D | local.h | 22 long temp, result; local_add_return() local 32 :"=&r" (temp), "=m" (l->a.counter), "=&r" (result) local_add_return() 34 return result; local_add_return() 39 long temp, result; local_sub_return() local 49 :"=&r" (temp), "=m" (l->a.counter), "=&r" (result) local_sub_return() 51 return result; local_sub_return()
|
/linux-4.1.27/include/asm-generic/bitops/ |
H A D | count_zeros.h | 23 * If the MSB of @x is set, the result is 0. 24 * If only the LSB of @x is set, then the result is BITS_PER_LONG-1. 25 * If @x is 0 then the result is COUNT_LEADING_ZEROS_0. 43 * If the LSB of @x is set, the result is 0. 44 * If only the MSB of @x is set, then the result is BITS_PER_LONG-1. 45 * If @x is 0 then the result is COUNT_TRAILING_ZEROS_0.
|
/linux-4.1.27/drivers/thermal/int340x_thermal/ |
H A D | int3400_thermal.c | 117 int result = 0; int3400_thermal_get_uuids() local 126 result = -EINVAL; int3400_thermal_get_uuids() 133 result = -EINVAL; int3400_thermal_get_uuids() 139 result = -EINVAL; int3400_thermal_get_uuids() 156 return result; int3400_thermal_get_uuids() 164 int result = 0; int3400_thermal_run_osc() local 180 result = -EPERM; int3400_thermal_run_osc() 182 result = -EPERM; int3400_thermal_run_osc() 185 return result; int3400_thermal_run_osc() 213 int result = 0; int3400_thermal_set_mode() local 227 result = int3400_thermal_run_osc(priv->adev->handle, int3400_thermal_set_mode() 231 return result; int3400_thermal_set_mode() 247 int result; int3400_thermal_probe() local 258 result = int3400_thermal_get_uuids(priv); int3400_thermal_probe() 259 if (result) int3400_thermal_probe() 262 result = acpi_parse_art(priv->adev->handle, &priv->art_count, int3400_thermal_probe() 264 if (result) int3400_thermal_probe() 267 result = acpi_parse_trt(priv->adev->handle, &priv->trt_count, int3400_thermal_probe() 269 if (result) int3400_thermal_probe() 282 result = PTR_ERR(priv->thermal); int3400_thermal_probe() 289 result = sysfs_create_group(&pdev->dev.kobj, &uuid_attribute_group); int3400_thermal_probe() 290 if (result) int3400_thermal_probe() 302 return result; int3400_thermal_probe()
|
/linux-4.1.27/include/trace/events/ |
H A D | scsi.h | 108 #define scsi_hostbyte_name(result) { result, #result } 128 #define scsi_driverbyte_name(result) { result, #result } 141 #define scsi_msgbyte_name(result) { result, #result } 172 #define scsi_statusbyte_name(result) { result, #result } 187 #define scsi_prot_op_name(result) { result, #result } 299 __field( int, result ) 313 __entry->result = cmd->result; 323 "prot_sgl=%u prot_op=%s cmnd=(%s %s raw=%s) result=(driver=" \ 331 show_driverbyte_name(((__entry->result) >> 24) & 0xff), 332 show_hostbyte_name(((__entry->result) >> 16) & 0xff), 333 show_msgbyte_name(((__entry->result) >> 8) & 0xff), 334 show_statusbyte_name(__entry->result & 0xff))
|
/linux-4.1.27/fs/xfs/ |
H A D | xfs_bit.c | 52 uint result = 0; xfs_contig_bits() local 66 result += NBWORD; xfs_contig_bits() 72 result += NBWORD; xfs_contig_bits() 75 return result - start_bit; xfs_contig_bits() 77 return result + ffz(tmp) - start_bit; xfs_contig_bits() 91 uint result = start_bit & ~(NBWORD - 1); xfs_next_bit() local 98 size -= result; xfs_next_bit() 106 result += NBWORD; xfs_next_bit() 112 result += NBWORD; xfs_next_bit() 117 return result + ffs(tmp) - 1; xfs_next_bit()
|
/linux-4.1.27/arch/sh/boards/mach-microdev/ |
H A D | io.c | 59 unsigned long result; microdev_ioport_map() local 66 result = IO_LAN91C111_PHYS + offset - IO_LAN91C111_BASE; microdev_ioport_map() 74 result = IO_SUPERIO_PHYS + (offset << 1); microdev_ioport_map() 83 result = IO_SUPERIO_PHYS + (offset << 1); microdev_ioport_map() 92 result = IO_SUPERIO_PHYS + (offset << 1); microdev_ioport_map() 100 result = IO_SUPERIO_PHYS + (offset << 1); microdev_ioport_map() 108 result = IO_SUPERIO_PHYS + (offset << 1); microdev_ioport_map() 114 result = IO_ISP1161_PHYS + offset - IO_ISP1161_BASE; microdev_ioport_map() 121 result = PVR; microdev_ioport_map() 124 return (void __iomem *)result; microdev_ioport_map()
|
/linux-4.1.27/arch/c6x/lib/ |
H A D | csum_64plus.S | 231 ; unsigned int result = 0; 238 ; result += (*buff << 8); 240 ; result = *buff; 248 ; result += *(unsigned short *) buff; 260 ; result += carry; 261 ; result += w; 262 ; carry = (w > result); 264 ; result += carry; 265 ; result = (result & 0xffff) + (result >> 16); 268 ; result += *(unsigned short *) buff; 274 ; result += *buff; 276 ; result += (*buff << 8); 278 ; result = (result & 0xffff) + (result >> 16); 280 ; result = (result & 0xffff) + (result >> 16); 282 ; result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); 284 ; return result; 387 ; unsigned int result = do_csum(buff, len); 390 ; result += sum; 391 ; if (sum > result) 392 ; result += 1; 393 ; return (__force __wsum)result;
|
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/ |
H A D | cl_io.c | 153 int result; cl_io_init0() local 165 result = 0; cl_object_for_each() 168 result = scan->co_ops->coo_io_init(env, scan, io); cl_object_for_each() 169 if (result != 0) cl_object_for_each() 173 if (result == 0) 175 return result; 381 int result; cl_lockset_lock_one() local 389 result = cl_wait(env, lock); cl_lockset_lock_one() 390 if (result == 0) cl_lockset_lock_one() 394 result = 0; cl_lockset_lock_one() 396 result = PTR_ERR(lock); cl_lockset_lock_one() 397 return result; cl_lockset_lock_one() 420 int result; cl_lockset_lock() local 422 result = 0; cl_lockset_lock() 427 result = cl_lockset_lock_one(env, io, set, link); cl_lockset_lock() 428 if (result != 0) cl_lockset_lock() 433 if (result == 0) { cl_lockset_lock() 437 result = cl_wait(env, lock); cl_lockset_lock() 438 if (result == 0) cl_lockset_lock() 445 return result; cl_lockset_lock() 458 int result = 0; cl_io_lock() local 467 result = scan->cis_iop->op[io->ci_type].cio_lock(env, scan); cl_io_for_each() 468 if (result != 0) cl_io_for_each() 471 if (result == 0) { 473 result = cl_lockset_lock(env, io, &io->ci_lockset); 475 if (result != 0) 479 return result; 528 int result; cl_io_iter_init() local 534 result = 0; cl_io_for_each() 538 result = scan->cis_iop->op[io->ci_type].cio_iter_init(env, cl_io_for_each() 540 if (result != 0) cl_io_for_each() 543 if (result == 0) 545 return result; 600 int result; cl_io_lock_add() local 603 result = +1; cl_io_lock_add() 606 result = 0; cl_io_lock_add() 608 return result; cl_io_lock_add() 625 int result; cl_io_lock_alloc_add() local 631 result = cl_io_lock_add(env, io, link); cl_io_lock_alloc_add() 632 if (result) /* lock match */ cl_io_lock_alloc_add() 635 result = -ENOMEM; cl_io_lock_alloc_add() 637 return result; cl_io_lock_alloc_add() 647 int result = 0; cl_io_start() local 657 result = scan->cis_iop->op[io->ci_type].cio_start(env, scan); cl_io_for_each() 658 if (result != 0) cl_io_for_each() 661 if (result >= 0) 662 result = 0; 663 return result; 703 int result = 1; cl_page_in_io() local 720 result = crw->crw_pos < end && cl_page_in_io() 725 result = io->u.ci_fault.ft_index == idx; cl_page_in_io() 730 return result; cl_page_in_io() 743 int result = 0; cl_io_read_page() local 757 * creation of new pages for read-ahead that might result in cache cl_io_read_page() 770 result = scan->cis_iop->cio_read_page(env, scan, slice); cl_io_for_each() 771 if (result != 0) cl_io_for_each() 775 if (result == 0) 776 result = cl_io_submit_rw(env, io, CRT_READ, queue); 782 return result; 795 int result = 0; cl_io_prepare_write() local 808 result = scan->cis_iop->cio_prepare_write(env, scan, cl_io_for_each_reverse() 811 if (result != 0) cl_io_for_each_reverse() 815 return result; 828 int result = 0; cl_io_commit_write() local 847 result = scan->cis_iop->cio_commit_write(env, scan, cl_io_for_each() 850 if (result != 0) cl_io_for_each() 854 LINVRNT(result <= 0); 855 return result; 873 int result = 0; cl_io_submit_rw() local 880 result = scan->cis_iop->req_op[crt].cio_submit(env, scan, crt, cl_io_for_each() 882 if (result != 0) cl_io_for_each() 888 LASSERT(ergo(result != 0, list_empty(&queue->c2_qout.pl_pages))); 889 return result; 943 int result = 0; cl_io_cancel() local 951 result = result ?: rc; cl_page_list_for_each() 953 return result; 978 int result = 0; cl_io_loop() local 986 result = cl_io_iter_init(env, io); cl_io_loop() 987 if (result == 0) { cl_io_loop() 989 result = cl_io_lock(env, io); cl_io_loop() 990 if (result == 0) { cl_io_loop() 998 result = cl_io_start(env, io); cl_io_loop() 1011 } while (result == 0 && io->ci_continue); cl_io_loop() 1012 if (result == 0) cl_io_loop() 1013 result = io->ci_result; cl_io_loop() 1014 return result < 0 ? result : 0; cl_io_loop() 1192 int result; cl_page_list_own() local 1196 result = 0; cl_page_list_for_each_safe() 1201 result = result ?: page->cp_error; cl_page_list_for_each_safe() 1205 return result; 1245 int result; cl_page_list_unmap() local 1248 result = 0; cl_page_list_for_each() 1250 result = cl_page_unmap(env, io, page); cl_page_list_for_each() 1251 if (result != 0) cl_page_list_for_each() 1254 return result; 1400 int result; cl_req_init() local 1402 result = 0; cl_req_init() 1408 result = dev->cd_ops->cdo_req_init(env, cl_req_init() 1410 if (result != 0) cl_req_init() 1415 } while (page != NULL && result == 0); cl_req_init() 1416 return result; cl_req_init() 1453 int result; cl_req_alloc() local 1462 result = cl_req_init(env, req, page); cl_req_alloc() 1464 result = -ENOMEM; cl_req_alloc() 1465 if (result != 0) { cl_req_alloc() 1466 cl_req_completion(env, req, result); cl_req_alloc() 1467 req = ERR_PTR(result); cl_req_alloc() 1535 int result; cl_req_prep() local 1545 result = 0; cl_req_prep() 1548 result = slice->crs_ops->cro_prep(env, slice); cl_req_prep() 1549 if (result != 0) cl_req_prep() 1553 return result; cl_req_prep()
|
H A D | cl_lock.c | 95 int result; cl_lock_invariant() local 97 result = atomic_read(&lock->cll_ref) > 0 && cl_lock_invariant() 99 if (!result && env != NULL) cl_lock_invariant() 101 return result; cl_lock_invariant() 686 * \post ergo(result == 0, cl_lock_is_mutexed(lock)) 692 int result; cl_lock_mutex_try() local 696 result = 0; cl_lock_mutex_try() 705 result = -EBUSY; cl_lock_mutex_try() 706 return result; cl_lock_mutex_try() 927 int result; cl_lock_state_wait() local 935 result = lock->cll_error; cl_lock_state_wait() 936 if (result == 0) { cl_lock_state_wait() 951 result = -ERESTARTSYS; cl_lock_state_wait() 955 result = 0; cl_lock_state_wait() 965 return result; cl_lock_state_wait() 1001 * as a result of an asynchronous event such as call-back reception. 1031 int result; cl_unuse_try_internal() local 1034 result = 0; cl_unuse_try_internal() 1040 result = -ENOSYS; cl_unuse_try_internal() 1044 result = slice->cls_ops->clo_unuse(env, slice); cl_unuse_try_internal() 1045 if (result != 0) cl_unuse_try_internal() 1049 LASSERT(result != -ENOSYS); cl_unuse_try_internal() 1050 } while (result == CLO_REPEAT); cl_unuse_try_internal() 1052 return result; cl_unuse_try_internal() 1064 int result; cl_use_try() local 1073 result = -ENOSYS; cl_use_try() 1077 result = slice->cls_ops->clo_use(env, slice); cl_use_try() 1078 if (result != 0) cl_use_try() 1082 LASSERT(result != -ENOSYS); cl_use_try() 1087 if (result == 0) { cl_use_try() 1090 if (result == -ESTALE) { cl_use_try() 1097 result = CLO_REPEAT; cl_use_try() 1105 if (rc < 0 && result > 0) cl_use_try() 1106 result = rc; cl_use_try() 1111 return result; cl_use_try() 1123 int result; cl_enqueue_kick() local 1126 result = -ENOSYS; cl_enqueue_kick() 1129 result = slice->cls_ops->clo_enqueue(env, cl_enqueue_kick() 1131 if (result != 0) cl_enqueue_kick() 1135 LASSERT(result != -ENOSYS); cl_enqueue_kick() 1136 return result; cl_enqueue_kick() 1146 * \post ergo(result == 0, lock->cll_state == CLS_ENQUEUED || 1155 int result; cl_enqueue_try() local 1161 result = lock->cll_error; cl_enqueue_try() 1162 if (result != 0) cl_enqueue_try() 1171 result = cl_enqueue_kick(env, lock, io, flags); cl_enqueue_try() 1174 if (result == 0 && lock->cll_state == CLS_QUEUING) cl_enqueue_try() 1179 result = CLO_WAIT; cl_enqueue_try() 1183 result = cl_use_try(env, lock, 0); cl_enqueue_try() 1187 result = 0; cl_enqueue_try() 1198 } while (result == CLO_REPEAT); cl_enqueue_try() 1199 return result; cl_enqueue_try() 1251 int result; cl_enqueue_locked() local 1259 result = cl_enqueue_try(env, lock, io, enqflags); cl_enqueue_locked() 1260 if (result == CLO_WAIT) { cl_enqueue_locked() 1262 result = cl_lock_enqueue_wait(env, lock, 1); cl_enqueue_locked() 1264 result = cl_lock_state_wait(env, lock); cl_enqueue_locked() 1265 if (result == 0) cl_enqueue_locked() 1270 if (result != 0) cl_enqueue_locked() 1272 LASSERT(ergo(result == 0 && !(enqflags & CEF_AGL), cl_enqueue_locked() 1275 return result; cl_enqueue_locked() 1283 * \post ergo(result == 0, lock->users increased) 1284 * \post ergo(result == 0, lock->cll_state == CLS_ENQUEUED || 1290 int result; cl_enqueue() local 1294 result = cl_enqueue_locked(env, lock, io, enqflags); cl_enqueue() 1296 if (result != 0) cl_enqueue() 1298 LASSERT(ergo(result == 0, lock->cll_state == CLS_ENQUEUED || cl_enqueue() 1300 return result; cl_enqueue() 1318 int result; cl_unuse_try() local 1343 result = cl_unuse_try_internal(env, lock); cl_unuse_try() 1345 LASSERT(result != CLO_WAIT); cl_unuse_try() 1347 if (result == 0 || result == -ESTALE) { cl_unuse_try() 1357 if (state == CLS_HELD && result == 0) cl_unuse_try() 1372 result = 0; cl_unuse_try() 1374 CERROR("result = %d, this is unlikely!\n", result); cl_unuse_try() 1378 return result ?: lock->cll_error; cl_unuse_try() 1384 int result; cl_unuse_locked() local 1386 result = cl_unuse_try(env, lock); cl_unuse_locked() 1387 if (result) cl_unuse_locked() 1388 CL_LOCK_DEBUG(D_ERROR, env, lock, "unuse return %d\n", result); cl_unuse_locked() 1416 int result; cl_wait_try() local 1430 result = lock->cll_error; cl_wait_try() 1431 if (result != 0) cl_wait_try() 1435 result = CLO_WAIT; cl_wait_try() 1443 result = -ENOSYS; cl_wait_try() 1446 result = slice->cls_ops->clo_wait(env, slice); cl_wait_try() 1447 if (result != 0) cl_wait_try() 1451 LASSERT(result != -ENOSYS); cl_wait_try() 1452 if (result == 0) { cl_wait_try() 1456 } while (result == CLO_REPEAT); cl_wait_try() 1457 return result; cl_wait_try() 1465 * \pre ergo(result == 0, lock->cll_state == CLS_ENQUEUED || 1468 * \post ergo(result == 0, lock->cll_state == CLS_HELD) 1472 int result; cl_wait() local 1482 result = cl_wait_try(env, lock); cl_wait() 1483 if (result == CLO_WAIT) { cl_wait() 1484 result = cl_lock_state_wait(env, lock); cl_wait() 1485 if (result == 0) cl_wait() 1490 if (result < 0) { cl_wait() 1496 LASSERT(ergo(result == 0, lock->cll_state == CLS_HELD)); cl_wait() 1497 return result; cl_wait() 1543 int result; cl_lock_modify() local 1553 result = slice->cls_ops->clo_modify(env, slice, desc); cl_lock_modify() 1554 if (result != 0) cl_lock_modify() 1555 return result; cl_lock_modify() 1605 int result; cl_lock_closure_build() local 1610 result = cl_lock_enclosure(env, lock, closure); cl_lock_closure_build() 1611 if (result == 0) { cl_lock_closure_build() 1614 result = slice->cls_ops->clo_closure(env, slice, cl_lock_closure_build() 1616 if (result != 0) cl_lock_closure_build() 1621 if (result != 0) cl_lock_closure_build() 1623 return result; cl_lock_closure_build() 1637 int result = 0; cl_lock_enclosure() local 1652 result = 0; cl_lock_enclosure() 1668 result = CLO_REPEAT; cl_lock_enclosure() 1670 return result; cl_lock_enclosure() 1932 int result; cl_lock_discard_pages() local 1938 result = cl_io_init(env, io, CIT_MISC, io->ci_obj); cl_lock_discard_pages() 1939 if (result != 0) cl_lock_discard_pages() 1956 return result; cl_lock_discard_pages()
|
/linux-4.1.27/drivers/misc/ibmasm/ |
H A D | module.c | 36 * Failure to do so would result in system reboot. 67 int result; ibmasm_init_one() local 70 if ((result = pci_enable_device(pdev))) { ibmasm_init_one() 72 return result; ibmasm_init_one() 74 if ((result = pci_request_regions(pdev, DRIVER_NAME))) { ibmasm_init_one() 84 result = -ENOMEM; ibmasm_init_one() 111 result = -ENODEV; ibmasm_init_one() 115 result = request_irq(sp->irq, ibmasm_interrupt_handler, IRQF_SHARED, sp->devname, (void*)sp); ibmasm_init_one() 116 if (result) { ibmasm_init_one() 123 result = ibmasm_init_remote_input_dev(sp); ibmasm_init_one() 124 if (result) { ibmasm_init_one() 129 result = ibmasm_send_driver_vpd(sp); ibmasm_init_one() 130 if (result) { ibmasm_init_one() 134 result = ibmasm_send_os_state(sp, SYSTEM_STATE_OS_UP); ibmasm_init_one() 135 if (result) { ibmasm_init_one() 162 return result; ibmasm_init_one() 212 int result = pci_register_driver(&ibmasm_driver); ibmasm_init() local 213 if (result) ibmasm_init() 214 return result; ibmasm_init() 216 result = ibmasmfs_register(); ibmasm_init() 217 if (result) { ibmasm_init() 220 return result; ibmasm_init()
|
/linux-4.1.27/arch/arm/include/asm/ |
H A D | atomic.h | 45 int result; \ 54 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \ 63 int result; \ 74 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \ 80 return result; \ 224 long long result; atomic64_read() local 228 : "=&r" (result) atomic64_read() 232 return result; atomic64_read() 246 long long result; atomic64_read() local 250 : "=&r" (result) atomic64_read() 254 return result; atomic64_read() 276 long long result; \ 287 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \ 295 long long result; \ 308 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \ 314 return result; \ 356 long long result; atomic64_xchg() local 367 : "=&r" (result), "=&r" (tmp), "+Qo" (ptr->counter) atomic64_xchg() 373 return result; atomic64_xchg() 378 long long result; atomic64_dec_if_positive() local 394 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) atomic64_dec_if_positive() 400 return result; atomic64_dec_if_positive()
|
/linux-4.1.27/drivers/acpi/pmic/ |
H A D | intel_pmic.c | 55 int reg, bit, result; intel_pmic_power_handler() local 63 result = pmic_get_reg_bit(address, d->power_table, intel_pmic_power_handler() 65 if (result == -ENOENT) intel_pmic_power_handler() 70 result = function == ACPI_READ ? intel_pmic_power_handler() 76 return result ? AE_ERROR : AE_OK; intel_pmic_power_handler() 173 int reg, result; intel_pmic_thermal_handler() local 178 result = pmic_get_reg_bit(address, d->thermal_table, intel_pmic_thermal_handler() 180 if (result == -ENOENT) intel_pmic_thermal_handler() 186 result = pmic_thermal_temp(opregion, reg, function, value64); intel_pmic_thermal_handler() 188 result = pmic_thermal_aux(opregion, reg, function, value64); intel_pmic_thermal_handler() 190 result = pmic_thermal_pen(opregion, reg, function, value64); intel_pmic_thermal_handler() 192 result = -EINVAL; intel_pmic_thermal_handler() 196 if (result < 0) { intel_pmic_thermal_handler() 197 if (result == -EINVAL) intel_pmic_thermal_handler()
|
/linux-4.1.27/arch/arm/mach-s3c24xx/include/mach/ |
H A D | io.h | 101 unsigned char result; \ 105 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \ 109 : "=r" (result) : "r" ((port))); \ 110 result; \ 140 unsigned short result; \ 145 : "=r" (result) \ 151 : "=r" (result) \ 157 : "=r" (result) \ 162 : "=r" (result) : "r" ((port))); \ 163 result; \ 181 unsigned long result; \ 185 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \ 189 : "=r" (result) : "r" ((port))); \ 190 result; \
|
/linux-4.1.27/drivers/media/usb/ttusb-dec/ |
H A D | ttusb_dec.c | 249 printk("%s - usb_commit_urb failed with result: %d\n", ttusb_dec_handle_irq() 270 int result, actual_len, i; ttusb_dec_send_command() local 279 if ((result = mutex_lock_interruptible(&dec->usb_mutex))) { ttusb_dec_send_command() 282 return result; ttusb_dec_send_command() 300 result = usb_bulk_msg(dec->udev, dec->command_pipe, b, ttusb_dec_send_command() 303 if (result) { ttusb_dec_send_command() 305 __func__, result); ttusb_dec_send_command() 308 return result; ttusb_dec_send_command() 311 result = usb_bulk_msg(dec->udev, dec->result_pipe, b, ttusb_dec_send_command() 314 if (result) { ttusb_dec_send_command() 315 printk("%s: result bulk message failed: error %d\n", ttusb_dec_send_command() 316 __func__, result); ttusb_dec_send_command() 319 return result; ttusb_dec_send_command() 322 printk("%s: result: ", __func__); ttusb_dec_send_command() 345 int result; ttusb_dec_get_stb_state() local 350 result = ttusb_dec_send_command(dec, 0x08, 0, NULL, &c_length, c); ttusb_dec_get_stb_state() 351 if (result) ttusb_dec_get_stb_state() 352 return result; ttusb_dec_get_stb_state() 861 int result = 0; ttusb_dec_set_interface() local 867 result = usb_set_interface(dec->udev, 0, 0); ttusb_dec_set_interface() 870 result = ttusb_dec_send_command(dec, 0x80, sizeof(b), ttusb_dec_set_interface() 872 if (result) ttusb_dec_set_interface() 873 return result; ttusb_dec_set_interface() 874 result = usb_set_interface(dec->udev, 0, 8); ttusb_dec_set_interface() 877 result = usb_set_interface(dec->udev, 0, 1); ttusb_dec_set_interface() 881 if (result) ttusb_dec_set_interface() 882 return result; ttusb_dec_set_interface() 892 int i, result; ttusb_dec_start_iso_xfer() local 907 if ((result = usb_submit_urb(dec->iso_urb[i], ttusb_dec_start_iso_xfer() 910 "error %d\n", __func__, i, result); ttusb_dec_start_iso_xfer() 918 return result; ttusb_dec_start_iso_xfer() 935 int result = 0; ttusb_dec_start_ts_feed() local 990 result = ttusb_dec_send_command(dec, 0x80, sizeof(b0), b0, NULL, NULL); ttusb_dec_start_ts_feed() 991 if (result) ttusb_dec_start_ts_feed() 992 return result; ttusb_dec_start_ts_feed() 1012 int result; ttusb_dec_start_sec_feed() local 1024 result = ttusb_dec_send_command(dec, 0x60, sizeof(b0), b0, ttusb_dec_start_sec_feed() 1027 if (!result) { ttusb_dec_start_sec_feed() 1050 return result; ttusb_dec_start_sec_feed() 1239 int result; ttusb_dec_init_usb() local 1270 result = ttusb_dec_alloc_iso_urbs(dec); ttusb_dec_init_usb() 1271 if (result) { ttusb_dec_init_usb() 1276 return result; ttusb_dec_init_usb() 1281 int i, j, actual_len, result, size, trans_count; ttusb_dec_boot_dsp() local 1299 result = request_firmware(&fw_entry, dec->firmware_name, &dec->udev->dev); ttusb_dec_boot_dsp() 1300 if (result) { ttusb_dec_boot_dsp() 1303 return result; ttusb_dec_boot_dsp() 1339 result = ttusb_dec_send_command(dec, 0x41, sizeof(b0), b0, NULL, NULL); ttusb_dec_boot_dsp() 1341 if (result) { ttusb_dec_boot_dsp() 1343 return result; ttusb_dec_boot_dsp() 1369 result = usb_bulk_msg(dec->udev, dec->command_pipe, b, ttusb_dec_boot_dsp() 1374 result = usb_bulk_msg(dec->udev, dec->command_pipe, b, ttusb_dec_boot_dsp() 1380 result = ttusb_dec_send_command(dec, 0x43, sizeof(b1), b1, NULL, NULL); ttusb_dec_boot_dsp() 1385 return result; ttusb_dec_boot_dsp() 1390 int result; ttusb_dec_init_stb() local 1395 result = ttusb_dec_get_stb_state(dec, &mode, &model, &version); ttusb_dec_init_stb() 1396 if (result) ttusb_dec_init_stb() 1397 return result; ttusb_dec_init_stb() 1409 result = ttusb_dec_boot_dsp(dec); ttusb_dec_init_stb() 1410 if (result) ttusb_dec_init_stb() 1411 return result; ttusb_dec_init_stb() 1442 int result; ttusb_dec_init_dvb() local 1446 if ((result = dvb_register_adapter(&dec->adapter, ttusb_dec_init_dvb() 1451 __func__, result); ttusb_dec_init_dvb() 1453 return result; ttusb_dec_init_dvb() 1465 if ((result = dvb_dmx_init(&dec->demux)) < 0) { ttusb_dec_init_dvb() 1467 result); ttusb_dec_init_dvb() 1471 return result; ttusb_dec_init_dvb() 1478 if ((result = dvb_dmxdev_init(&dec->dmxdev, &dec->adapter)) < 0) { ttusb_dec_init_dvb() 1480 __func__, result); ttusb_dec_init_dvb() 1485 return result; ttusb_dec_init_dvb() 1490 if ((result = dec->demux.dmx.add_frontend(&dec->demux.dmx, ttusb_dec_init_dvb() 1493 result); ttusb_dec_init_dvb() 1499 return result; ttusb_dec_init_dvb() 1502 if ((result = dec->demux.dmx.connect_frontend(&dec->demux.dmx, ttusb_dec_init_dvb() 1505 result); ttusb_dec_init_dvb() 1512 return result; ttusb_dec_init_dvb() 1625 int result; ttusb_dec_probe() local 1654 result = ttusb_dec_init_usb(dec); ttusb_dec_probe() 1655 if (result) ttusb_dec_probe() 1657 result = ttusb_dec_init_stb(dec); ttusb_dec_probe() 1658 if (result) ttusb_dec_probe() 1660 result = ttusb_dec_init_dvb(dec); ttusb_dec_probe() 1661 if (result) ttusb_dec_probe() 1705 return result; ttusb_dec_probe()
|
/linux-4.1.27/drivers/misc/vmw_vmci/ |
H A D | vmci_queue_pair.c | 84 * - VMCIQPB_CREATED_MEM: this state is the result when the queue pair 833 int result; qp_host_map_queues() local 854 result = VMCI_SUCCESS; qp_host_map_queues() 857 result = VMCI_ERROR_NO_MEM; qp_host_map_queues() 860 result = VMCI_SUCCESS; qp_host_map_queues() 863 return result; qp_host_map_queues() 972 int result; qp_guest_endpoint_create() local 997 result = vmci_resource_add(&entry->resource, qp_guest_endpoint_create() 1001 if ((result != VMCI_SUCCESS) || qp_guest_endpoint_create() 1004 handle.context, handle.resource, result); qp_guest_endpoint_create() 1035 int result; qp_alloc_hypercall() local 1057 result = qp_populate_ppn_set((u8 *)alloc_msg + sizeof(*alloc_msg), qp_alloc_hypercall() 1059 if (result == VMCI_SUCCESS) qp_alloc_hypercall() 1060 result = vmci_send_datagram(&alloc_msg->hdr); qp_alloc_hypercall() 1064 return result; qp_alloc_hypercall() 1109 int result; qp_detatch_guest_work() local 1122 result = VMCI_SUCCESS; qp_detatch_guest_work() 1125 result = qp_notify_peer_local(false, handle); qp_detatch_guest_work() 1134 result = qp_detatch_hypercall(handle); qp_detatch_guest_work() 1135 if (result < VMCI_SUCCESS) { qp_detatch_guest_work() 1147 return result; qp_detatch_guest_work() 1169 return result; qp_detatch_guest_work() 1192 int result; qp_alloc_guest_work() local 1206 result = VMCI_ERROR_UNAVAILABLE; qp_alloc_guest_work() 1216 result = VMCI_ERROR_QUEUEPAIR_MISMATCH; qp_alloc_guest_work() 1225 result = qp_notify_peer_local(true, *handle); qp_alloc_guest_work() 1226 if (result < VMCI_SUCCESS) qp_alloc_guest_work() 1234 result = VMCI_ERROR_ALREADY_EXISTS; qp_alloc_guest_work() 1241 result = VMCI_ERROR_NO_MEM; qp_alloc_guest_work() 1248 result = VMCI_ERROR_NO_MEM; qp_alloc_guest_work() 1257 result = VMCI_ERROR_NO_MEM; qp_alloc_guest_work() 1261 result = qp_alloc_ppn_set(my_produce_q, num_produce_pages, my_consume_q, qp_alloc_guest_work() 1264 if (result < VMCI_SUCCESS) { qp_alloc_guest_work() 1289 result = VMCI_ERROR_NO_ACCESS; qp_alloc_guest_work() 1294 result = VMCI_ERROR_NOT_FOUND; qp_alloc_guest_work() 1298 result = qp_alloc_hypercall(queue_pair_entry); qp_alloc_guest_work() 1299 if (result < VMCI_SUCCESS) { qp_alloc_guest_work() 1300 pr_warn("qp_alloc_hypercall result = %d\n", result); qp_alloc_guest_work() 1340 return result; qp_alloc_guest_work() 1345 return result; qp_alloc_guest_work() 1380 int result; qp_broker_create() local 1443 result = VMCI_ERROR_NO_MEM; qp_broker_create() 1448 result = VMCI_ERROR_NO_MEM; qp_broker_create() 1462 result = VMCI_ERROR_NO_MEM; qp_broker_create() 1475 result = qp_host_register_user_memory(page_store, qp_broker_create() 1478 if (result < VMCI_SUCCESS) qp_broker_create() 1498 result = vmci_resource_add(&entry->resource, qp_broker_create() 1501 if (result != VMCI_SUCCESS) { qp_broker_create() 1503 handle.context, handle.resource, result); qp_broker_create() 1526 return result; qp_broker_create() 1608 int result; qp_broker_attach() local 1721 result = qp_host_register_user_memory(page_store, qp_broker_attach() 1724 if (result < VMCI_SUCCESS) qp_broker_attach() 1725 return result; qp_broker_attach() 1746 result = qp_broker_attach() 1749 if (result < VMCI_SUCCESS) qp_broker_attach() 1796 int result; qp_broker_alloc() local 1828 result = qp_broker_alloc() 1834 result = qp_broker_alloc() 1846 return result; qp_broker_alloc() 1867 int result; qp_alloc_host_work() local 1878 result = qp_alloc_host_work() 1882 if (result == VMCI_SUCCESS) { qp_alloc_host_work() 1900 pr_devel("queue pair broker failed to alloc (result=%d)\n", qp_alloc_host_work() 1901 result); qp_alloc_host_work() 1904 return result; qp_alloc_host_work() 1947 int result; qp_detatch_host_work() local 1952 result = vmci_qp_broker_detach(handle, context); qp_detatch_host_work() 1955 return result; qp_detatch_host_work() 2049 int result; vmci_qp_broker_set_page_store() local 2069 result = VMCI_ERROR_NOT_FOUND; vmci_qp_broker_set_page_store() 2075 result = VMCI_ERROR_NOT_FOUND; vmci_qp_broker_set_page_store() 2088 result = VMCI_ERROR_QUEUEPAIR_NOTOWNER; vmci_qp_broker_set_page_store() 2094 result = VMCI_ERROR_UNAVAILABLE; vmci_qp_broker_set_page_store() 2098 result = qp_host_get_user_memory(produce_uva, consume_uva, vmci_qp_broker_set_page_store() 2100 if (result < VMCI_SUCCESS) vmci_qp_broker_set_page_store() 2103 result = qp_host_map_queues(entry->produce_q, entry->consume_q); vmci_qp_broker_set_page_store() 2104 if (result < VMCI_SUCCESS) { vmci_qp_broker_set_page_store() 2118 result = vmci_qp_broker_set_page_store() 2120 if (result < VMCI_SUCCESS) { vmci_qp_broker_set_page_store() 2127 result = VMCI_SUCCESS; vmci_qp_broker_set_page_store() 2130 return result; vmci_qp_broker_set_page_store() 2168 int result; vmci_qp_broker_detach() local 2180 result = VMCI_ERROR_NOT_FOUND; vmci_qp_broker_detach() 2188 result = VMCI_ERROR_NOT_FOUND; vmci_qp_broker_detach() 2193 result = VMCI_ERROR_QUEUEPAIR_NOTATTACHED; vmci_qp_broker_detach() 2223 result = vmci_qp_broker_detach() 2227 if (result < VMCI_SUCCESS) vmci_qp_broker_detach() 2228 pr_warn("Failed to unmap queue headers for queue pair (handle=0x%x:0x%x,result=%d)\n", vmci_qp_broker_detach() 2230 result); vmci_qp_broker_detach() 2286 result = VMCI_SUCCESS; vmci_qp_broker_detach() 2289 return result; vmci_qp_broker_detach() 2305 int result; vmci_qp_broker_map() local 2316 result = VMCI_ERROR_NOT_FOUND; vmci_qp_broker_map() 2324 result = VMCI_ERROR_NOT_FOUND; vmci_qp_broker_map() 2329 result = VMCI_ERROR_QUEUEPAIR_NOTATTACHED; vmci_qp_broker_map() 2334 result = VMCI_SUCCESS; vmci_qp_broker_map() 2344 result = vmci_qp_broker_map() 2349 if (result == VMCI_SUCCESS) { vmci_qp_broker_map() 2361 return result; vmci_qp_broker_map() 2373 int result; qp_save_headers() local 2388 result = qp_host_map_queues(entry->produce_q, entry->consume_q); qp_save_headers() 2389 if (result < VMCI_SUCCESS) qp_save_headers() 2390 return result; qp_save_headers() 2416 int result; vmci_qp_broker_unmap() local 2427 result = VMCI_ERROR_NOT_FOUND; vmci_qp_broker_unmap() 2435 result = VMCI_ERROR_NOT_FOUND; vmci_qp_broker_unmap() 2440 result = VMCI_ERROR_QUEUEPAIR_NOTATTACHED; vmci_qp_broker_unmap() 2448 result = qp_save_headers(entry); vmci_qp_broker_unmap() 2449 if (result < VMCI_SUCCESS) vmci_qp_broker_unmap() 2450 pr_warn("Failed to save queue headers for queue pair (handle=0x%x:0x%x,result=%d)\n", vmci_qp_broker_unmap() 2451 handle.context, handle.resource, result); vmci_qp_broker_unmap() 2473 result = VMCI_SUCCESS; vmci_qp_broker_unmap() 2477 return result; vmci_qp_broker_unmap() 2539 int result; qp_map_queue_headers() local 2542 result = qp_host_map_queues(produce_q, consume_q); qp_map_queue_headers() 2543 if (result < VMCI_SUCCESS) qp_map_queue_headers() 2563 int result; qp_get_queue_headers() local 2565 result = qp_map_queue_headers(qpair->produce_q, qpair->consume_q); qp_get_queue_headers() 2566 if (result == VMCI_SUCCESS) { qp_get_queue_headers() 2573 result = VMCI_SUCCESS; qp_get_queue_headers() 2576 return result; qp_get_queue_headers() 2639 ssize_t result; qp_enqueue_locked() local 2641 result = qp_map_queue_headers(produce_q, consume_q); qp_enqueue_locked() 2642 if (unlikely(result != VMCI_SUCCESS)) qp_enqueue_locked() 2643 return result; qp_enqueue_locked() 2657 result = memcpy_to_queue(produce_q, tail, buf, 0, written); qp_enqueue_locked() 2663 result = memcpy_to_queue(produce_q, tail, buf, 0, tmp); qp_enqueue_locked() 2664 if (result >= VMCI_SUCCESS) qp_enqueue_locked() 2665 result = memcpy_to_queue(produce_q, 0, buf, tmp, qp_enqueue_locked() 2669 if (result < VMCI_SUCCESS) qp_enqueue_locked() 2670 return result; qp_enqueue_locked() 2701 ssize_t result; qp_dequeue_locked() local 2703 result = qp_map_queue_headers(produce_q, consume_q); qp_dequeue_locked() 2704 if (unlikely(result != VMCI_SUCCESS)) qp_dequeue_locked() 2705 return result; qp_dequeue_locked() 2719 result = memcpy_from_queue(buf, 0, consume_q, head, read); qp_dequeue_locked() 2725 result = memcpy_from_queue(buf, 0, consume_q, head, tmp); qp_dequeue_locked() 2726 if (result >= VMCI_SUCCESS) qp_dequeue_locked() 2727 result = memcpy_from_queue(buf, tmp, consume_q, 0, qp_dequeue_locked() 2732 if (result < VMCI_SUCCESS) qp_dequeue_locked() 2733 return result; qp_dequeue_locked() 2864 int result; vmci_qpair_detach() local 2871 result = qp_detatch(old_qpair->handle, old_qpair->guest_endpoint); vmci_qpair_detach() 2889 return result; vmci_qpair_detach() 2908 int result; vmci_qpair_get_produce_indexes() local 2914 result = vmci_qpair_get_produce_indexes() 2916 if (result == VMCI_SUCCESS) vmci_qpair_get_produce_indexes() 2921 if (result == VMCI_SUCCESS && vmci_qpair_get_produce_indexes() 2926 return result; vmci_qpair_get_produce_indexes() 2945 int result; vmci_qpair_get_consume_indexes() local 2951 result = vmci_qpair_get_consume_indexes() 2953 if (result == VMCI_SUCCESS) vmci_qpair_get_consume_indexes() 2958 if (result == VMCI_SUCCESS && vmci_qpair_get_consume_indexes() 2963 return result; vmci_qpair_get_consume_indexes() 2980 s64 result; vmci_qpair_produce_free_space() local 2986 result = vmci_qpair_produce_free_space() 2988 if (result == VMCI_SUCCESS) vmci_qpair_produce_free_space() 2989 result = vmci_q_header_free_space(produce_q_header, vmci_qpair_produce_free_space() 2993 result = 0; vmci_qpair_produce_free_space() 2997 return result; vmci_qpair_produce_free_space() 3014 s64 result; vmci_qpair_consume_free_space() local 3020 result = vmci_qpair_consume_free_space() 3022 if (result == VMCI_SUCCESS) vmci_qpair_consume_free_space() 3023 result = vmci_q_header_free_space(consume_q_header, vmci_qpair_consume_free_space() 3027 result = 0; vmci_qpair_consume_free_space() 3031 return result; vmci_qpair_consume_free_space() 3049 s64 result; vmci_qpair_produce_buf_ready() local 3055 result = vmci_qpair_produce_buf_ready() 3057 if (result == VMCI_SUCCESS) vmci_qpair_produce_buf_ready() 3058 result = vmci_q_header_buf_ready(produce_q_header, vmci_qpair_produce_buf_ready() 3062 result = 0; vmci_qpair_produce_buf_ready() 3066 return result; vmci_qpair_produce_buf_ready() 3084 s64 result; vmci_qpair_consume_buf_ready() local 3090 result = vmci_qpair_consume_buf_ready() 3092 if (result == VMCI_SUCCESS) vmci_qpair_consume_buf_ready() 3093 result = vmci_q_header_buf_ready(consume_q_header, vmci_qpair_consume_buf_ready() 3097 result = 0; vmci_qpair_consume_buf_ready() 3101 return result; vmci_qpair_consume_buf_ready() 3120 ssize_t result; vmci_qpair_enqueue() local 3128 result = qp_enqueue_locked(qpair->produce_q, vmci_qpair_enqueue() 3134 if (result == VMCI_ERROR_QUEUEPAIR_NOT_READY && vmci_qpair_enqueue() 3136 result = VMCI_ERROR_WOULD_BLOCK; vmci_qpair_enqueue() 3138 } while (result == VMCI_ERROR_QUEUEPAIR_NOT_READY); vmci_qpair_enqueue() 3142 return result; vmci_qpair_enqueue() 3161 ssize_t result; vmci_qpair_dequeue() local 3169 result = qp_dequeue_locked(qpair->produce_q, vmci_qpair_dequeue() 3175 if (result == VMCI_ERROR_QUEUEPAIR_NOT_READY && vmci_qpair_dequeue() 3177 result = VMCI_ERROR_WOULD_BLOCK; vmci_qpair_dequeue() 3179 } while (result == VMCI_ERROR_QUEUEPAIR_NOT_READY); vmci_qpair_dequeue() 3183 return result; vmci_qpair_dequeue() 3203 ssize_t result; vmci_qpair_peek() local 3211 result = qp_dequeue_locked(qpair->produce_q, vmci_qpair_peek() 3217 if (result == VMCI_ERROR_QUEUEPAIR_NOT_READY && vmci_qpair_peek() 3219 result = VMCI_ERROR_WOULD_BLOCK; vmci_qpair_peek() 3221 } while (result == VMCI_ERROR_QUEUEPAIR_NOT_READY); vmci_qpair_peek() 3225 return result; vmci_qpair_peek() 3245 ssize_t result; vmci_qpair_enquev() local 3253 result = qp_enqueue_locked(qpair->produce_q, vmci_qpair_enquev() 3259 if (result == VMCI_ERROR_QUEUEPAIR_NOT_READY && vmci_qpair_enquev() 3261 result = VMCI_ERROR_WOULD_BLOCK; vmci_qpair_enquev() 3263 } while (result == VMCI_ERROR_QUEUEPAIR_NOT_READY); vmci_qpair_enquev() 3267 return result; vmci_qpair_enquev() 3287 ssize_t result; vmci_qpair_dequev() local 3295 result = qp_dequeue_locked(qpair->produce_q, vmci_qpair_dequev() 3302 if (result == VMCI_ERROR_QUEUEPAIR_NOT_READY && vmci_qpair_dequev() 3304 result = VMCI_ERROR_WOULD_BLOCK; vmci_qpair_dequev() 3306 } while (result == VMCI_ERROR_QUEUEPAIR_NOT_READY); vmci_qpair_dequev() 3310 return result; vmci_qpair_dequev() 3331 ssize_t result; vmci_qpair_peekv() local 3339 result = qp_dequeue_locked(qpair->produce_q, vmci_qpair_peekv() 3346 if (result == VMCI_ERROR_QUEUEPAIR_NOT_READY && vmci_qpair_peekv() 3348 result = VMCI_ERROR_WOULD_BLOCK; vmci_qpair_peekv() 3350 } while (result == VMCI_ERROR_QUEUEPAIR_NOT_READY); vmci_qpair_peekv() 3353 return result; vmci_qpair_peekv()
|
/linux-4.1.27/fs/nfs/ |
H A D | nfs3xdr.c | 266 dprintk("NFS: server cheating in pathname result: " decode_nfspath3() 570 * present in the encoded result, so start there. encode_sattr3() 1364 * NFSv3 result types are defined in section 3.3 of RFC 1813: 1384 struct nfs_fattr *result) nfs3_xdr_dec_getattr3res() 1394 error = decode_fattr3(xdr, result); nfs3_xdr_dec_getattr3res() 1421 struct nfs_fattr *result) nfs3_xdr_dec_setattr3res() 1429 error = decode_wcc_data(xdr, result); nfs3_xdr_dec_setattr3res() 1462 struct nfs3_diropres *result) nfs3_xdr_dec_lookup3res() 1472 error = decode_nfs_fh3(xdr, result->fh); nfs3_xdr_dec_lookup3res() 1475 error = decode_post_op_attr(xdr, result->fattr); nfs3_xdr_dec_lookup3res() 1478 error = decode_post_op_attr(xdr, result->dir_attr); nfs3_xdr_dec_lookup3res() 1482 error = decode_post_op_attr(xdr, result->dir_attr); nfs3_xdr_dec_lookup3res() 1509 struct nfs3_accessres *result) nfs3_xdr_dec_access3res() 1517 error = decode_post_op_attr(xdr, result->fattr); nfs3_xdr_dec_access3res() 1522 error = decode_uint32(xdr, &result->access); nfs3_xdr_dec_access3res() 1550 struct nfs_fattr *result) nfs3_xdr_dec_readlink3res() 1558 error = decode_post_op_attr(xdr, result); nfs3_xdr_dec_readlink3res() 1592 struct nfs_pgio_res *result) decode_read3resok() 1609 result->eof = eof; decode_read3resok() 1610 result->count = count; decode_read3resok() 1617 dprintk("NFS: server cheating in read result: " decode_read3resok() 1628 struct nfs_pgio_res *result) nfs3_xdr_dec_read3res() 1636 error = decode_post_op_attr(xdr, result->fattr); nfs3_xdr_dec_read3res() 1639 result->op_status = status; nfs3_xdr_dec_read3res() 1642 error = decode_read3resok(xdr, result); nfs3_xdr_dec_read3res() 1677 struct nfs_pgio_res *result) decode_write3resok() 1684 result->count = be32_to_cpup(p++); decode_write3resok() 1685 result->verf->committed = be32_to_cpup(p++); decode_write3resok() 1686 if (unlikely(result->verf->committed > NFS_FILE_SYNC)) decode_write3resok() 1688 if (decode_writeverf3(xdr, &result->verf->verifier)) decode_write3resok() 1690 return result->count; decode_write3resok() 1692 dprintk("NFS: bad stable_how value: %u\n", result->verf->committed); decode_write3resok() 1701 struct nfs_pgio_res *result) nfs3_xdr_dec_write3res() 1709 error = decode_wcc_data(xdr, result->fattr); nfs3_xdr_dec_write3res() 1712 result->op_status = status; nfs3_xdr_dec_write3res() 1715 error = decode_write3resok(xdr, result); nfs3_xdr_dec_write3res() 1743 struct nfs3_diropres *result) decode_create3resok() 1747 error = decode_post_op_fh3(xdr, result->fh); decode_create3resok() 1750 error = decode_post_op_attr(xdr, result->fattr); decode_create3resok() 1757 if (result->fh->size == 0) decode_create3resok() 1758 result->fattr->valid = 0; decode_create3resok() 1759 error = decode_wcc_data(xdr, result->dir_attr); decode_create3resok() 1766 struct nfs3_diropres *result) nfs3_xdr_dec_create3res() 1776 error = decode_create3resok(xdr, result); nfs3_xdr_dec_create3res() 1780 error = decode_wcc_data(xdr, result->dir_attr); nfs3_xdr_dec_create3res() 1806 struct nfs_removeres *result) nfs3_xdr_dec_remove3res() 1814 error = decode_wcc_data(xdr, result->dir_attr); nfs3_xdr_dec_remove3res() 1847 struct nfs_renameres *result) nfs3_xdr_dec_rename3res() 1855 error = decode_wcc_data(xdr, result->old_fattr); nfs3_xdr_dec_rename3res() 1858 error = decode_wcc_data(xdr, result->new_fattr); nfs3_xdr_dec_rename3res() 1890 struct nfs3_linkres *result) nfs3_xdr_dec_link3res() 1898 error = decode_post_op_attr(xdr, result->fattr); nfs3_xdr_dec_link3res() 1901 error = decode_wcc_data(xdr, result->dir_attr); nfs3_xdr_dec_link3res() 2056 struct nfs3_readdirres *result) decode_readdir3resok() 2060 error = decode_post_op_attr(xdr, result->dir_attr); decode_readdir3resok() 2063 /* XXX: do we need to check if result->verf != NULL ? */ decode_readdir3resok() 2064 error = decode_cookieverf3(xdr, result->verf); decode_readdir3resok() 2074 struct nfs3_readdirres *result) nfs3_xdr_dec_readdir3res() 2084 error = decode_readdir3resok(xdr, result); nfs3_xdr_dec_readdir3res() 2088 error = decode_post_op_attr(xdr, result->dir_attr); nfs3_xdr_dec_readdir3res() 2120 struct nfs_fsstat *result) decode_fsstat3resok() 2127 p = xdr_decode_size3(p, &result->tbytes); decode_fsstat3resok() 2128 p = xdr_decode_size3(p, &result->fbytes); decode_fsstat3resok() 2129 p = xdr_decode_size3(p, &result->abytes); decode_fsstat3resok() 2130 p = xdr_decode_size3(p, &result->tfiles); decode_fsstat3resok() 2131 p = xdr_decode_size3(p, &result->ffiles); decode_fsstat3resok() 2132 xdr_decode_size3(p, &result->afiles); decode_fsstat3resok() 2142 struct nfs_fsstat *result) nfs3_xdr_dec_fsstat3res() 2150 error = decode_post_op_attr(xdr, result->fattr); nfs3_xdr_dec_fsstat3res() 2155 error = decode_fsstat3resok(xdr, result); nfs3_xdr_dec_fsstat3res() 2191 struct nfs_fsinfo *result) decode_fsinfo3resok() 2198 result->rtmax = be32_to_cpup(p++); decode_fsinfo3resok() 2199 result->rtpref = be32_to_cpup(p++); decode_fsinfo3resok() 2200 result->rtmult = be32_to_cpup(p++); decode_fsinfo3resok() 2201 result->wtmax = be32_to_cpup(p++); decode_fsinfo3resok() 2202 result->wtpref = be32_to_cpup(p++); decode_fsinfo3resok() 2203 result->wtmult = be32_to_cpup(p++); decode_fsinfo3resok() 2204 result->dtpref = be32_to_cpup(p++); decode_fsinfo3resok() 2205 p = xdr_decode_size3(p, &result->maxfilesize); decode_fsinfo3resok() 2206 xdr_decode_nfstime3(p, &result->time_delta); decode_fsinfo3resok() 2209 result->lease_time = 0; decode_fsinfo3resok() 2218 struct nfs_fsinfo *result) nfs3_xdr_dec_fsinfo3res() 2226 error = decode_post_op_attr(xdr, result->fattr); nfs3_xdr_dec_fsinfo3res() 2231 error = decode_fsinfo3resok(xdr, result); nfs3_xdr_dec_fsinfo3res() 2263 struct nfs_pathconf *result) decode_pathconf3resok() 2270 result->max_link = be32_to_cpup(p++); decode_pathconf3resok() 2271 result->max_namelen = be32_to_cpup(p); decode_pathconf3resok() 2281 struct nfs_pathconf *result) nfs3_xdr_dec_pathconf3res() 2289 error = decode_post_op_attr(xdr, result->fattr); nfs3_xdr_dec_pathconf3res() 2294 error = decode_pathconf3resok(xdr, result); nfs3_xdr_dec_pathconf3res() 2322 struct nfs_commitres *result) nfs3_xdr_dec_commit3res() 2330 error = decode_wcc_data(xdr, result->fattr); nfs3_xdr_dec_commit3res() 2333 result->op_status = status; nfs3_xdr_dec_commit3res() 2336 error = decode_writeverf3(xdr, &result->verf->verifier); nfs3_xdr_dec_commit3res() 2346 struct nfs3_getaclres *result) decode_getacl3resok() 2353 error = decode_post_op_attr(xdr, result->fattr); decode_getacl3resok() 2356 error = decode_uint32(xdr, &result->mask); decode_getacl3resok() 2360 if (result->mask & ~(NFS_ACL|NFS_ACLCNT|NFS_DFACL|NFS_DFACLCNT)) decode_getacl3resok() 2366 if (result->mask & NFS_ACL) decode_getacl3resok() 2367 acl = &result->acl_access; decode_getacl3resok() 2369 if (result->mask & NFS_ACLCNT) decode_getacl3resok() 2370 aclcnt = &result->acl_access_count; decode_getacl3resok() 2376 if (result->mask & NFS_DFACL) decode_getacl3resok() 2377 acl = &result->acl_default; decode_getacl3resok() 2379 if (result->mask & NFS_DFACLCNT) decode_getacl3resok() 2380 aclcnt = &result->acl_default_count; decode_getacl3resok() 2391 struct nfs3_getaclres *result) nfs3_xdr_dec_getacl3res() 2401 error = decode_getacl3resok(xdr, result); nfs3_xdr_dec_getacl3res() 2410 struct nfs_fattr *result) nfs3_xdr_dec_setacl3res() 2420 error = decode_post_op_attr(xdr, result); nfs3_xdr_dec_setacl3res() 1382 nfs3_xdr_dec_getattr3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_fattr *result) nfs3_xdr_dec_getattr3res() argument 1419 nfs3_xdr_dec_setattr3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_fattr *result) nfs3_xdr_dec_setattr3res() argument 1460 nfs3_xdr_dec_lookup3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs3_diropres *result) nfs3_xdr_dec_lookup3res() argument 1507 nfs3_xdr_dec_access3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs3_accessres *result) nfs3_xdr_dec_access3res() argument 1548 nfs3_xdr_dec_readlink3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_fattr *result) nfs3_xdr_dec_readlink3res() argument 1591 decode_read3resok(struct xdr_stream *xdr, struct nfs_pgio_res *result) decode_read3resok() argument 1627 nfs3_xdr_dec_read3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_pgio_res *result) nfs3_xdr_dec_read3res() argument 1676 decode_write3resok(struct xdr_stream *xdr, struct nfs_pgio_res *result) decode_write3resok() argument 1700 nfs3_xdr_dec_write3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_pgio_res *result) nfs3_xdr_dec_write3res() argument 1742 decode_create3resok(struct xdr_stream *xdr, struct nfs3_diropres *result) decode_create3resok() argument 1764 nfs3_xdr_dec_create3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs3_diropres *result) nfs3_xdr_dec_create3res() argument 1804 nfs3_xdr_dec_remove3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_removeres *result) nfs3_xdr_dec_remove3res() argument 1845 nfs3_xdr_dec_rename3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_renameres *result) nfs3_xdr_dec_rename3res() argument 1889 nfs3_xdr_dec_link3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs3_linkres *result) nfs3_xdr_dec_link3res() argument 2055 decode_readdir3resok(struct xdr_stream *xdr, struct nfs3_readdirres *result) decode_readdir3resok() argument 2072 nfs3_xdr_dec_readdir3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs3_readdirres *result) nfs3_xdr_dec_readdir3res() argument 2119 decode_fsstat3resok(struct xdr_stream *xdr, struct nfs_fsstat *result) decode_fsstat3resok() argument 2140 nfs3_xdr_dec_fsstat3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_fsstat *result) nfs3_xdr_dec_fsstat3res() argument 2190 decode_fsinfo3resok(struct xdr_stream *xdr, struct nfs_fsinfo *result) decode_fsinfo3resok() argument 2216 nfs3_xdr_dec_fsinfo3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_fsinfo *result) nfs3_xdr_dec_fsinfo3res() argument 2262 decode_pathconf3resok(struct xdr_stream *xdr, struct nfs_pathconf *result) decode_pathconf3resok() argument 2279 nfs3_xdr_dec_pathconf3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_pathconf *result) nfs3_xdr_dec_pathconf3res() argument 2320 nfs3_xdr_dec_commit3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_commitres *result) nfs3_xdr_dec_commit3res() argument 2345 decode_getacl3resok(struct xdr_stream *xdr, struct nfs3_getaclres *result) decode_getacl3resok() argument 2389 nfs3_xdr_dec_getacl3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs3_getaclres *result) nfs3_xdr_dec_getacl3res() argument 2408 nfs3_xdr_dec_setacl3res(struct rpc_rqst *req, struct xdr_stream *xdr, struct nfs_fattr *result) nfs3_xdr_dec_setacl3res() argument
|
/linux-4.1.27/drivers/media/pci/mantis/ |
H A D | mantis_dvb.c | 150 int result = -1; mantis_dvb_init() local 154 result = dvb_register_adapter(&mantis->dvb_adapter, mantis_dvb_init() 160 if (result < 0) { mantis_dvb_init() 179 result = dvb_dmx_init(&mantis->demux); mantis_dvb_init() 180 if (result < 0) { mantis_dvb_init() 181 dprintk(MANTIS_ERROR, 1, "dvb_dmx_init failed, ERROR=%d", result); mantis_dvb_init() 191 result = dvb_dmxdev_init(&mantis->dmxdev, &mantis->dvb_adapter); mantis_dvb_init() 192 if (result < 0) { mantis_dvb_init() 194 dprintk(MANTIS_ERROR, 1, "dvb_dmxdev_init failed, ERROR=%d", result); mantis_dvb_init() 199 result = mantis->demux.dmx.add_frontend(&mantis->demux.dmx, &mantis->fe_hw); mantis_dvb_init() 200 if (result < 0) { mantis_dvb_init() 202 dprintk(MANTIS_ERROR, 1, "dvb_dmx_init failed, ERROR=%d", result); mantis_dvb_init() 207 result = mantis->demux.dmx.add_frontend(&mantis->demux.dmx, &mantis->fe_mem); mantis_dvb_init() 208 if (result < 0) { mantis_dvb_init() 209 dprintk(MANTIS_ERROR, 1, "dvb_dmx_init failed, ERROR=%d", result); mantis_dvb_init() 213 result = mantis->demux.dmx.connect_frontend(&mantis->demux.dmx, &mantis->fe_hw); mantis_dvb_init() 214 if (result < 0) { mantis_dvb_init() 215 dprintk(MANTIS_ERROR, 1, "dvb_dmx_init failed, ERROR=%d", result); mantis_dvb_init() 223 result = config->frontend_init(mantis, mantis->fe); mantis_dvb_init() 224 if (result < 0) { mantis_dvb_init() 270 return result; mantis_dvb_init()
|
/linux-4.1.27/drivers/staging/rtl8723au/hal/ |
H A D | HalDMOutSrc8723A_CE.c | 232 /* Adujst OFDM Ant_A according to IQK result */ odm_TXPowerTrackingCallback_ThermalMeter_92C() 273 /* Adjust CCK according to IQK result */ odm_TXPowerTrackingCallback_ThermalMeter_92C() 387 u8 result = 0x00; _PHY_PathA_IQK() local 426 result |= 0x01; _PHY_PathA_IQK() 428 return result; _PHY_PathA_IQK() 433 result |= 0x02; _PHY_PathA_IQK() 436 return result; _PHY_PathA_IQK() 442 u8 result = 0x00; _PHY_PathB_IQK() local 461 result |= 0x01; _PHY_PathB_IQK() 463 return result; _PHY_PathB_IQK() 468 result |= 0x02; _PHY_PathB_IQK() 471 return result; _PHY_PathB_IQK() 476 int result[][8], _PHY_PathAFillIQKMatrix() 492 X = result[final_candidate][0]; _PHY_PathAFillIQKMatrix() 500 Y = result[final_candidate][1]; _PHY_PathAFillIQKMatrix() 516 reg = result[final_candidate][2]; _PHY_PathAFillIQKMatrix() 519 reg = result[final_candidate][3] & 0x3F; _PHY_PathAFillIQKMatrix() 522 reg = (result[final_candidate][3] >> 6) & 0xF; _PHY_PathAFillIQKMatrix() 527 static void _PHY_PathBFillIQKMatrix(struct rtw_adapter *pAdapter, bool bIQKOK, int result[][8], u8 final_candidate, bool bTxOnly) _PHY_PathBFillIQKMatrix() argument 540 X = result[final_candidate][4]; _PHY_PathBFillIQKMatrix() 548 Y = result[final_candidate][5]; _PHY_PathBFillIQKMatrix() 562 reg = result[final_candidate][6]; _PHY_PathBFillIQKMatrix() 565 reg = result[final_candidate][7] & 0x3F; _PHY_PathBFillIQKMatrix() 568 reg = (result[final_candidate][7] >> 6) & 0xF; _PHY_PathBFillIQKMatrix() 666 static bool _PHY_SimularityCompare(struct rtw_adapter *pAdapter, int result[][8], u8 c1, u8 c2) _PHY_SimularityCompare() argument 681 diff = (result[c1][i] > result[c2][i]) ? (result[c1][i] - result[c2][i]) : (result[c2][i] - result[c1][i]); _PHY_SimularityCompare() 684 if (result[c1][i]+result[c1][i+1] == 0) _PHY_SimularityCompare() 686 else if (result[c2][i]+result[c2][i+1] == 0) _PHY_SimularityCompare() 700 result[3][j] = result[final_candidate[i]][j]; _PHY_SimularityCompare() 708 result[3][i] = result[c1][i]; _PHY_SimularityCompare() 713 result[3][i] = result[c1][i]; _PHY_SimularityCompare() 720 static void _PHY_IQCalibrate(struct rtw_adapter *pAdapter, int result[][8], u8 t, bool is2T) _PHY_IQCalibrate() argument 810 result[t][0] = (rtl8723au_read32(pAdapter, rTx_Power_Before_IQK_A)&0x3FF0000)>>16; _PHY_IQCalibrate() 811 result[t][1] = (rtl8723au_read32(pAdapter, rTx_Power_After_IQK_A)&0x3FF0000)>>16; _PHY_IQCalibrate() 812 result[t][2] = (rtl8723au_read32(pAdapter, rRx_Power_Before_IQK_A_2)&0x3FF0000)>>16; _PHY_IQCalibrate() 813 result[t][3] = (rtl8723au_read32(pAdapter, rRx_Power_After_IQK_A_2)&0x3FF0000)>>16; _PHY_IQCalibrate() 819 result[t][0] = (rtl8723au_read32(pAdapter, rTx_Power_Before_IQK_A)&0x3FF0000)>>16; _PHY_IQCalibrate() 820 result[t][1] = (rtl8723au_read32(pAdapter, rTx_Power_After_IQK_A)&0x3FF0000)>>16; _PHY_IQCalibrate() 838 result[t][4] = (rtl8723au_read32(pAdapter, rTx_Power_Before_IQK_B)&0x3FF0000)>>16; _PHY_IQCalibrate() 839 result[t][5] = (rtl8723au_read32(pAdapter, rTx_Power_After_IQK_B)&0x3FF0000)>>16; _PHY_IQCalibrate() 840 result[t][6] = (rtl8723au_read32(pAdapter, rRx_Power_Before_IQK_B_2)&0x3FF0000)>>16; _PHY_IQCalibrate() 841 result[t][7] = (rtl8723au_read32(pAdapter, rRx_Power_After_IQK_B_2)&0x3FF0000)>>16; _PHY_IQCalibrate() 846 result[t][4] = (rtl8723au_read32(pAdapter, rTx_Power_Before_IQK_B)&0x3FF0000)>>16; _PHY_IQCalibrate() 847 result[t][5] = (rtl8723au_read32(pAdapter, rTx_Power_After_IQK_B)&0x3FF0000)>>16; _PHY_IQCalibrate() 955 s32 result[4][8]; /* last is final result */ rtl8723a_phy_iq_calibrate() local 982 result[0][i] = 0; rtl8723a_phy_iq_calibrate() 983 result[1][i] = 0; rtl8723a_phy_iq_calibrate() 984 result[2][i] = 0; rtl8723a_phy_iq_calibrate() 985 result[3][i] = 0; rtl8723a_phy_iq_calibrate() 996 _PHY_IQCalibrate(pAdapter, result, i, true); rtl8723a_phy_iq_calibrate() 998 _PHY_IQCalibrate(pAdapter, result, i, false); rtl8723a_phy_iq_calibrate() 1001 is12simular = _PHY_SimularityCompare(pAdapter, result, 0, 1); rtl8723a_phy_iq_calibrate() 1009 is13simular = _PHY_SimularityCompare(pAdapter, result, 0, 2); rtl8723a_phy_iq_calibrate() 1015 is23simular = _PHY_SimularityCompare(pAdapter, result, 1, 2); rtl8723a_phy_iq_calibrate() 1020 RegTmp += result[3][i]; rtl8723a_phy_iq_calibrate() 1031 RegE94 = result[i][0]; rtl8723a_phy_iq_calibrate() 1032 RegE9C = result[i][1]; rtl8723a_phy_iq_calibrate() 1033 RegEA4 = result[i][2]; rtl8723a_phy_iq_calibrate() 1034 RegEAC = result[i][3]; rtl8723a_phy_iq_calibrate() 1035 RegEB4 = result[i][4]; rtl8723a_phy_iq_calibrate() 1036 RegEBC = result[i][5]; rtl8723a_phy_iq_calibrate() 1037 RegEC4 = result[i][6]; rtl8723a_phy_iq_calibrate() 1038 RegECC = result[i][7]; rtl8723a_phy_iq_calibrate() 1042 RegE94 = result[final_candidate][0]; rtl8723a_phy_iq_calibrate() 1044 RegE9C = result[final_candidate][1]; rtl8723a_phy_iq_calibrate() 1046 RegEA4 = result[final_candidate][2]; rtl8723a_phy_iq_calibrate() 1047 RegEAC = result[final_candidate][3]; rtl8723a_phy_iq_calibrate() 1048 RegEB4 = result[final_candidate][4]; rtl8723a_phy_iq_calibrate() 1050 RegEBC = result[final_candidate][5]; rtl8723a_phy_iq_calibrate() 1052 RegEC4 = result[final_candidate][6]; rtl8723a_phy_iq_calibrate() 1053 RegECC = result[final_candidate][7]; rtl8723a_phy_iq_calibrate() 1064 _PHY_PathAFillIQKMatrix(pAdapter, bPathAOK, result, final_candidate, (RegEA4 == 0)); rtl8723a_phy_iq_calibrate() 1068 _PHY_PathBFillIQKMatrix(pAdapter, bPathBOK, result, rtl8723a_phy_iq_calibrate() 474 _PHY_PathAFillIQKMatrix(struct rtw_adapter *pAdapter, bool bIQKOK, int result[][8], u8 final_candidate, bool bTxOnly ) _PHY_PathAFillIQKMatrix() argument
|
/linux-4.1.27/drivers/staging/unisys/include/ |
H A D | uisutils.h | 195 int result = VMCALL_SUCCESS; issue_vmcall_io_controlvm_addr() local 199 ISSUE_IO_VMCALL(VMCALL_IO_CONTROLVM_ADDR, physaddr, result); issue_vmcall_io_controlvm_addr() 200 if (VMCALL_SUCCESSFUL(result)) { issue_vmcall_io_controlvm_addr() 204 return result; issue_vmcall_io_controlvm_addr() 210 int result = VMCALL_SUCCESS; issue_vmcall_io_diag_addr() local 214 ISSUE_IO_VMCALL(VMCALL_IO_DIAG_ADDR, physaddr, result); issue_vmcall_io_diag_addr() 215 if (VMCALL_SUCCESSFUL(result)) issue_vmcall_io_diag_addr() 217 return result; issue_vmcall_io_diag_addr() 223 int result = VMCALL_SUCCESS; issue_vmcall_io_visorserial_addr() local 227 ISSUE_IO_VMCALL(VMCALL_IO_VISORSERIAL_ADDR, physaddr, result); issue_vmcall_io_visorserial_addr() 228 if (VMCALL_SUCCESSFUL(result)) issue_vmcall_io_visorserial_addr() 230 return result; issue_vmcall_io_visorserial_addr() 235 u64 result = VMCALL_SUCCESS; issue_vmcall_query_guest_virtual_time_offset() local 239 result); issue_vmcall_query_guest_virtual_time_offset() 240 return result; issue_vmcall_query_guest_virtual_time_offset() 253 int result = VMCALL_SUCCESS; issue_vmcall_update_physical_time() local 255 ISSUE_IO_VMCALL(VMCALL_UPDATE_PHYSICAL_TIME, adjustment, result); issue_vmcall_update_physical_time() 256 return result; issue_vmcall_update_physical_time() 264 int result = VMCALL_SUCCESS; issue_vmcall_channel_mismatch() local 282 ISSUE_IO_VMCALL(VMCALL_CHANNEL_VERSION_MISMATCH, physaddr, result); issue_vmcall_channel_mismatch() 283 return result; issue_vmcall_channel_mismatch()
|
/linux-4.1.27/drivers/staging/media/lirc/ |
H A D | lirc_parallel.c | 328 int result = 0; lirc_read() local 341 result = -EFAULT; lirc_read() 348 result = -EAGAIN; lirc_read() 352 result = -ERESTARTSYS; lirc_read() 361 return count ? count : result; lirc_read() 464 int result; lirc_ioctl() local 473 result = put_user(features, uptr); lirc_ioctl() 474 if (result) lirc_ioctl() 475 return result; lirc_ioctl() 478 result = put_user(LIRC_MODE_PULSE, uptr); lirc_ioctl() 479 if (result) lirc_ioctl() 480 return result; lirc_ioctl() 483 result = put_user(LIRC_MODE_MODE2, uptr); lirc_ioctl() 484 if (result) lirc_ioctl() 485 return result; lirc_ioctl() 488 result = get_user(mode, uptr); lirc_ioctl() 489 if (result) lirc_ioctl() 490 return result; lirc_ioctl() 495 result = get_user(mode, uptr); lirc_ioctl() 496 if (result) lirc_ioctl() 497 return result; lirc_ioctl() 502 result = get_user(value, uptr); lirc_ioctl() 503 if (result) lirc_ioctl() 504 return result; lirc_ioctl() 636 int result; lirc_parallel_init() local 638 result = platform_driver_register(&lirc_parallel_driver); lirc_parallel_init() 639 if (result) { lirc_parallel_init() 640 pr_notice("platform_driver_register returned %d\n", result); lirc_parallel_init() 641 return result; lirc_parallel_init() 646 result = -ENOMEM; lirc_parallel_init() 650 result = platform_device_add(lirc_parallel_dev); lirc_parallel_init() 651 if (result) lirc_parallel_init() 657 result = -ENXIO; lirc_parallel_init() 666 result = -ENXIO; lirc_parallel_init() 685 result = -EIO; lirc_parallel_init() 702 result = -EIO; lirc_parallel_init() 712 return result; lirc_parallel_init()
|
/linux-4.1.27/arch/arm64/include/asm/ |
H A D | atomic.h | 51 int result; \ 58 : "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \ 66 int result; \ 73 : "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \ 78 return result; \ 148 long result; \ 156 : "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \ 163 long result; \ 171 : "=&r" (result), "=&r" (tmp), "+Q" (v->counter) \ 176 return result; \ 216 long result; atomic64_dec_if_positive() local 227 : "=&r" (result), "=&r" (tmp), "+Q" (v->counter) atomic64_dec_if_positive() 231 return result; atomic64_dec_if_positive()
|
/linux-4.1.27/drivers/media/usb/dvb-usb/ |
H A D | af9005-remote.c | 90 u32 result; af9005_rc_decode() local 110 result = 0; af9005_rc_decode() 112 result <<= 1; af9005_rc_decode() 118 result += 1; af9005_rc_decode() 120 deb_decode("key pressed, raw value %x\n", result); af9005_rc_decode() 121 if ((result & 0xff000000) != 0xfe000000) { af9005_rc_decode() 126 cust = (result >> 16) & 0xff; af9005_rc_decode() 127 dat = (result >> 8) & 0xff; af9005_rc_decode() 128 invdat = (~result) & 0xff; af9005_rc_decode()
|
/linux-4.1.27/sound/core/ |
H A D | isadma.c | 89 unsigned int result, result1; snd_dma_pointer() local 95 result = get_dma_residue(dma); snd_dma_pointer() 105 if (unlikely(result < result1)) snd_dma_pointer() 106 result = result1; snd_dma_pointer() 108 if (result > size) snd_dma_pointer() 109 pr_err("ALSA: pointer (0x%x) for DMA #%ld is greater than transfer size (0x%x)\n", result, dma, size); snd_dma_pointer() 111 if (result >= size || result == 0) snd_dma_pointer() 114 return size - result; snd_dma_pointer()
|
/linux-4.1.27/drivers/staging/lustre/lustre/osc/ |
H A D | osc_io.c | 114 int result = 0; osc_io_submit() local 149 result = -EBUSY; cl_page_list_for_each_safe() 153 result = cl_page_prep(env, io, page, crt); cl_page_list_for_each_safe() 154 if (result != 0) { cl_page_list_for_each_safe() 155 LASSERT(result < 0); cl_page_list_for_each_safe() 156 if (result != -EALREADY) cl_page_list_for_each_safe() 163 result = 0; cl_page_list_for_each_safe() 175 result = osc_queue_sync_pages(env, osc, &list, cmd, cl_page_list_for_each_safe() 177 if (result < 0) cl_page_list_for_each_safe() 183 result = osc_queue_sync_pages(env, osc, &list, cmd, brw_flags); 185 CDEBUG(D_INFO, "%d/%d %d\n", qin->pl_nr, qout->pl_nr, result); 186 return qout->pl_nr > 0 ? 0 : result; 264 int result = 0; osc_io_prepare_write() local 271 result = -EIO; osc_io_prepare_write() 272 if (result == 0 && oio->oi_lockless) osc_io_prepare_write() 279 return result; osc_io_prepare_write() 404 int result = 0; osc_io_setattr_start() local 409 result = osc_cache_truncate_start(env, oio, cl2osc(obj), size); osc_io_setattr_start() 411 if (result == 0 && oio->oi_lockless == 0) { osc_io_setattr_start() 413 result = cl_object_attr_get(env, obj, attr); osc_io_setattr_start() 414 if (result == 0) { osc_io_setattr_start() 434 result = cl_object_attr_set(env, obj, attr, cl_valid); osc_io_setattr_start() 439 if (result == 0) { osc_io_setattr_start() 464 result = osc_punch_base(osc_export(cl2osc(obj)), osc_io_setattr_start() 468 result = osc_setattr_async_base(osc_export(cl2osc(obj)), osc_io_setattr_start() 472 cbargs->opc_rpc_sent = result == 0; osc_io_setattr_start() 474 return result; osc_io_setattr_start() 484 int result = 0; osc_io_setattr_end() local 488 result = io->ci_result = cbargs->opc_rc; osc_io_setattr_end() 490 if (result == 0) { osc_io_setattr_end() 584 int result = 0; osc_io_fsync_start() local 589 result = osc_cache_writeback_range(env, osc, start, end, 0, osc_io_fsync_start() 591 if (result > 0) { osc_io_fsync_start() 592 fio->fi_nr_written += result; osc_io_fsync_start() 593 result = 0; osc_io_fsync_start() 604 if (result == 0) osc_io_fsync_start() 605 result = rc; osc_io_fsync_start() 607 if (result == 0) osc_io_fsync_start() 608 result = rc; osc_io_fsync_start() 611 return result; osc_io_fsync_start() 621 int result = 0; osc_io_fsync_end() local 624 result = osc_cache_wait_range(env, cl2osc(obj), start, end); osc_io_fsync_end() 630 if (result == 0) osc_io_fsync_end() 631 result = cbargs->opc_rc; osc_io_fsync_end() 633 slice->cis_io->ci_result = result; osc_io_fsync_end() 808 int result; osc_req_init() local 813 result = 0; osc_req_init() 815 result = -ENOMEM; osc_req_init() 816 return result; osc_req_init()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/ |
H A D | nouveau_acpi.c | 32 /* result of the optimus caps function */ 74 static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result) nouveau_optimus_dsm() argument 89 *result = 0; nouveau_optimus_dsm() 97 *result |= obj->buffer.pointer[0]; nouveau_optimus_dsm() 98 *result |= (obj->buffer.pointer[1] << 8); nouveau_optimus_dsm() 99 *result |= (obj->buffer.pointer[2] << 16); nouveau_optimus_dsm() 100 *result |= (obj->buffer.pointer[3] << 24); nouveau_optimus_dsm() 115 int result; nouveau_check_optimus_dsm() local 121 if (nouveau_optimus_dsm(handle, 0, 0, &result)) nouveau_check_optimus_dsm() 128 return result & 1 && result & (1 << NOUVEAU_DSM_OPTIMUS_CAPS); nouveau_check_optimus_dsm() 235 uint32_t result; nouveau_dsm_pci_probe() local 237 &result); nouveau_dsm_pci_probe() 239 (result & OPTIMUS_ENABLED) ? "enabled" : "disabled", nouveau_dsm_pci_probe() 240 (result & OPTIMUS_DYNAMIC_PWR_CAP) ? "dynamic power, " : "", nouveau_dsm_pci_probe() 241 (result & OPTIMUS_HDA_CODEC_MASK) ? "hda bios codec supported" : ""); nouveau_dsm_pci_probe() 323 u32 result = 0; nouveau_switcheroo_optimus_dsm() local 328 0x3, &result); nouveau_switcheroo_optimus_dsm() 331 NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, &result); nouveau_switcheroo_optimus_dsm()
|
/linux-4.1.27/kernel/ |
H A D | sysctl_binary.c | 931 ssize_t result, copied = 0; bin_string() local 938 result = vfs_read(file, oldval, oldlen, &pos); bin_string() 939 if (result < 0) bin_string() 942 copied = result; bin_string() 945 result = -EFAULT; bin_string() 951 result = -EFAULT; bin_string() 961 result = vfs_write(file, newval, newlen, &pos); bin_string() 962 if (result < 0) bin_string() 966 result = copied; bin_string() 968 return result; bin_string() 976 ssize_t result; bin_intvec() local 978 result = -ENOMEM; bin_intvec() 989 result = kernel_read(file, 0, buffer, BUFSZ - 1); bin_intvec() 990 if (result < 0) bin_intvec() 994 end = str + result; bin_intvec() 1003 result = -EFAULT; bin_intvec() 1024 result = -EFAULT; bin_intvec() 1031 result = kernel_write(file, buffer, str - buffer, 0); bin_intvec() 1032 if (result < 0) bin_intvec() 1035 result = copied; bin_intvec() 1039 return result; bin_intvec() 1047 ssize_t result; bin_ulongvec() local 1049 result = -ENOMEM; bin_ulongvec() 1060 result = kernel_read(file, 0, buffer, BUFSZ - 1); bin_ulongvec() 1061 if (result < 0) bin_ulongvec() 1065 end = str + result; bin_ulongvec() 1074 result = -EFAULT; bin_ulongvec() 1095 result = -EFAULT; bin_ulongvec() 1102 result = kernel_write(file, buffer, str - buffer, 0); bin_ulongvec() 1103 if (result < 0) bin_ulongvec() 1106 result = copied; bin_ulongvec() 1110 return result; bin_ulongvec() 1116 ssize_t result, copied = 0; bin_uuid() local 1124 result = kernel_read(file, 0, buf, sizeof(buf) - 1); bin_uuid() 1125 if (result < 0) bin_uuid() 1128 buf[result] = '\0'; bin_uuid() 1132 result = -EIO; bin_uuid() 1146 result = -EFAULT; bin_uuid() 1152 result = copied; bin_uuid() 1154 return result; bin_uuid() 1160 ssize_t result, copied = 0; bin_dn_node_address() local 1167 result = kernel_read(file, 0, buf, sizeof(buf) - 1); bin_dn_node_address() 1168 if (result < 0) bin_dn_node_address() 1171 buf[result] = '\0'; bin_dn_node_address() 1174 result = -EIO; bin_dn_node_address() 1183 result = -EIO; bin_dn_node_address() 1189 result = -EFAULT; bin_dn_node_address() 1201 result = -EINVAL; bin_dn_node_address() 1205 result = -EFAULT; bin_dn_node_address() 1213 result = kernel_write(file, buf, len, 0); bin_dn_node_address() 1214 if (result < 0) bin_dn_node_address() 1218 result = copied; bin_dn_node_address() 1220 return result; bin_dn_node_address() 1280 char *tmp, *result; sysctl_getname() local 1282 result = ERR_PTR(-ENOMEM); sysctl_getname() 1286 result = tmp; sysctl_getname() 1290 result = ERR_CAST(table); sysctl_getname() 1293 return result; sysctl_getname() 1302 ssize_t result; binary_sysctl() local 1307 result = PTR_ERR(pathname); binary_sysctl() 1319 result = 0; binary_sysctl() 1325 result = PTR_ERR(file); binary_sysctl() 1329 result = table->convert(file, oldval, oldlen, newval, newlen); binary_sysctl() 1335 return result; binary_sysctl() 1424 ssize_t result; SYSCALL_DEFINE1() local 1435 result = do_sysctl(tmp.name, tmp.nlen, tmp.oldval, oldlen, SYSCALL_DEFINE1() 1438 if (result >= 0) { SYSCALL_DEFINE1() 1439 oldlen = result; SYSCALL_DEFINE1() 1440 result = 0; SYSCALL_DEFINE1() 1446 return result; SYSCALL_DEFINE1() 1467 ssize_t result; COMPAT_SYSCALL_DEFINE1() local 1479 result = do_sysctl(compat_ptr(tmp.name), tmp.nlen, COMPAT_SYSCALL_DEFINE1() 1483 if (result >= 0) { COMPAT_SYSCALL_DEFINE1() 1484 oldlen = result; COMPAT_SYSCALL_DEFINE1() 1485 result = 0; COMPAT_SYSCALL_DEFINE1() 1491 return result; COMPAT_SYSCALL_DEFINE1()
|
/linux-4.1.27/drivers/macintosh/ams/ |
H A D | ams-core.c | 134 int result; ams_sensor_attach() local 145 result = pmf_register_irq_client(ams_info.of_node, ams_sensor_attach() 148 if (result < 0) ams_sensor_attach() 155 result = pmf_register_irq_client(ams_info.of_node, ams_sensor_attach() 158 if (result < 0) ams_sensor_attach() 164 result = -ENODEV; ams_sensor_attach() 169 result = device_create_file(&ams_info.of_dev->dev, &dev_attr_current); ams_sensor_attach() 170 if (result) ams_sensor_attach() 176 result = ams_input_init(); ams_sensor_attach() 177 if (result) ams_sensor_attach() 180 return result; ams_sensor_attach() 189 return result; ams_sensor_attach()
|
H A D | ams-i2c.c | 95 s32 result; ams_i2c_cmd() local 102 result = ams_i2c_read(AMS_COMMAND); ams_i2c_cmd() 103 if (result == 0 || result & 0x80) ams_i2c_cmd() 167 int result; ams_i2c_probe() local 213 result = ams_sensor_attach(); ams_i2c_probe() 214 if (result < 0) ams_i2c_probe() 215 return result; ams_i2c_probe() 264 int result; ams_i2c_init() local 274 result = i2c_add_driver(&ams_i2c_driver); ams_i2c_init() 276 return result; ams_i2c_init()
|
/linux-4.1.27/arch/alpha/kernel/ |
H A D | srmcons.c | 49 srmcons_result result; srmcons_do_receive_chars() local 53 result.as_long = callback_getc(0); srmcons_do_receive_chars() 54 if (result.bits.status < 2) { srmcons_do_receive_chars() 55 tty_insert_flip_char(port, (char)result.bits.c, 0); srmcons_do_receive_chars() 58 } while((result.bits.status & 1) && (++loops < 10)); srmcons_do_receive_chars() 95 srmcons_result result; srmcons_do_write() local 110 result.as_long = callback_puts(0, cur, c); srmcons_do_write() 111 c -= result.bits.c; srmcons_do_write() 112 remaining -= result.bits.c; srmcons_do_write() 113 cur += result.bits.c; srmcons_do_write() 123 result.as_long = callback_puts(0, str_cr, 1); srmcons_do_write() 124 if (result.bits.c > 0) srmcons_do_write()
|
/linux-4.1.27/samples/pktgen/ |
H A D | pktgen.conf-1-1 | 7 local result 11 result=`cat $PGDEV | fgrep "Result: OK:"` 12 if [ "$result" = "" ]; then
|
H A D | pktgen.conf-1-1-flows | 7 local result 11 result=`cat $PGDEV | fgrep "Result: OK:"` 12 if [ "$result" = "" ]; then
|
H A D | pktgen.conf-1-1-ip6 | 7 local result 11 result=`cat $PGDEV | fgrep "Result: OK:"` 12 if [ "$result" = "" ]; then
|
H A D | pktgen.conf-1-1-ip6-rdos | 7 local result 11 result=`cat $PGDEV | fgrep "Result: OK:"` 12 if [ "$result" = "" ]; then
|
H A D | pktgen.conf-1-1-rdos | 7 local result 11 result=`cat $PGDEV | fgrep "Result: OK:"` 12 if [ "$result" = "" ]; then
|
H A D | pktgen.conf-1-2 | 7 local result 11 result=`cat $PGDEV | fgrep "Result: OK:"` 12 if [ "$result" = "" ]; then
|
/linux-4.1.27/drivers/staging/comedi/drivers/ |
H A D | serial2002.c | 110 int result; serial2002_tty_write() local 116 result = __vfs_write(f, p, count, &offset); serial2002_tty_write() 118 return result; serial2002_tty_write() 151 int result; serial2002_tty_read() local 153 result = -1; serial2002_tty_read() 165 result = ch; serial2002_tty_read() 176 result = ch; serial2002_tty_read() 184 return result; serial2002_tty_read() 258 struct serial_data result; serial2002_read() local 261 result.kind = is_invalid; serial2002_read() 262 result.index = 0; serial2002_read() 263 result.value = 0; serial2002_read() 272 result.value = (result.value << 7) | (data & 0x7f); serial2002_read() 277 result.value = 0; serial2002_read() 278 result.kind = is_digital; serial2002_read() 281 result.value = 1; serial2002_read() 282 result.kind = is_digital; serial2002_read() 286 result.value = serial2002_read() 287 (result.value << 2) | ((data & 0x60) >> 5); serial2002_read() 288 result.kind = is_channel; serial2002_read() 290 result.index = data & 0x1f; serial2002_read() 294 return result; serial2002_read() 399 int result = 0; serial2002_setup_subdevs() local 408 result = -ENOMEM; serial2002_setup_subdevs() 525 result = -ENOMEM; serial2002_setup_subdevs() 541 if (result) { serial2002_setup_subdevs() 548 return result; serial2002_setup_subdevs() 554 int result; serial2002_open() local 560 result = (int)PTR_ERR(devpriv->tty); serial2002_open() 561 dev_err(dev->class_dev, "file open error = %d\n", result); serial2002_open() 563 result = serial2002_setup_subdevs(dev); serial2002_open() 565 return result; serial2002_open()
|
/linux-4.1.27/tools/testing/selftests/mqueue/ |
H A D | mq_open_tests.c | 64 static inline void test_queue(struct mq_attr *attr, struct mq_attr *result); 65 static inline int test_queue_fail(struct mq_attr *attr, struct mq_attr *result); 194 * after ourselves and return the queue attributes in *result. 196 static inline void test_queue(struct mq_attr *attr, struct mq_attr *result) test_queue() argument 203 if (mq_getattr(queue, result)) test_queue() 216 * 1 - Created a queue, attributes in *result 218 static inline int test_queue_fail(struct mq_attr *attr, struct mq_attr *result) test_queue_fail() argument 225 if (mq_getattr(queue, result)) test_queue_fail() 237 struct mq_attr attr, result; main() local 326 test_queue(NULL, &result); main() 329 if (result.mq_maxmsg != cur_max_msgs || main() 330 result.mq_msgsize != cur_max_msgsize) { main() 337 test_queue(NULL, &result); main() 338 if (result.mq_maxmsg == cur_max_msgs && main() 339 result.mq_msgsize == cur_max_msgsize) main() 358 test_queue(NULL, &result); main() 361 if (result.mq_maxmsg != cur_def_msgs || main() 362 result.mq_msgsize != cur_def_msgsize) main() 371 test_queue(NULL, &result); main() 372 if (result.mq_maxmsg != cur_def_msgs || main() 373 result.mq_msgsize != cur_def_msgsize) main() 392 if (test_queue_fail(NULL, &result)) { main() 393 if (result.mq_maxmsg == cur_max_msgs && main() 394 result.mq_msgsize == cur_max_msgsize) main() 409 if (test_queue_fail(NULL, &result)) main() 430 if (test_queue_fail(&attr, &result)) main() 438 if (test_queue_fail(&attr, &result)) main() 446 if (test_queue_fail(&attr, &result)) main() 454 if (test_queue_fail(&attr, &result)) main() 468 if (test_queue_fail(&attr, &result)) main() 476 if (test_queue_fail(&attr, &result)) main() 484 if (test_queue_fail(&attr, &result)) main() 492 if (test_queue_fail(&attr, &result)) main()
|
/linux-4.1.27/drivers/crypto/caam/ |
H A D | key_gen.c | 49 struct split_key_result result; gen_split_key() local 100 result.err = 0; gen_split_key() 101 init_completion(&result.completion); gen_split_key() 103 ret = caam_jr_enqueue(jrdev, desc, split_key_done, &result); gen_split_key() 106 wait_for_completion_interruptible(&result.completion); gen_split_key() 107 ret = result.err; gen_split_key()
|
/linux-4.1.27/arch/x86/math-emu/ |
H A D | poly_2xm1.c | 52 int poly_2xm1(u_char sign, FPU_REG *arg, FPU_REG *result) poly_2xm1() argument 134 result = &st(0); poly_2xm1() 135 significand(result) = XSIG_LL(accumulator); poly_2xm1() 136 setexponent16(result, exponent); poly_2xm1() 138 tag = FPU_round(result, 1, 0, FULL_PRECISION, sign); poly_2xm1() 140 setsign(result, sign); poly_2xm1()
|
H A D | poly_sin.c | 63 FPU_REG result; poly_sine() local 111 setexponentpos(&result, exponent(st0_ptr) + echange); poly_sine() 181 setexponentpos(&result, echange - 1); poly_sine() 184 significand(&result) = XSIG_LL(accumulator); poly_sine() 185 setsign(&result, getsign(st0_ptr)); poly_sine() 186 FPU_copy_to_reg0(&result, TAG_Valid); poly_sine() 189 if ((exponent(&result) >= 0) poly_sine() 190 && (significand(&result) > 0x8000000000000000LL)) { poly_sine() 202 FPU_REG result; poly_cos() local 267 /* The result is 1.0 */ poly_cos() 271 significand(&result) = XSIG_LL(accumulator); poly_cos() 274 setexponentpos(&result, -1); poly_cos() 365 setexponentpos(&result, exp2 + echange); poly_cos() 366 significand(&result) = XSIG_LL(accumulator); poly_cos() 369 FPU_copy_to_reg0(&result, TAG_Valid); poly_cos() 372 if ((exponent(&result) >= 0) poly_cos() 373 && (significand(&result) > 0x8000000000000000LL)) { poly_cos()
|
/linux-4.1.27/drivers/usb/gadget/function/ |
H A D | f_loopback.c | 306 int result; enable_endpoint() local 312 result = config_ep_by_speed(cdev->gadget, &(loop->function), ep); enable_endpoint() 313 if (result) enable_endpoint() 315 result = usb_ep_enable(ep); enable_endpoint() 316 if (result < 0) enable_endpoint() 325 for (i = 0; i < qlen && result == 0; i++) { enable_endpoint() 331 result = usb_ep_queue(ep, req, GFP_ATOMIC); enable_endpoint() 332 if (result) { enable_endpoint() 334 ep->name, result); enable_endpoint() 345 return result; enable_endpoint() 351 int result = 0; enable_loopback() local 353 result = enable_endpoint(cdev, loop, loop->in_ep); enable_loopback() 354 if (result) enable_loopback() 355 return result; enable_loopback() 357 result = enable_endpoint(cdev, loop, loop->out_ep); enable_loopback() 358 if (result) enable_loopback() 359 return result; enable_loopback() 362 return result; enable_loopback() 439 int result; f_lb_opts_qlen_show() local 442 result = sprintf(page, "%d", opts->qlen); f_lb_opts_qlen_show() 445 return result; f_lb_opts_qlen_show() 478 int result; f_lb_opts_bulk_buflen_show() local 481 result = sprintf(page, "%d", opts->bulk_buflen); f_lb_opts_bulk_buflen_show() 484 return result; f_lb_opts_bulk_buflen_show()
|
/linux-4.1.27/arch/mn10300/lib/ |
H A D | checksum.c | 38 __wsum result; csum_partial() local 40 result = do_csum(buff, len); csum_partial() 41 result += sum; csum_partial() 42 if (sum > result) csum_partial() 43 result++; csum_partial() 44 return result; csum_partial()
|
/linux-4.1.27/arch/powerpc/perf/ |
H A D | hv-24x7.h | 68 /* size = @result_element_data_size of cointaining result. */ 76 * 0 = not all result elements fit into the buffer, additional requests 78 * 1 = all result elements were returned 87 /* WARNING: only valid for first result element due to variable sizes 88 * of result elements */ 104 /* WARNING: only valid for the first result due to variable sizes of
|
/linux-4.1.27/drivers/staging/lustre/include/linux/libcfs/ |
H A D | libcfs_time.h | 72 struct timeval *result) cfs_timeval_sub() 77 if (result != NULL) { cfs_timeval_sub() 78 result->tv_usec = r % ONE_MILLION; cfs_timeval_sub() 79 result->tv_sec = r / ONE_MILLION; cfs_timeval_sub() 98 int result; \ 101 result = 1; \ 104 result = 0; \ 106 result; \ 71 cfs_timeval_sub(struct timeval *large, struct timeval *small, struct timeval *result) cfs_timeval_sub() argument
|
/linux-4.1.27/drivers/uwb/i1480/ |
H A D | i1480-est.c | 59 int result = uwb_est_register(i1480_CET_VS1, 0x00, 0x8086, 0x0c3b, i1480_est_init() local 62 if (result < 0) { i1480_est_init() 63 printk(KERN_ERR "Can't register EST table fd00: %d\n", result); i1480_est_init() 64 return result; i1480_est_init() 66 result = uwb_est_register(i1480_CET_VS1, 0x01, 0x8086, 0x0c3b, i1480_est_init() 68 if (result < 0) { i1480_est_init() 69 printk(KERN_ERR "Can't register EST table fd01: %d\n", result); i1480_est_init() 70 return result; i1480_est_init()
|
/linux-4.1.27/arch/x86/kernel/ |
H A D | iosf_mbi.c | 45 int result; iosf_mbi_pci_read_mdr() local 51 result = pci_write_config_dword(mbi_pdev, MBI_MCRX_OFFSET, iosf_mbi_pci_read_mdr() 53 if (result < 0) iosf_mbi_pci_read_mdr() 57 result = pci_write_config_dword(mbi_pdev, MBI_MCR_OFFSET, mcr); iosf_mbi_pci_read_mdr() 58 if (result < 0) iosf_mbi_pci_read_mdr() 61 result = pci_read_config_dword(mbi_pdev, MBI_MDR_OFFSET, mdr); iosf_mbi_pci_read_mdr() 62 if (result < 0) iosf_mbi_pci_read_mdr() 68 dev_err(&mbi_pdev->dev, "PCI config access failed with %d\n", result); iosf_mbi_pci_read_mdr() 69 return result; iosf_mbi_pci_read_mdr() 74 int result; iosf_mbi_pci_write_mdr() local 79 result = pci_write_config_dword(mbi_pdev, MBI_MDR_OFFSET, mdr); iosf_mbi_pci_write_mdr() 80 if (result < 0) iosf_mbi_pci_write_mdr() 84 result = pci_write_config_dword(mbi_pdev, MBI_MCRX_OFFSET, iosf_mbi_pci_write_mdr() 86 if (result < 0) iosf_mbi_pci_write_mdr() 90 result = pci_write_config_dword(mbi_pdev, MBI_MCR_OFFSET, mcr); iosf_mbi_pci_write_mdr() 91 if (result < 0) iosf_mbi_pci_write_mdr() 97 dev_err(&mbi_pdev->dev, "PCI config access failed with %d\n", result); iosf_mbi_pci_write_mdr() 98 return result; iosf_mbi_pci_write_mdr()
|
/linux-4.1.27/drivers/media/usb/cx231xx/ |
H A D | cx231xx-dvb.c | 467 int result; register_dvb() local 473 result = dvb_register_adapter(&dvb->adapter, dev->name, module, device, register_dvb() 475 if (result < 0) { register_dvb() 478 dev->name, result); register_dvb() 489 result = dvb_register_frontend(&dvb->adapter, dvb->frontend); register_dvb() 490 if (result < 0) { register_dvb() 493 dev->name, result); register_dvb() 507 result = dvb_dmx_init(&dvb->demux); register_dvb() 508 if (result < 0) { register_dvb() 511 dev->name, result); register_dvb() 518 result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); register_dvb() 519 if (result < 0) { register_dvb() 522 dev->name, result); register_dvb() 527 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); register_dvb() 528 if (result < 0) { register_dvb() 531 dev->name, result); register_dvb() 536 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); register_dvb() 537 if (result < 0) { register_dvb() 540 dev->name, result); register_dvb() 544 result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw); register_dvb() 545 if (result < 0) { register_dvb() 548 dev->name, result); register_dvb() 572 return result; register_dvb() 596 int result = 0; dvb_init() local 634 result = -EINVAL; dvb_init() 644 result = -EINVAL; dvb_init() 659 result = -EINVAL; dvb_init() 669 result = -EINVAL; dvb_init() 682 result = -EINVAL; dvb_init() 692 result = -EINVAL; dvb_init() 706 result = -EINVAL; dvb_init() 716 result = -EINVAL; dvb_init() 733 result = -EINVAL; dvb_init() 755 result = -EINVAL; dvb_init() 788 result = -EINVAL; dvb_init() 811 result = -ENODEV; dvb_init() 818 result = -ENODEV; dvb_init() 843 result = -EINVAL; dvb_init() 866 result = -ENODEV; dvb_init() 873 result = -ENODEV; dvb_init() 896 result = -EINVAL; dvb_init() 917 result = -EINVAL; dvb_init() 922 result = register_dvb(dvb, THIS_MODULE, dev, dev->dev); dvb_init() 924 if (result < 0) dvb_init() 933 return result; dvb_init()
|
/linux-4.1.27/drivers/mfd/ |
H A D | pcf50633-adc.c | 37 int result; member in struct:pcf50633_adc_sync_request 112 int result) pcf50633_adc_sync_read_callback() 116 req->result = result; pcf50633_adc_sync_read_callback() 134 return req.result; pcf50633_adc_sync_read() 144 /* req is freed when the result is ready, in interrupt handler */ pcf50633_adc_async_read() 161 u16 result; adc_result() local 165 result = (adcs1 << 2) | (adcs3 & PCF50633_ADCS3_ADCDAT1L_MASK); adc_result() 167 dev_dbg(pcf->dev, "adc result = %d\n", result); adc_result() 169 return result; adc_result() 111 pcf50633_adc_sync_read_callback(struct pcf50633 *pcf, void *param, int result) pcf50633_adc_sync_read_callback() argument
|
/linux-4.1.27/drivers/staging/rtl8188eu/hal/ |
H A D | phy.c | 633 u8 result = 0x00; phy_path_a_iqk() local 659 result |= 0x01; phy_path_a_iqk() 660 return result; phy_path_a_iqk() 666 u8 result = 0x00; phy_path_a_rx_iqk() local 712 result |= 0x01; phy_path_a_rx_iqk() 714 return result; phy_path_a_rx_iqk() 760 result |= 0x02; phy_path_a_rx_iqk() 765 return result; phy_path_a_rx_iqk() 771 u8 result = 0x00; phy_path_b_iqk() local 790 result |= 0x01; phy_path_b_iqk() 792 return result; phy_path_b_iqk() 797 result |= 0x02; phy_path_b_iqk() 801 return result; phy_path_b_iqk() 804 static void patha_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8], patha_fill_iqk() argument 815 x = result[final_candidate][0]; patha_fill_iqk() 824 y = result[final_candidate][1]; patha_fill_iqk() 839 reg = result[final_candidate][2]; patha_fill_iqk() 842 reg = result[final_candidate][3] & 0x3F; patha_fill_iqk() 845 reg = (result[final_candidate][3] >> 6) & 0xF; patha_fill_iqk() 850 static void pathb_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8], pathb_fill_iqk() argument 861 x = result[final_candidate][4]; pathb_fill_iqk() 870 y = result[final_candidate][5]; pathb_fill_iqk() 886 reg = result[final_candidate][6]; pathb_fill_iqk() 889 reg = result[final_candidate][7] & 0x3F; pathb_fill_iqk() 892 reg = (result[final_candidate][7] >> 6) & 0xF; pathb_fill_iqk() 992 bool result = true; simularity_compare() local 1038 result = false; simularity_compare() 1041 return result; simularity_compare() 1065 static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8], phy_iq_calibrate() argument 1157 result[t][0] = (phy_query_bb_reg(adapt, rTx_Power_Before_IQK_A, phy_iq_calibrate() 1159 result[t][1] = (phy_query_bb_reg(adapt, rTx_Power_After_IQK_A, phy_iq_calibrate() 1168 result[t][2] = (phy_query_bb_reg(adapt, rRx_Power_Before_IQK_A_2, phy_iq_calibrate() 1170 result[t][3] = (phy_query_bb_reg(adapt, rRx_Power_After_IQK_A_2, phy_iq_calibrate() 1193 result[t][4] = (phy_query_bb_reg(adapt, rTx_Power_Before_IQK_B, phy_iq_calibrate() 1195 result[t][5] = (phy_query_bb_reg(adapt, rTx_Power_After_IQK_B, phy_iq_calibrate() 1197 result[t][6] = (phy_query_bb_reg(adapt, rRx_Power_Before_IQK_B_2, phy_iq_calibrate() 1199 result[t][7] = (phy_query_bb_reg(adapt, rRx_Power_After_IQK_B_2, phy_iq_calibrate() 1203 result[t][4] = (phy_query_bb_reg(adapt, rTx_Power_Before_IQK_B, phy_iq_calibrate() 1205 result[t][5] = (phy_query_bb_reg(adapt, rTx_Power_After_IQK_B, phy_iq_calibrate() 1316 s32 result[4][8]; rtl88eu_phy_iq_calibrate() local 1348 result[0][i] = 0; rtl88eu_phy_iq_calibrate() 1349 result[1][i] = 0; rtl88eu_phy_iq_calibrate() 1350 result[2][i] = 0; rtl88eu_phy_iq_calibrate() 1352 result[3][i] = 0x100; rtl88eu_phy_iq_calibrate() 1354 result[3][i] = 0; rtl88eu_phy_iq_calibrate() 1364 phy_iq_calibrate(adapt, result, i, is2t); rtl88eu_phy_iq_calibrate() 1367 is12simular = simularity_compare(adapt, result, 0, 1); rtl88eu_phy_iq_calibrate() 1375 is13simular = simularity_compare(adapt, result, 0, 2); rtl88eu_phy_iq_calibrate() 1380 is23simular = simularity_compare(adapt, result, 1, 2); rtl88eu_phy_iq_calibrate() 1389 reg_e94 = result[i][0]; rtl88eu_phy_iq_calibrate() 1390 reg_e9c = result[i][1]; rtl88eu_phy_iq_calibrate() 1391 reg_ea4 = result[i][2]; rtl88eu_phy_iq_calibrate() 1392 reg_eac = result[i][3]; rtl88eu_phy_iq_calibrate() 1393 reg_eb4 = result[i][4]; rtl88eu_phy_iq_calibrate() 1394 reg_ebc = result[i][5]; rtl88eu_phy_iq_calibrate() 1395 reg_ec4 = result[i][6]; rtl88eu_phy_iq_calibrate() 1396 reg_ecc = result[i][7]; rtl88eu_phy_iq_calibrate() 1400 reg_e94 = result[final][0]; rtl88eu_phy_iq_calibrate() 1401 reg_e9c = result[final][1]; rtl88eu_phy_iq_calibrate() 1402 reg_ea4 = result[final][2]; rtl88eu_phy_iq_calibrate() 1403 reg_eac = result[final][3]; rtl88eu_phy_iq_calibrate() 1404 reg_eb4 = result[final][4]; rtl88eu_phy_iq_calibrate() 1405 reg_ebc = result[final][5]; rtl88eu_phy_iq_calibrate() 1410 reg_ec4 = result[final][6]; rtl88eu_phy_iq_calibrate() 1411 reg_ecc = result[final][7]; rtl88eu_phy_iq_calibrate() 1423 patha_fill_iqk(adapt, pathaok, result, final, rtl88eu_phy_iq_calibrate() 1427 pathb_fill_iqk(adapt, pathbok, result, final, rtl88eu_phy_iq_calibrate() 1435 dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[chn_index].Value[0][i] = result[final][i]; rtl88eu_phy_iq_calibrate()
|