Lines Matching full:rc

255 	ssize_t cnt, rc = 0;  in mspro_block_attr_show_default()  local
259 if (PAGE_SIZE - rc) in mspro_block_attr_show_default()
260 buffer[rc++] = '\n'; in mspro_block_attr_show_default()
263 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "%02x ", in mspro_block_attr_show_default()
266 return rc; in mspro_block_attr_show_default()
277 ssize_t rc = 0; in mspro_block_attr_show_sysinfo() local
293 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "class: %x\n", in mspro_block_attr_show_sysinfo()
295 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "block size: %x\n", in mspro_block_attr_show_sysinfo()
297 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "block count: %x\n", in mspro_block_attr_show_sysinfo()
299 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "user block count: %x\n", in mspro_block_attr_show_sysinfo()
301 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "page size: %x\n", in mspro_block_attr_show_sysinfo()
303 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "assembly date: " in mspro_block_attr_show_sysinfo()
310 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "serial number: %x\n", in mspro_block_attr_show_sysinfo()
312 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, in mspro_block_attr_show_sysinfo()
315 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "assembly model code: " in mspro_block_attr_show_sysinfo()
319 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "memory maker code: %x\n", in mspro_block_attr_show_sysinfo()
321 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "memory model code: %x\n", in mspro_block_attr_show_sysinfo()
323 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "vcc: %x\n", in mspro_block_attr_show_sysinfo()
325 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "vpp: %x\n", in mspro_block_attr_show_sysinfo()
327 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "controller number: %x\n", in mspro_block_attr_show_sysinfo()
329 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, in mspro_block_attr_show_sysinfo()
332 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "start sector: %x\n", in mspro_block_attr_show_sysinfo()
334 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "unit size: %x\n", in mspro_block_attr_show_sysinfo()
336 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "sub class: %x\n", in mspro_block_attr_show_sysinfo()
338 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "interface type: %x\n", in mspro_block_attr_show_sysinfo()
340 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "controller code: %x\n", in mspro_block_attr_show_sysinfo()
342 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "format type: %x\n", in mspro_block_attr_show_sysinfo()
344 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "device type: %x\n", in mspro_block_attr_show_sysinfo()
346 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "mspro id: %s\n", in mspro_block_attr_show_sysinfo()
348 return rc; in mspro_block_attr_show_sysinfo()
370 ssize_t rc = 0; in mspro_block_attr_show_mbr() local
372 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "boot partition: %x\n", in mspro_block_attr_show_mbr()
374 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "start head: %x\n", in mspro_block_attr_show_mbr()
376 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "start sector: %x\n", in mspro_block_attr_show_mbr()
378 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "start cylinder: %x\n", in mspro_block_attr_show_mbr()
380 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "partition type: %x\n", in mspro_block_attr_show_mbr()
382 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "end head: %x\n", in mspro_block_attr_show_mbr()
384 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "end sector: %x\n", in mspro_block_attr_show_mbr()
386 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "end cylinder: %x\n", in mspro_block_attr_show_mbr()
388 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "start sectors: %x\n", in mspro_block_attr_show_mbr()
390 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, in mspro_block_attr_show_mbr()
393 return rc; in mspro_block_attr_show_mbr()
405 ssize_t rc = 0; in mspro_block_attr_show_specfile() local
412 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "name: %s\n", name); in mspro_block_attr_show_specfile()
413 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "ext: %s\n", ext); in mspro_block_attr_show_specfile()
414 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "attribute: %x\n", in mspro_block_attr_show_specfile()
416 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "time: %d:%d:%d\n", in mspro_block_attr_show_specfile()
420 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "date: %d-%d-%d\n", in mspro_block_attr_show_specfile()
424 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "start cluster: %x\n", in mspro_block_attr_show_specfile()
426 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "size: %x\n", in mspro_block_attr_show_specfile()
428 return rc; in mspro_block_attr_show_specfile()
439 ssize_t rc = 0; in mspro_block_attr_show_devinfo() local
441 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "cylinders: %x\n", in mspro_block_attr_show_devinfo()
443 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "heads: %x\n", in mspro_block_attr_show_devinfo()
445 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "bytes per track: %x\n", in mspro_block_attr_show_devinfo()
447 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "bytes per sector: %x\n", in mspro_block_attr_show_devinfo()
449 rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "sectors per track: %x\n", in mspro_block_attr_show_devinfo()
451 return rc; in mspro_block_attr_show_devinfo()
761 int rc = 0; in mspro_block_stop() local
768 rc = 1; in mspro_block_stop()
772 if (rc) in mspro_block_stop()
854 int rc = 0; in mspro_block_switch_interface() local
858 rc = mspro_block_set_interface(card, MEMSTICK_SYS_PAR4); in mspro_block_switch_interface()
862 if (rc) { in mspro_block_switch_interface()
865 dev_name(&card->dev), rc); in mspro_block_switch_interface()
875 rc = mspro_block_set_interface(card, MEMSTICK_SYS_PAR8); in mspro_block_switch_interface()
877 if (!rc) { in mspro_block_switch_interface()
887 dev_name(&card->dev), rc); in mspro_block_switch_interface()
895 rc = card->current_mrq.error; in mspro_block_switch_interface()
897 if (rc) { in mspro_block_switch_interface()
907 rc = memstick_set_rw_addr(card); in mspro_block_switch_interface()
908 if (!rc) in mspro_block_switch_interface()
909 rc = mspro_block_set_interface(card, msb->system); in mspro_block_switch_interface()
911 if (!rc) { in mspro_block_switch_interface()
913 rc = mspro_block_wait_for_ced(card); in mspro_block_switch_interface()
914 if (rc) in mspro_block_switch_interface()
915 return rc; in mspro_block_switch_interface()
923 return rc; in mspro_block_switch_interface()
936 int cnt, rc, attr_count; in mspro_block_read_attributes() local
960 rc = card->current_mrq.error; in mspro_block_read_attributes()
967 rc = -ENODEV; in mspro_block_read_attributes()
982 rc = -ENOMEM; in mspro_block_read_attributes()
989 rc = -ENOMEM; in mspro_block_read_attributes()
996 rc = -ENOMEM; in mspro_block_read_attributes()
1024 rc = -ENOMEM; in mspro_block_read_attributes()
1044 rc = -ENOMEM; in mspro_block_read_attributes()
1063 rc = card->current_mrq.error; in mspro_block_read_attributes()
1071 rc = 0; in mspro_block_read_attributes()
1076 return rc; in mspro_block_read_attributes()
1083 int rc = 0; in mspro_block_init_card() local
1099 rc = mspro_block_wait_for_ced(card); in mspro_block_init_card()
1100 if (rc) in mspro_block_init_card()
1101 return rc; in mspro_block_init_card()
1103 rc = mspro_block_switch_interface(card); in mspro_block_init_card()
1104 if (rc) in mspro_block_init_card()
1105 return rc; in mspro_block_init_card()
1123 rc = mspro_block_read_attributes(card); in mspro_block_init_card()
1124 if (rc) in mspro_block_init_card()
1125 return rc; in mspro_block_init_card()
1142 int rc, disk_id; in mspro_block_init_disk() local
1145 for (rc = 0; msb->attr_group.attrs[rc]; ++rc) { in mspro_block_init_disk()
1146 s_attr = mspro_from_sysfs_attr(msb->attr_group.attrs[rc]); in mspro_block_init_disk()
1169 rc = blk_mq_alloc_sq_tag_set(&msb->tag_set, &mspro_mq_ops, 2, in mspro_block_init_disk()
1171 if (rc) in mspro_block_init_disk()
1176 rc = PTR_ERR(msb->disk); in mspro_block_init_disk()
1205 rc = device_add_disk(&card->dev, msb->disk, NULL); in mspro_block_init_disk()
1206 if (rc) in mspro_block_init_disk()
1219 return rc; in mspro_block_init_disk()
1250 int rc = 0; in mspro_block_probe() local
1259 rc = mspro_block_init_card(card); in mspro_block_probe()
1261 if (rc) in mspro_block_probe()
1264 rc = sysfs_create_group(&card->dev.kobj, &msb->attr_group); in mspro_block_probe()
1265 if (rc) in mspro_block_probe()
1268 rc = mspro_block_init_disk(card); in mspro_block_probe()
1269 if (!rc) { in mspro_block_probe()
1281 return rc; in mspro_block_probe()
1329 int rc = 0; in mspro_block_resume() local
1341 rc = -ENOMEM; in mspro_block_resume()
1347 rc = mspro_block_init_card(card); in mspro_block_resume()
1348 if (rc) in mspro_block_resume()
1376 return rc; in mspro_block_resume()
1407 int rc = -ENOMEM; in mspro_block_init() local
1409 rc = register_blkdev(major, DRIVER_NAME); in mspro_block_init()
1410 if (rc < 0) { in mspro_block_init()
1412 "major %d, error %d\n", major, rc); in mspro_block_init()
1413 return rc; in mspro_block_init()
1416 major = rc; in mspro_block_init()
1418 rc = memstick_register_driver(&mspro_block_driver); in mspro_block_init()
1419 if (rc) in mspro_block_init()
1421 return rc; in mspro_block_init()