Lines Matching refs:err
66 int err; in nsim_dev_dummy_fmsg_put() local
69 err = devlink_fmsg_bool_pair_put(fmsg, "test_bool", true); in nsim_dev_dummy_fmsg_put()
70 if (err) in nsim_dev_dummy_fmsg_put()
71 return err; in nsim_dev_dummy_fmsg_put()
72 err = devlink_fmsg_u8_pair_put(fmsg, "test_u8", 1); in nsim_dev_dummy_fmsg_put()
73 if (err) in nsim_dev_dummy_fmsg_put()
74 return err; in nsim_dev_dummy_fmsg_put()
75 err = devlink_fmsg_u32_pair_put(fmsg, "test_u32", 3); in nsim_dev_dummy_fmsg_put()
76 if (err) in nsim_dev_dummy_fmsg_put()
77 return err; in nsim_dev_dummy_fmsg_put()
78 err = devlink_fmsg_u64_pair_put(fmsg, "test_u64", 4); in nsim_dev_dummy_fmsg_put()
79 if (err) in nsim_dev_dummy_fmsg_put()
80 return err; in nsim_dev_dummy_fmsg_put()
81 err = devlink_fmsg_string_pair_put(fmsg, "test_string", "somestring"); in nsim_dev_dummy_fmsg_put()
82 if (err) in nsim_dev_dummy_fmsg_put()
83 return err; in nsim_dev_dummy_fmsg_put()
89 err = devlink_fmsg_binary_pair_put(fmsg, "test_binary", binary, binary_len); in nsim_dev_dummy_fmsg_put()
91 if (err) in nsim_dev_dummy_fmsg_put()
92 return err; in nsim_dev_dummy_fmsg_put()
94 err = devlink_fmsg_pair_nest_start(fmsg, "test_nest"); in nsim_dev_dummy_fmsg_put()
95 if (err) in nsim_dev_dummy_fmsg_put()
96 return err; in nsim_dev_dummy_fmsg_put()
97 err = devlink_fmsg_obj_nest_start(fmsg); in nsim_dev_dummy_fmsg_put()
98 if (err) in nsim_dev_dummy_fmsg_put()
99 return err; in nsim_dev_dummy_fmsg_put()
100 err = devlink_fmsg_bool_pair_put(fmsg, "nested_test_bool", false); in nsim_dev_dummy_fmsg_put()
101 if (err) in nsim_dev_dummy_fmsg_put()
102 return err; in nsim_dev_dummy_fmsg_put()
103 err = devlink_fmsg_u8_pair_put(fmsg, "nested_test_u8", false); in nsim_dev_dummy_fmsg_put()
104 if (err) in nsim_dev_dummy_fmsg_put()
105 return err; in nsim_dev_dummy_fmsg_put()
106 err = devlink_fmsg_obj_nest_end(fmsg); in nsim_dev_dummy_fmsg_put()
107 if (err) in nsim_dev_dummy_fmsg_put()
108 return err; in nsim_dev_dummy_fmsg_put()
109 err = devlink_fmsg_pair_nest_end(fmsg); in nsim_dev_dummy_fmsg_put()
110 if (err) in nsim_dev_dummy_fmsg_put()
111 return err; in nsim_dev_dummy_fmsg_put()
113 err = devlink_fmsg_arr_pair_nest_start(fmsg, "test_bool_array"); in nsim_dev_dummy_fmsg_put()
114 if (err) in nsim_dev_dummy_fmsg_put()
115 return err; in nsim_dev_dummy_fmsg_put()
117 err = devlink_fmsg_bool_put(fmsg, true); in nsim_dev_dummy_fmsg_put()
118 if (err) in nsim_dev_dummy_fmsg_put()
119 return err; in nsim_dev_dummy_fmsg_put()
121 err = devlink_fmsg_arr_pair_nest_end(fmsg); in nsim_dev_dummy_fmsg_put()
122 if (err) in nsim_dev_dummy_fmsg_put()
123 return err; in nsim_dev_dummy_fmsg_put()
125 err = devlink_fmsg_arr_pair_nest_start(fmsg, "test_u8_array"); in nsim_dev_dummy_fmsg_put()
126 if (err) in nsim_dev_dummy_fmsg_put()
127 return err; in nsim_dev_dummy_fmsg_put()
129 err = devlink_fmsg_u8_put(fmsg, i); in nsim_dev_dummy_fmsg_put()
130 if (err) in nsim_dev_dummy_fmsg_put()
131 return err; in nsim_dev_dummy_fmsg_put()
133 err = devlink_fmsg_arr_pair_nest_end(fmsg); in nsim_dev_dummy_fmsg_put()
134 if (err) in nsim_dev_dummy_fmsg_put()
135 return err; in nsim_dev_dummy_fmsg_put()
137 err = devlink_fmsg_arr_pair_nest_start(fmsg, "test_u32_array"); in nsim_dev_dummy_fmsg_put()
138 if (err) in nsim_dev_dummy_fmsg_put()
139 return err; in nsim_dev_dummy_fmsg_put()
141 err = devlink_fmsg_u32_put(fmsg, i); in nsim_dev_dummy_fmsg_put()
142 if (err) in nsim_dev_dummy_fmsg_put()
143 return err; in nsim_dev_dummy_fmsg_put()
145 err = devlink_fmsg_arr_pair_nest_end(fmsg); in nsim_dev_dummy_fmsg_put()
146 if (err) in nsim_dev_dummy_fmsg_put()
147 return err; in nsim_dev_dummy_fmsg_put()
149 err = devlink_fmsg_arr_pair_nest_start(fmsg, "test_u64_array"); in nsim_dev_dummy_fmsg_put()
150 if (err) in nsim_dev_dummy_fmsg_put()
151 return err; in nsim_dev_dummy_fmsg_put()
153 err = devlink_fmsg_u64_put(fmsg, i); in nsim_dev_dummy_fmsg_put()
154 if (err) in nsim_dev_dummy_fmsg_put()
155 return err; in nsim_dev_dummy_fmsg_put()
157 err = devlink_fmsg_arr_pair_nest_end(fmsg); in nsim_dev_dummy_fmsg_put()
158 if (err) in nsim_dev_dummy_fmsg_put()
159 return err; in nsim_dev_dummy_fmsg_put()
161 err = devlink_fmsg_arr_pair_nest_start(fmsg, "test_array_of_objects"); in nsim_dev_dummy_fmsg_put()
162 if (err) in nsim_dev_dummy_fmsg_put()
163 return err; in nsim_dev_dummy_fmsg_put()
165 err = devlink_fmsg_obj_nest_start(fmsg); in nsim_dev_dummy_fmsg_put()
166 if (err) in nsim_dev_dummy_fmsg_put()
167 return err; in nsim_dev_dummy_fmsg_put()
168 err = devlink_fmsg_bool_pair_put(fmsg, in nsim_dev_dummy_fmsg_put()
171 if (err) in nsim_dev_dummy_fmsg_put()
172 return err; in nsim_dev_dummy_fmsg_put()
173 err = devlink_fmsg_u8_pair_put(fmsg, in nsim_dev_dummy_fmsg_put()
176 if (err) in nsim_dev_dummy_fmsg_put()
177 return err; in nsim_dev_dummy_fmsg_put()
178 err = devlink_fmsg_obj_nest_end(fmsg); in nsim_dev_dummy_fmsg_put()
179 if (err) in nsim_dev_dummy_fmsg_put()
180 return err; in nsim_dev_dummy_fmsg_put()
192 int err; in nsim_dev_dummy_reporter_dump() local
195 err = devlink_fmsg_string_pair_put(fmsg, "break_message", in nsim_dev_dummy_reporter_dump()
197 if (err) in nsim_dev_dummy_reporter_dump()
198 return err; in nsim_dev_dummy_reporter_dump()
209 int err; in nsim_dev_dummy_reporter_diagnose() local
212 err = devlink_fmsg_string_pair_put(fmsg, in nsim_dev_dummy_reporter_diagnose()
215 if (err) in nsim_dev_dummy_reporter_diagnose()
216 return err; in nsim_dev_dummy_reporter_diagnose()
236 int err; in nsim_dev_health_break_write() local
243 err = -EFAULT; in nsim_dev_health_break_write()
251 err = devlink_health_report(health->dummy_reporter, break_msg, &ctx); in nsim_dev_health_break_write()
252 if (err) in nsim_dev_health_break_write()
257 return err ?: count; in nsim_dev_health_break_write()
270 int err; in nsim_dev_health_init() local
284 err = PTR_ERR(health->dummy_reporter); in nsim_dev_health_init()
290 err = PTR_ERR(health->ddir); in nsim_dev_health_init()
309 return err; in nsim_dev_health_init()