Lines Matching refs:ev
61 static void smsg_app_event_free(struct smsg_app_event *ev) in smsg_app_event_free() argument
63 kfree(ev->buf); in smsg_app_event_free()
64 kfree(ev); in smsg_app_event_free()
70 struct smsg_app_event *ev; in smsg_app_event_alloc() local
72 ev = kzalloc(sizeof(*ev), GFP_ATOMIC); in smsg_app_event_alloc()
73 if (!ev) in smsg_app_event_alloc()
76 ev->buf = kzalloc(ENV_SENDER_LEN + ENV_PREFIX_LEN + in smsg_app_event_alloc()
78 if (!ev->buf) { in smsg_app_event_alloc()
79 kfree(ev); in smsg_app_event_alloc()
84 ev->envp[0] = ev->buf; in smsg_app_event_alloc()
85 ev->envp[1] = ev->envp[0] + ENV_SENDER_LEN; in smsg_app_event_alloc()
86 ev->envp[2] = ev->envp[1] + ENV_PREFIX_LEN; in smsg_app_event_alloc()
87 ev->envp[3] = NULL; in smsg_app_event_alloc()
90 snprintf(ev->envp[0], ENV_SENDER_LEN, ENV_SENDER_STR "%s", from); in smsg_app_event_alloc()
91 snprintf(ev->envp[1], ENV_PREFIX_LEN, ENV_PREFIX_STR "%s", SMSG_PREFIX); in smsg_app_event_alloc()
92 snprintf(ev->envp[2], ENV_TEXT_LEN(msg), ENV_TEXT_STR "%s", msg); in smsg_app_event_alloc()
94 return ev; in smsg_app_event_alloc()