Lines Matching refs:rc
53 int rc;
61 rc = ocxl_context_alloc(&ctx, info->afu, inode->i_mapping);
62 if (rc) {
64 return rc;
137 int rc = ocxl_link_update_pe(ctx->afu->fn->link,
140 if (rc)
141 return rc;
206 long rc;
221 rc = afu_ioctl_attach(ctx,
226 rc = ocxl_afu_irq_alloc(ctx, &irq_id);
227 if (!rc) {
229 rc = copy_to_user((u64 __user *) args, &irq_offset,
231 if (rc) {
239 rc = copy_from_user(&irq_offset, (u64 __user *) args,
241 if (rc)
244 rc = ocxl_afu_irq_free(ctx, irq_id);
248 rc = copy_from_user(&irq_fd, (u64 __user *) args,
250 if (rc)
258 rc = ocxl_irq_set_handler(ctx, irq_id, irq_handler, irq_free, ev_ctx);
259 if (rc)
264 rc = afu_ioctl_get_metadata(ctx,
270 rc = afu_ioctl_enable_p9_wait(ctx,
276 rc = afu_ioctl_get_features(ctx,
281 rc = -EINVAL;
283 return rc;
399 ssize_t rc;
452 rc = used;
453 return rc;
459 int rc;
462 rc = ocxl_context_detach(ctx);
467 if (rc != -EBUSY)
494 int rc;
497 rc = cdev_add(&info->cdev, info->dev.devt, 1);
498 if (rc) {
499 dev_err(&info->dev, "Unable to add afu char device: %d\n", rc);
500 return rc;
524 int rc;
547 rc = dev_set_name(&info->dev, "%s.%s.%hhu",
549 if (rc)
552 rc = device_register(&info->dev);
553 if (rc) {
556 return rc;
559 rc = ocxl_sysfs_register_afu(info);
560 if (rc)
563 rc = ocxl_file_make_visible(info);
564 if (rc)
575 return rc;
580 return rc;
598 int rc;
602 rc = alloc_chrdev_region(&ocxl_dev, 0, OCXL_NUM_MINORS, "ocxl");
603 if (rc) {
604 pr_err("Unable to allocate ocxl major number: %d\n", rc);
605 return rc;
608 rc = class_register(&ocxl_class);
609 if (rc) {
612 return rc;