static int mon_send_reply(struct mon_msg *monmsg, struct mon_private *monpriv) { int rc; P_DEBUG("read, REPLY: pathid = 0x%04X, msgid = 0x%08X, trgcls = " "0x%08X\n\n", monpriv->path->pathid, monmsg->msg.id, monmsg->msg.class); rc = iucv_message_reply(monpriv->path, &monmsg->msg, IUCV_IPRMDATA, NULL, 0); atomic_dec(&monpriv->msglim_count); if (likely(!monmsg->msglim_reached)) { monmsg->pos = 0; monmsg->mca_offset = 0; monpriv->read_index = (monpriv->read_index + 1) % MON_MSGLIM; atomic_dec(&monpriv->read_ready); } else monmsg->replied_msglim = 1; if (rc) { P_ERROR("read, IUCV reply failed with rc = %i\n\n", rc); return -EIO; } return 0; }
static int mon_send_reply(struct mon_msg *monmsg, struct mon_private *monpriv) { int rc; rc = iucv_message_reply(monpriv->path, &monmsg->msg, IUCV_IPRMDATA, NULL, 0); atomic_dec(&monpriv->msglim_count); if (likely(!monmsg->msglim_reached)) { monmsg->pos = 0; monmsg->mca_offset = 0; monpriv->read_index = (monpriv->read_index + 1) % MON_MSGLIM; atomic_dec(&monpriv->read_ready); } else monmsg->replied_msglim = 1; if (rc) { pr_err("Reading monitor data failed with rc=%i\n", rc); return -EIO; } return 0; }