Skip to content

Commit e40f4c4

Browse files
shinas-marvelldavem330
authored andcommitted
octeon_ep: Solve style issues in control net files
Solve observed style issues for kernel documentation and structure declarations in control net API definitions. Signed-off-by: Shinas Rasheed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1ad04b7 commit e40f4c4

File tree

2 files changed

+76
-63
lines changed

2 files changed

+76
-63
lines changed

drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ int octep_ctrl_net_init(struct octep_device *oct)
122122

123123
int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid)
124124
{
125-
struct octep_ctrl_net_wait_data d = {0};
125+
struct octep_ctrl_net_wait_data d = {};
126126
struct octep_ctrl_net_h2f_req *req = &d.data.req;
127127
int err;
128128

@@ -139,7 +139,7 @@ int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid)
139139
int octep_ctrl_net_set_link_status(struct octep_device *oct, int vfid, bool up,
140140
bool wait_for_response)
141141
{
142-
struct octep_ctrl_net_wait_data d = {0};
142+
struct octep_ctrl_net_wait_data d = {};
143143
struct octep_ctrl_net_h2f_req *req = &d.data.req;
144144

145145
init_send_req(&d.msg, req, state_sz, vfid);
@@ -154,7 +154,7 @@ int octep_ctrl_net_set_link_status(struct octep_device *oct, int vfid, bool up,
154154
int octep_ctrl_net_set_rx_state(struct octep_device *oct, int vfid, bool up,
155155
bool wait_for_response)
156156
{
157-
struct octep_ctrl_net_wait_data d = {0};
157+
struct octep_ctrl_net_wait_data d = {};
158158
struct octep_ctrl_net_h2f_req *req = &d.data.req;
159159

160160
init_send_req(&d.msg, req, state_sz, vfid);
@@ -168,7 +168,7 @@ int octep_ctrl_net_set_rx_state(struct octep_device *oct, int vfid, bool up,
168168

169169
int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr)
170170
{
171-
struct octep_ctrl_net_wait_data d = {0};
171+
struct octep_ctrl_net_wait_data d = {};
172172
struct octep_ctrl_net_h2f_req *req = &d.data.req;
173173
int err;
174174

@@ -187,7 +187,7 @@ int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr)
187187
int octep_ctrl_net_set_mac_addr(struct octep_device *oct, int vfid, u8 *addr,
188188
bool wait_for_response)
189189
{
190-
struct octep_ctrl_net_wait_data d = {0};
190+
struct octep_ctrl_net_wait_data d = {};
191191
struct octep_ctrl_net_h2f_req *req = &d.data.req;
192192

193193
init_send_req(&d.msg, req, mac_sz, vfid);
@@ -201,7 +201,7 @@ int octep_ctrl_net_set_mac_addr(struct octep_device *oct, int vfid, u8 *addr,
201201
int octep_ctrl_net_set_mtu(struct octep_device *oct, int vfid, int mtu,
202202
bool wait_for_response)
203203
{
204-
struct octep_ctrl_net_wait_data d = {0};
204+
struct octep_ctrl_net_wait_data d = {};
205205
struct octep_ctrl_net_h2f_req *req = &d.data.req;
206206

207207
init_send_req(&d.msg, req, mtu_sz, vfid);
@@ -216,7 +216,7 @@ int octep_ctrl_net_get_if_stats(struct octep_device *oct, int vfid,
216216
struct octep_iface_rx_stats *rx_stats,
217217
struct octep_iface_tx_stats *tx_stats)
218218
{
219-
struct octep_ctrl_net_wait_data d = {0};
219+
struct octep_ctrl_net_wait_data d = {};
220220
struct octep_ctrl_net_h2f_req *req = &d.data.req;
221221
struct octep_ctrl_net_h2f_resp *resp;
222222
int err;
@@ -236,7 +236,7 @@ int octep_ctrl_net_get_if_stats(struct octep_device *oct, int vfid,
236236
int octep_ctrl_net_get_link_info(struct octep_device *oct, int vfid,
237237
struct octep_iface_link_info *link_info)
238238
{
239-
struct octep_ctrl_net_wait_data d = {0};
239+
struct octep_ctrl_net_wait_data d = {};
240240
struct octep_ctrl_net_h2f_req *req = &d.data.req;
241241
struct octep_ctrl_net_h2f_resp *resp;
242242
int err;
@@ -262,7 +262,7 @@ int octep_ctrl_net_set_link_info(struct octep_device *oct, int vfid,
262262
struct octep_iface_link_info *link_info,
263263
bool wait_for_response)
264264
{
265-
struct octep_ctrl_net_wait_data d = {0};
265+
struct octep_ctrl_net_wait_data d = {};
266266
struct octep_ctrl_net_h2f_req *req = &d.data.req;
267267

268268
init_send_req(&d.msg, req, link_info_sz, vfid);
@@ -331,8 +331,8 @@ static int process_mbox_notify(struct octep_device *oct,
331331
void octep_ctrl_net_recv_fw_messages(struct octep_device *oct)
332332
{
333333
static u16 msg_sz = sizeof(union octep_ctrl_net_max_data);
334-
union octep_ctrl_net_max_data data = {0};
335-
struct octep_ctrl_mbox_msg msg = {0};
334+
union octep_ctrl_net_max_data data = {};
335+
struct octep_ctrl_mbox_msg msg = {};
336336
int ret;
337337

338338
msg.hdr.s.sz = msg_sz;
@@ -356,7 +356,7 @@ void octep_ctrl_net_recv_fw_messages(struct octep_device *oct)
356356
int octep_ctrl_net_get_info(struct octep_device *oct, int vfid,
357357
struct octep_fw_info *info)
358358
{
359-
struct octep_ctrl_net_wait_data d = {0};
359+
struct octep_ctrl_net_wait_data d = {};
360360
struct octep_ctrl_net_h2f_resp *resp;
361361
struct octep_ctrl_net_h2f_req *req;
362362
int err;

drivers/net/ethernet/marvell/octeon_ep/octep_ctrl_net.h

Lines changed: 64 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -218,111 +218,121 @@ struct octep_ctrl_net_wait_data {
218218
} data;
219219
};
220220

221-
/** Initialize data for ctrl net.
221+
/**
222+
* octep_ctrl_net_init() - Initialize data for ctrl net.
222223
*
223-
* @param oct: non-null pointer to struct octep_device.
224+
* @oct: non-null pointer to struct octep_device.
224225
*
225226
* return value: 0 on success, -errno on error.
226227
*/
227228
int octep_ctrl_net_init(struct octep_device *oct);
228229

229-
/** Get link status from firmware.
230+
/**
231+
* octep_ctrl_net_get_link_status() - Get link status from firmware.
230232
*
231-
* @param oct: non-null pointer to struct octep_device.
232-
* @param vfid: Index of virtual function.
233+
* @oct: non-null pointer to struct octep_device.
234+
* @vfid: Index of virtual function.
233235
*
234236
* return value: link status 0=down, 1=up.
235237
*/
236238
int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid);
237239

238-
/** Set link status in firmware.
240+
/**
241+
* octep_ctrl_net_set_link_status() - Set link status in firmware.
239242
*
240-
* @param oct: non-null pointer to struct octep_device.
241-
* @param vfid: Index of virtual function.
242-
* @param up: boolean status.
243-
* @param wait_for_response: poll for response.
243+
* @oct: non-null pointer to struct octep_device.
244+
* @vfid: Index of virtual function.
245+
* @up: boolean status.
246+
* @wait_for_response: poll for response.
244247
*
245248
* return value: 0 on success, -errno on failure
246249
*/
247250
int octep_ctrl_net_set_link_status(struct octep_device *oct, int vfid, bool up,
248251
bool wait_for_response);
249252

250-
/** Set rx state in firmware.
253+
/**
254+
* octep_ctrl_net_set_rx_state() - Set rx state in firmware.
251255
*
252-
* @param oct: non-null pointer to struct octep_device.
253-
* @param vfid: Index of virtual function.
254-
* @param up: boolean status.
255-
* @param wait_for_response: poll for response.
256+
* @oct: non-null pointer to struct octep_device.
257+
* @vfid: Index of virtual function.
258+
* @up: boolean status.
259+
* @wait_for_response: poll for response.
256260
*
257261
* return value: 0 on success, -errno on failure.
258262
*/
259263
int octep_ctrl_net_set_rx_state(struct octep_device *oct, int vfid, bool up,
260264
bool wait_for_response);
261265

262-
/** Get mac address from firmware.
266+
/**
267+
* octep_ctrl_net_get_mac_addr() - Get mac address from firmware.
263268
*
264-
* @param oct: non-null pointer to struct octep_device.
265-
* @param vfid: Index of virtual function.
266-
* @param addr: non-null pointer to mac address.
269+
* @oct: non-null pointer to struct octep_device.
270+
* @vfid: Index of virtual function.
271+
* @addr: non-null pointer to mac address.
267272
*
268273
* return value: 0 on success, -errno on failure.
269274
*/
270275
int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr);
271276

272-
/** Set mac address in firmware.
277+
/**
278+
* octep_ctrl_net_set_mac_addr() - Set mac address in firmware.
273279
*
274-
* @param oct: non-null pointer to struct octep_device.
275-
* @param vfid: Index of virtual function.
276-
* @param addr: non-null pointer to mac address.
277-
* @param wait_for_response: poll for response.
280+
* @oct: non-null pointer to struct octep_device.
281+
* @vfid: Index of virtual function.
282+
* @addr: non-null pointer to mac address.
283+
* @wait_for_response: poll for response.
278284
*
279285
* return value: 0 on success, -errno on failure.
280286
*/
281287
int octep_ctrl_net_set_mac_addr(struct octep_device *oct, int vfid, u8 *addr,
282288
bool wait_for_response);
283289

284-
/** Set mtu in firmware.
290+
/**
291+
* octep_ctrl_net_set_mtu() - Set mtu in firmware.
285292
*
286-
* @param oct: non-null pointer to struct octep_device.
287-
* @param vfid: Index of virtual function.
288-
* @param mtu: mtu.
289-
* @param wait_for_response: poll for response.
293+
* @oct: non-null pointer to struct octep_device.
294+
* @vfid: Index of virtual function.
295+
* @mtu: mtu.
296+
* @wait_for_response: poll for response.
290297
*
291298
* return value: 0 on success, -errno on failure.
292299
*/
293300
int octep_ctrl_net_set_mtu(struct octep_device *oct, int vfid, int mtu,
294301
bool wait_for_response);
295302

296-
/** Get interface statistics from firmware.
303+
/**
304+
* octep_ctrl_net_get_if_stats() - Get interface statistics from firmware.
297305
*
298-
* @param oct: non-null pointer to struct octep_device.
299-
* @param vfid: Index of virtual function.
300-
* @param rx_stats: non-null pointer struct octep_iface_rx_stats.
301-
* @param tx_stats: non-null pointer struct octep_iface_tx_stats.
306+
* @oct: non-null pointer to struct octep_device.
307+
* @vfid: Index of virtual function.
308+
* @rx_stats: non-null pointer struct octep_iface_rx_stats.
309+
* @tx_stats: non-null pointer struct octep_iface_tx_stats.
302310
*
303311
* return value: 0 on success, -errno on failure.
304312
*/
305313
int octep_ctrl_net_get_if_stats(struct octep_device *oct, int vfid,
306314
struct octep_iface_rx_stats *rx_stats,
307315
struct octep_iface_tx_stats *tx_stats);
308316

309-
/** Get link info from firmware.
317+
/**
318+
* octep_ctrl_net_get_link_info() - Get link info from firmware.
310319
*
311-
* @param oct: non-null pointer to struct octep_device.
312-
* @param vfid: Index of virtual function.
313-
* @param link_info: non-null pointer to struct octep_iface_link_info.
320+
* @oct: non-null pointer to struct octep_device.
321+
* @vfid: Index of virtual function.
322+
* @link_info: non-null pointer to struct octep_iface_link_info.
314323
*
315324
* return value: 0 on success, -errno on failure.
316325
*/
317326
int octep_ctrl_net_get_link_info(struct octep_device *oct, int vfid,
318327
struct octep_iface_link_info *link_info);
319328

320-
/** Set link info in firmware.
329+
/**
330+
* octep_ctrl_net_set_link_info() - Set link info in firmware.
321331
*
322-
* @param oct: non-null pointer to struct octep_device.
323-
* @param vfid: Index of virtual function.
324-
* @param link_info: non-null pointer to struct octep_iface_link_info.
325-
* @param wait_for_response: poll for response.
332+
* @oct: non-null pointer to struct octep_device.
333+
* @vfid: Index of virtual function.
334+
* @link_info: non-null pointer to struct octep_iface_link_info.
335+
* @wait_for_response: poll for response.
326336
*
327337
* return value: 0 on success, -errno on failure.
328338
*/
@@ -331,26 +341,29 @@ int octep_ctrl_net_set_link_info(struct octep_device *oct,
331341
struct octep_iface_link_info *link_info,
332342
bool wait_for_response);
333343

334-
/** Poll for firmware messages and process them.
344+
/**
345+
* octep_ctrl_net_recv_fw_messages() - Poll for firmware messages and process them.
335346
*
336-
* @param oct: non-null pointer to struct octep_device.
347+
* @oct: non-null pointer to struct octep_device.
337348
*/
338349
void octep_ctrl_net_recv_fw_messages(struct octep_device *oct);
339350

340-
/** Get info from firmware.
351+
/**
352+
* octep_ctrl_net_get_info() - Get info from firmware.
341353
*
342-
* @param oct: non-null pointer to struct octep_device.
343-
* @param vfid: Index of virtual function.
344-
* @param info: non-null pointer to struct octep_fw_info.
354+
* @oct: non-null pointer to struct octep_device.
355+
* @vfid: Index of virtual function.
356+
* @info: non-null pointer to struct octep_fw_info.
345357
*
346358
* return value: 0 on success, -errno on failure.
347359
*/
348360
int octep_ctrl_net_get_info(struct octep_device *oct, int vfid,
349361
struct octep_fw_info *info);
350362

351-
/** Uninitialize data for ctrl net.
363+
/**
364+
* octep_ctrl_net_uninit() - Uninitialize data for ctrl net.
352365
*
353-
* @param oct: non-null pointer to struct octep_device.
366+
* @oct: non-null pointer to struct octep_device.
354367
*
355368
* return value: 0 on success, -errno on error.
356369
*/

0 commit comments

Comments
 (0)