/drivers/fmc/ |
D | fru-parse.c | 50 int i, sum; in fru_header_cksum_ok() local 52 for (i = sum = 0; i < sizeof(*header); i++) in fru_header_cksum_ok() 53 sum += ptr[i]; in fru_header_cksum_ok() 54 return (sum & 0xff) == 0; in fru_header_cksum_ok() 59 int i, sum; in fru_bia_cksum_ok() local 61 for (i = sum = 0; i < 8 * bia->area_len; i++) in fru_bia_cksum_ok() 62 sum += ptr[i]; in fru_bia_cksum_ok() 63 return (sum & 0xff) == 0; in fru_bia_cksum_ok()
|
/drivers/scsi/isci/ |
D | probe_roms.c | 49 u8 *tmp, sum; in isci_request_oprom() local 80 for (j = 0, sum = 0; j < sizeof(oem_hdr); j++, tmp++) in isci_request_oprom() 81 sum += *tmp; in isci_request_oprom() 85 sum += *tmp; in isci_request_oprom() 87 if (sum != 0) { in isci_request_oprom() 171 u8 *tmp, sum; in isci_get_efi_var() local 212 for (j = 0, sum = 0; j < (sizeof(*oem_hdr) + sizeof(*rom)); j++, tmp++) in isci_get_efi_var() 213 sum += *tmp; in isci_get_efi_var() 215 if (sum != 0) { in isci_get_efi_var()
|
/drivers/mfd/ |
D | cros_ec_i2c.c | 68 u8 sum; in cros_ec_pkt_xfer_i2c() local 161 sum = 0; in cros_ec_pkt_xfer_i2c() 163 sum += ((u8 *)ec_response)[i]; in cros_ec_pkt_xfer_i2c() 169 sum += msg->data[i]; in cros_ec_pkt_xfer_i2c() 172 if (sum) { in cros_ec_pkt_xfer_i2c() 197 u8 sum; in cros_ec_cmd_xfer_i2c() local 232 sum = out_buf[0] + out_buf[1] + out_buf[2]; in cros_ec_cmd_xfer_i2c() 235 sum += out_buf[3 + i]; in cros_ec_cmd_xfer_i2c() 237 out_buf[3 + msg->outsize] = sum; in cros_ec_cmd_xfer_i2c() 265 sum = in_buf[0] + in_buf[1]; in cros_ec_cmd_xfer_i2c() [all …]
|
D | cros_ec_spi.c | 377 u8 sum; in cros_ec_pkt_xfer_spi() local 459 sum = 0; in cros_ec_pkt_xfer_spi() 468 sum += ptr[i]; in cros_ec_pkt_xfer_spi() 473 sum += ec_msg->data[i]; in cros_ec_pkt_xfer_spi() 475 if (sum) { in cros_ec_pkt_xfer_spi() 478 sum); in cros_ec_pkt_xfer_spi() 507 int sum; in cros_ec_cmd_xfer_spi() local 577 sum = ptr[0] + ptr[1]; in cros_ec_cmd_xfer_spi() 587 sum += ptr[i + 2]; in cros_ec_cmd_xfer_spi() 591 sum &= 0xff; in cros_ec_cmd_xfer_spi() [all …]
|
/drivers/char/ |
D | nvram.c | 488 unsigned short sum = 0; in pc_check_checksum() local 492 sum += __nvram_read_byte(i); in pc_check_checksum() 495 return (sum & 0xffff) == expect; in pc_check_checksum() 501 unsigned short sum = 0; in pc_set_checksum() local 504 sum += __nvram_read_byte(i); in pc_set_checksum() 505 __nvram_write_byte(sum >> 8, PC_CKS_LOC); in pc_set_checksum() 506 __nvram_write_byte(sum & 0xff, PC_CKS_LOC + 1); in pc_set_checksum() 594 unsigned char sum = 0; in atari_check_checksum() local 597 sum += __nvram_read_byte(i); in atari_check_checksum() 598 return (__nvram_read_byte(ATARI_CKS_LOC) == (~sum & 0xff)) && in atari_check_checksum() [all …]
|
/drivers/net/ethernet/intel/e1000e/ |
D | manage.c | 35 u8 sum = 0; in e1000_calculate_checksum() local 41 sum += buffer[i]; in e1000_calculate_checksum() 43 return (u8)(0 - sum); in e1000_calculate_checksum() 200 u16 length, u16 offset, u8 *sum) in e1000_mng_host_if_write() argument 220 *sum += *(tmp + j); in e1000_mng_host_if_write() 239 *sum += *(tmp + j); in e1000_mng_host_if_write() 251 *sum += *(tmp + j); in e1000_mng_host_if_write()
|
/drivers/media/pci/zoran/ |
D | zr36050.c | 431 int sum = 0; in zr36050_init() local 459 sum += zr36050_set_sof(ptr); in zr36050_init() 460 sum += zr36050_set_sos(ptr); in zr36050_init() 461 sum += zr36050_set_dri(ptr); in zr36050_init() 466 sum += zr36050_pushit(ptr, ZR050_DQT_IDX, in zr36050_init() 468 sum += zr36050_pushit(ptr, ZR050_DHT_IDX, in zr36050_init() 474 sum += zr36050_pushit(ptr, ZR050_APP_IDX + 4, 60, in zr36050_init() 480 sum += zr36050_pushit(ptr, ZR050_COM_IDX + 4, 60, in zr36050_init() 500 sum = ptr->real_code_vol - sum; in zr36050_init() 501 bitcnt = sum << 3; /* need the size in bits */ in zr36050_init() [all …]
|
D | zr36060.c | 424 int sum = 0; in zr36060_init() local 458 sum += zr36060_set_sof(ptr); in zr36060_init() 459 sum += zr36060_set_sos(ptr); in zr36060_init() 460 sum += zr36060_set_dri(ptr); in zr36060_init() 464 sum += in zr36060_init() 467 sum += in zr36060_init() 474 sum += zr36060_pushit(ptr, ZR060_APP_IDX + 4, 60, in zr36060_init() 480 sum += zr36060_pushit(ptr, ZR060_COM_IDX + 4, 60, in zr36060_init() 486 sum = ptr->real_code_vol - sum; in zr36060_init() 487 bitcnt = sum << 3; /* need the size in bits */ in zr36060_init() [all …]
|
/drivers/staging/lustre/lnet/klnds/socklnd/ |
D | socklnd_lib.c | 218 int sum; in ksocknal_lib_recv_iov() local 242 for (i = 0, sum = rc; sum > 0; i++, sum -= fragnob) { in ksocknal_lib_recv_iov() 246 if (fragnob > sum) in ksocknal_lib_recv_iov() 247 fragnob = sum; in ksocknal_lib_recv_iov() 328 int sum; in ksocknal_lib_recv_kiov() local 354 for (i = 0, sum = rc; sum > 0; i++, sum -= fragnob) { in ksocknal_lib_recv_kiov() 363 if (fragnob > sum) in ksocknal_lib_recv_kiov() 364 fragnob = sum; in ksocknal_lib_recv_kiov()
|
/drivers/acpi/acpica/ |
D | tbprint.c | 236 u8 sum = 0; in acpi_tb_checksum() local 240 sum = (u8)(sum + *(buffer++)); in acpi_tb_checksum() 243 return (sum); in acpi_tb_checksum()
|
/drivers/media/common/b2c2/ |
D | flexcop-eeprom.c | 100 u8 sum = 0; in calc_lrc() local 102 sum = sum ^ buf[i]; in calc_lrc() 103 return sum; in calc_lrc()
|
/drivers/rtc/ |
D | rtc-88pm860x.c | 253 unsigned int sum, data, mean, vrtc_set; in calibrate_vrtc_work() local 256 for (i = 0, sum = 0; i < 16; i++) { in calibrate_vrtc_work() 261 sum += data; in calibrate_vrtc_work() 263 mean = sum >> 4; in calibrate_vrtc_work() 267 sum = pm860x_reg_read(info->i2c, PM8607_RTC_MISC1); in calibrate_vrtc_work() 268 data = sum & 0x3; in calibrate_vrtc_work() 273 data = (sum & 0xf8) | (data & 0x3); in calibrate_vrtc_work() 279 data = (sum & 0xf8) | (data & 0x3); in calibrate_vrtc_work()
|
/drivers/input/misc/ |
D | yealink.c | 266 u8 sum = 0; in yealink_cmd() local 269 sum -= buf[i]; in yealink_cmd() 270 p->sum = sum; in yealink_cmd() 339 yld->ctl_data->sum = 0xff - CMD_KEYPRESS; in yealink_do_idle_tasks() 370 yld->ctl_data->sum = -1 - CMD_LED - val; in yealink_do_idle_tasks() 374 yld->ctl_data->sum = -1 - CMD_DIALTONE - val; in yealink_do_idle_tasks() 378 yld->ctl_data->sum = -1 - CMD_RINGTONE - val; in yealink_do_idle_tasks() 386 yld->ctl_data->sum = -1 - CMD_SCANCODE - val; in yealink_do_idle_tasks() 398 yld->ctl_data->sum = -CMD_LCD - ix - val - len; in yealink_do_idle_tasks() 404 yld->ctl_data->sum -= val; in yealink_do_idle_tasks() [all …]
|
/drivers/media/pci/cx88/ |
D | cx88-dsp.c | 128 u32 sum = int_goertzel(x, N, freq); in freq_magnitude() local 129 return (u32)int_sqrt(sum); in freq_magnitude() 135 u32 sum = 0; in noise_magnitude() local 148 sum += int_goertzel(x, N, freq_start); in noise_magnitude() 152 return (u32)int_sqrt(sum / samples); in noise_magnitude()
|
/drivers/staging/gdm724x/ |
D | gdm_lte.c | 184 int sum = 0; in icmp6_checksum() local 206 sum += pseudo_header.pa[i]; in icmp6_checksum() 210 sum += *w++; in icmp6_checksum() 214 sum = (sum >> 16) + (sum & 0xFFFF); in icmp6_checksum() 215 sum += (sum >> 16); in icmp6_checksum() 216 sum = ~sum & 0xffff; in icmp6_checksum() 218 return sum; in icmp6_checksum()
|
/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/ |
D | mxms.c | 70 u8 *mxms = mxms_data(mxm), sum = 0; in mxms_checksum() local 72 sum += *mxms++; in mxms_checksum() 73 if (sum) { in mxms_checksum()
|
/drivers/power/ |
D | 88pm860x_battery.c | 269 unsigned int sum; in calc_ccnt() local 276 sum = data & 0xffff; in calc_ccnt() 280 sum |= (data & 0xffff) << 16; in calc_ccnt() 281 ccnt->pos += sum; in calc_ccnt() 286 sum = data & 0xffff; in calc_ccnt() 290 sum |= (data & 0xffff) << 16; in calc_ccnt() 291 sum = ~sum + 1; /* since it's negative */ in calc_ccnt() 292 ccnt->neg += sum; in calc_ccnt()
|
/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
D | base.c | 33 u8 sum = 0; in nvbios_checksum() local 35 sum += *data++; in nvbios_checksum() 36 return sum; in nvbios_checksum()
|
/drivers/nvdimm/ |
D | claim.c | 188 u64 sum; in nd_sb_checksum() local 197 sum = nd_fletcher64(nd_gen_sb, sizeof(*nd_gen_sb), 1); in nd_sb_checksum() 199 return sum; in nd_sb_checksum()
|
/drivers/gpu/drm/exynos/ |
D | exynos_dp_core.c | 94 unsigned char sum = 0; in exynos_dp_calc_edid_check_sum() local 97 sum = sum + edid_data[i]; in exynos_dp_calc_edid_check_sum() 99 return sum; in exynos_dp_calc_edid_check_sum() 106 unsigned char sum; in exynos_dp_read_edid() local 135 sum = exynos_dp_calc_edid_check_sum(edid); in exynos_dp_read_edid() 136 if (sum != 0) { in exynos_dp_read_edid() 151 sum = exynos_dp_calc_edid_check_sum(&edid[EDID_BLOCK_LENGTH]); in exynos_dp_read_edid() 152 if (sum != 0) { in exynos_dp_read_edid() 180 sum = exynos_dp_calc_edid_check_sum(edid); in exynos_dp_read_edid() 181 if (sum != 0) { in exynos_dp_read_edid()
|
/drivers/platform/chrome/ |
D | cros_ec_lpc.c | 54 u8 sum = 0; in cros_ec_pkt_xfer_lpc() local 86 sum += dout[i]; in cros_ec_pkt_xfer_lpc() 103 sum += msg->data[i]; in cros_ec_pkt_xfer_lpc() 106 if (sum) { in cros_ec_pkt_xfer_lpc()
|
/drivers/video/fbdev/omap2/dss/ |
D | hdmi4_core.c | 633 u8 sum = 0, checksum = 0; in hdmi_core_audio_infoframe_cfg() local 644 sum += 0x84 + 0x001 + 0x00a; in hdmi_core_audio_infoframe_cfg() 648 sum += info_aud->db1_ct_cc; in hdmi_core_audio_infoframe_cfg() 652 sum += info_aud->db2_sf_ss; in hdmi_core_audio_infoframe_cfg() 655 sum += info_aud->db3; in hdmi_core_audio_infoframe_cfg() 665 sum += info_aud->db4_ca; in hdmi_core_audio_infoframe_cfg() 669 sum += info_aud->db5_dminh_lsv; in hdmi_core_audio_infoframe_cfg() 677 checksum = 0x100 - sum; in hdmi_core_audio_infoframe_cfg()
|
/drivers/mtd/ |
D | afs.c | 61 u32 sum = 0; in word_sum() local 64 sum += *p++; in word_sum() 66 return sum; in word_sum()
|
/drivers/iio/temperature/ |
D | tsys01.c | 120 u8 sum = 0; in tsys01_crc_valid() local 123 sum += ((n_prom[0] >> 8) + (n_prom[0] & 0xFF)); in tsys01_crc_valid() 125 return (sum == 0); in tsys01_crc_valid()
|
/drivers/media/rc/ |
D | streamzap.c | 97 unsigned long sum; member 153 rawir.duration -= sz->sum; in sz_push_full_pulse() 161 sz->sum = 0; in sz_push_full_pulse() 167 sz->sum += rawir.duration; in sz_push_full_pulse() 188 sz->sum += rawir.duration; in sz_push_full_space()
|