Commit e40f4c4e authored by Shinas Rasheed's avatar Shinas Rasheed Committed by David S. Miller

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: default avatarShinas Rasheed <srasheed@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ad04b79
...@@ -122,7 +122,7 @@ int octep_ctrl_net_init(struct octep_device *oct) ...@@ -122,7 +122,7 @@ int octep_ctrl_net_init(struct octep_device *oct)
int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid) int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_req *req = &d.data.req; struct octep_ctrl_net_h2f_req *req = &d.data.req;
int err; int err;
...@@ -139,7 +139,7 @@ int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid) ...@@ -139,7 +139,7 @@ int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid)
int octep_ctrl_net_set_link_status(struct octep_device *oct, int vfid, bool up, int octep_ctrl_net_set_link_status(struct octep_device *oct, int vfid, bool up,
bool wait_for_response) bool wait_for_response)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_req *req = &d.data.req; struct octep_ctrl_net_h2f_req *req = &d.data.req;
init_send_req(&d.msg, req, state_sz, vfid); 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, ...@@ -154,7 +154,7 @@ int octep_ctrl_net_set_link_status(struct octep_device *oct, int vfid, bool up,
int octep_ctrl_net_set_rx_state(struct octep_device *oct, int vfid, bool up, int octep_ctrl_net_set_rx_state(struct octep_device *oct, int vfid, bool up,
bool wait_for_response) bool wait_for_response)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_req *req = &d.data.req; struct octep_ctrl_net_h2f_req *req = &d.data.req;
init_send_req(&d.msg, req, state_sz, vfid); 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, ...@@ -168,7 +168,7 @@ int octep_ctrl_net_set_rx_state(struct octep_device *oct, int vfid, bool up,
int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr) int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_req *req = &d.data.req; struct octep_ctrl_net_h2f_req *req = &d.data.req;
int err; int err;
...@@ -187,7 +187,7 @@ int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr) ...@@ -187,7 +187,7 @@ int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr)
int octep_ctrl_net_set_mac_addr(struct octep_device *oct, int vfid, u8 *addr, int octep_ctrl_net_set_mac_addr(struct octep_device *oct, int vfid, u8 *addr,
bool wait_for_response) bool wait_for_response)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_req *req = &d.data.req; struct octep_ctrl_net_h2f_req *req = &d.data.req;
init_send_req(&d.msg, req, mac_sz, vfid); 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, ...@@ -201,7 +201,7 @@ int octep_ctrl_net_set_mac_addr(struct octep_device *oct, int vfid, u8 *addr,
int octep_ctrl_net_set_mtu(struct octep_device *oct, int vfid, int mtu, int octep_ctrl_net_set_mtu(struct octep_device *oct, int vfid, int mtu,
bool wait_for_response) bool wait_for_response)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_req *req = &d.data.req; struct octep_ctrl_net_h2f_req *req = &d.data.req;
init_send_req(&d.msg, req, mtu_sz, vfid); 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, ...@@ -216,7 +216,7 @@ int octep_ctrl_net_get_if_stats(struct octep_device *oct, int vfid,
struct octep_iface_rx_stats *rx_stats, struct octep_iface_rx_stats *rx_stats,
struct octep_iface_tx_stats *tx_stats) struct octep_iface_tx_stats *tx_stats)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_req *req = &d.data.req; struct octep_ctrl_net_h2f_req *req = &d.data.req;
struct octep_ctrl_net_h2f_resp *resp; struct octep_ctrl_net_h2f_resp *resp;
int err; int err;
...@@ -236,7 +236,7 @@ int octep_ctrl_net_get_if_stats(struct octep_device *oct, int vfid, ...@@ -236,7 +236,7 @@ int octep_ctrl_net_get_if_stats(struct octep_device *oct, int vfid,
int octep_ctrl_net_get_link_info(struct octep_device *oct, int vfid, int octep_ctrl_net_get_link_info(struct octep_device *oct, int vfid,
struct octep_iface_link_info *link_info) struct octep_iface_link_info *link_info)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_req *req = &d.data.req; struct octep_ctrl_net_h2f_req *req = &d.data.req;
struct octep_ctrl_net_h2f_resp *resp; struct octep_ctrl_net_h2f_resp *resp;
int err; int err;
...@@ -262,7 +262,7 @@ int octep_ctrl_net_set_link_info(struct octep_device *oct, int vfid, ...@@ -262,7 +262,7 @@ int octep_ctrl_net_set_link_info(struct octep_device *oct, int vfid,
struct octep_iface_link_info *link_info, struct octep_iface_link_info *link_info,
bool wait_for_response) bool wait_for_response)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_req *req = &d.data.req; struct octep_ctrl_net_h2f_req *req = &d.data.req;
init_send_req(&d.msg, req, link_info_sz, vfid); init_send_req(&d.msg, req, link_info_sz, vfid);
...@@ -331,8 +331,8 @@ static int process_mbox_notify(struct octep_device *oct, ...@@ -331,8 +331,8 @@ static int process_mbox_notify(struct octep_device *oct,
void octep_ctrl_net_recv_fw_messages(struct octep_device *oct) void octep_ctrl_net_recv_fw_messages(struct octep_device *oct)
{ {
static u16 msg_sz = sizeof(union octep_ctrl_net_max_data); static u16 msg_sz = sizeof(union octep_ctrl_net_max_data);
union octep_ctrl_net_max_data data = {0}; union octep_ctrl_net_max_data data = {};
struct octep_ctrl_mbox_msg msg = {0}; struct octep_ctrl_mbox_msg msg = {};
int ret; int ret;
msg.hdr.s.sz = msg_sz; msg.hdr.s.sz = msg_sz;
...@@ -356,7 +356,7 @@ void octep_ctrl_net_recv_fw_messages(struct octep_device *oct) ...@@ -356,7 +356,7 @@ void octep_ctrl_net_recv_fw_messages(struct octep_device *oct)
int octep_ctrl_net_get_info(struct octep_device *oct, int vfid, int octep_ctrl_net_get_info(struct octep_device *oct, int vfid,
struct octep_fw_info *info) struct octep_fw_info *info)
{ {
struct octep_ctrl_net_wait_data d = {0}; struct octep_ctrl_net_wait_data d = {};
struct octep_ctrl_net_h2f_resp *resp; struct octep_ctrl_net_h2f_resp *resp;
struct octep_ctrl_net_h2f_req *req; struct octep_ctrl_net_h2f_req *req;
int err; int err;
......
...@@ -218,87 +218,95 @@ struct octep_ctrl_net_wait_data { ...@@ -218,87 +218,95 @@ struct octep_ctrl_net_wait_data {
} data; } data;
}; };
/** Initialize data for ctrl net. /**
* octep_ctrl_net_init() - Initialize data for ctrl net.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* *
* return value: 0 on success, -errno on error. * return value: 0 on success, -errno on error.
*/ */
int octep_ctrl_net_init(struct octep_device *oct); int octep_ctrl_net_init(struct octep_device *oct);
/** Get link status from firmware. /**
* octep_ctrl_net_get_link_status() - Get link status from firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* *
* return value: link status 0=down, 1=up. * return value: link status 0=down, 1=up.
*/ */
int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid); int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid);
/** Set link status in firmware. /**
* octep_ctrl_net_set_link_status() - Set link status in firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* @param up: boolean status. * @up: boolean status.
* @param wait_for_response: poll for response. * @wait_for_response: poll for response.
* *
* return value: 0 on success, -errno on failure * return value: 0 on success, -errno on failure
*/ */
int octep_ctrl_net_set_link_status(struct octep_device *oct, int vfid, bool up, int octep_ctrl_net_set_link_status(struct octep_device *oct, int vfid, bool up,
bool wait_for_response); bool wait_for_response);
/** Set rx state in firmware. /**
* octep_ctrl_net_set_rx_state() - Set rx state in firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* @param up: boolean status. * @up: boolean status.
* @param wait_for_response: poll for response. * @wait_for_response: poll for response.
* *
* return value: 0 on success, -errno on failure. * return value: 0 on success, -errno on failure.
*/ */
int octep_ctrl_net_set_rx_state(struct octep_device *oct, int vfid, bool up, int octep_ctrl_net_set_rx_state(struct octep_device *oct, int vfid, bool up,
bool wait_for_response); bool wait_for_response);
/** Get mac address from firmware. /**
* octep_ctrl_net_get_mac_addr() - Get mac address from firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* @param addr: non-null pointer to mac address. * @addr: non-null pointer to mac address.
* *
* return value: 0 on success, -errno on failure. * return value: 0 on success, -errno on failure.
*/ */
int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr); int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr);
/** Set mac address in firmware. /**
* octep_ctrl_net_set_mac_addr() - Set mac address in firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* @param addr: non-null pointer to mac address. * @addr: non-null pointer to mac address.
* @param wait_for_response: poll for response. * @wait_for_response: poll for response.
* *
* return value: 0 on success, -errno on failure. * return value: 0 on success, -errno on failure.
*/ */
int octep_ctrl_net_set_mac_addr(struct octep_device *oct, int vfid, u8 *addr, int octep_ctrl_net_set_mac_addr(struct octep_device *oct, int vfid, u8 *addr,
bool wait_for_response); bool wait_for_response);
/** Set mtu in firmware. /**
* octep_ctrl_net_set_mtu() - Set mtu in firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* @param mtu: mtu. * @mtu: mtu.
* @param wait_for_response: poll for response. * @wait_for_response: poll for response.
* *
* return value: 0 on success, -errno on failure. * return value: 0 on success, -errno on failure.
*/ */
int octep_ctrl_net_set_mtu(struct octep_device *oct, int vfid, int mtu, int octep_ctrl_net_set_mtu(struct octep_device *oct, int vfid, int mtu,
bool wait_for_response); bool wait_for_response);
/** Get interface statistics from firmware. /**
* octep_ctrl_net_get_if_stats() - Get interface statistics from firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* @param rx_stats: non-null pointer struct octep_iface_rx_stats. * @rx_stats: non-null pointer struct octep_iface_rx_stats.
* @param tx_stats: non-null pointer struct octep_iface_tx_stats. * @tx_stats: non-null pointer struct octep_iface_tx_stats.
* *
* return value: 0 on success, -errno on failure. * return value: 0 on success, -errno on failure.
*/ */
...@@ -306,23 +314,25 @@ int octep_ctrl_net_get_if_stats(struct octep_device *oct, int vfid, ...@@ -306,23 +314,25 @@ int octep_ctrl_net_get_if_stats(struct octep_device *oct, int vfid,
struct octep_iface_rx_stats *rx_stats, struct octep_iface_rx_stats *rx_stats,
struct octep_iface_tx_stats *tx_stats); struct octep_iface_tx_stats *tx_stats);
/** Get link info from firmware. /**
* octep_ctrl_net_get_link_info() - Get link info from firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* @param link_info: non-null pointer to struct octep_iface_link_info. * @link_info: non-null pointer to struct octep_iface_link_info.
* *
* return value: 0 on success, -errno on failure. * return value: 0 on success, -errno on failure.
*/ */
int octep_ctrl_net_get_link_info(struct octep_device *oct, int vfid, int octep_ctrl_net_get_link_info(struct octep_device *oct, int vfid,
struct octep_iface_link_info *link_info); struct octep_iface_link_info *link_info);
/** Set link info in firmware. /**
* octep_ctrl_net_set_link_info() - Set link info in firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* @param link_info: non-null pointer to struct octep_iface_link_info. * @link_info: non-null pointer to struct octep_iface_link_info.
* @param wait_for_response: poll for response. * @wait_for_response: poll for response.
* *
* return value: 0 on success, -errno on failure. * return value: 0 on success, -errno on failure.
*/ */
...@@ -331,26 +341,29 @@ int octep_ctrl_net_set_link_info(struct octep_device *oct, ...@@ -331,26 +341,29 @@ int octep_ctrl_net_set_link_info(struct octep_device *oct,
struct octep_iface_link_info *link_info, struct octep_iface_link_info *link_info,
bool wait_for_response); bool wait_for_response);
/** Poll for firmware messages and process them. /**
* octep_ctrl_net_recv_fw_messages() - Poll for firmware messages and process them.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
*/ */
void octep_ctrl_net_recv_fw_messages(struct octep_device *oct); void octep_ctrl_net_recv_fw_messages(struct octep_device *oct);
/** Get info from firmware. /**
* octep_ctrl_net_get_info() - Get info from firmware.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* @param vfid: Index of virtual function. * @vfid: Index of virtual function.
* @param info: non-null pointer to struct octep_fw_info. * @info: non-null pointer to struct octep_fw_info.
* *
* return value: 0 on success, -errno on failure. * return value: 0 on success, -errno on failure.
*/ */
int octep_ctrl_net_get_info(struct octep_device *oct, int vfid, int octep_ctrl_net_get_info(struct octep_device *oct, int vfid,
struct octep_fw_info *info); struct octep_fw_info *info);
/** Uninitialize data for ctrl net. /**
* octep_ctrl_net_uninit() - Uninitialize data for ctrl net.
* *
* @param oct: non-null pointer to struct octep_device. * @oct: non-null pointer to struct octep_device.
* *
* return value: 0 on success, -errno on error. * return value: 0 on success, -errno on error.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment