Skip to content

Commit

Permalink
mei: fix kernel-doc warnings
Browse files Browse the repository at this point in the history
Add missed parameters descriptions and return values descriptions

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alexander Usyskin authored and Greg Kroah-Hartman committed Sep 29, 2014
1 parent a8605ea commit ce23139
Show file tree
Hide file tree
Showing 14 changed files with 231 additions and 67 deletions.
5 changes: 3 additions & 2 deletions drivers/misc/mei/amthif.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ void mei_amthif_reset_params(struct mei_device *dev)
*
* @dev: the device structure
*
* Return: 0 on success, <0 on failure.
*/
int mei_amthif_host_init(struct mei_device *dev)
{
Expand Down Expand Up @@ -352,7 +353,7 @@ int mei_amthif_write(struct mei_device *dev, struct mei_cl_cb *cb)
return mei_amthif_send_cmd(dev, cb);
}
/**
* mei_amthif_run_next_cmd
* mei_amthif_run_next_cmd - send next amt command from queue
*
* @dev: the device structure
*/
Expand Down Expand Up @@ -496,7 +497,7 @@ int mei_amthif_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
}

/**
* mei_amthif_irq_read_message - read routine after ISR to
* mei_amthif_irq_read_msg - read routine after ISR to
* handle the read amthif message
*
* @dev: the device structure
Expand Down
6 changes: 6 additions & 0 deletions drivers/misc/mei/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ int mei_io_cb_alloc_resp_buf(struct mei_cl_cb *cb, size_t length)
* mei_cl_flush_queues - flushes queue lists belonging to cl.
*
* @cl: host client
*
* Return: 0 on success, -EINVAL if cl or cl->dev is NULL.
*/
int mei_cl_flush_queues(struct mei_cl *cl)
{
Expand Down Expand Up @@ -402,6 +404,8 @@ int mei_cl_link(struct mei_cl *cl, int id)
* mei_cl_unlink - remove me_cl from the list
*
* @cl: host client
*
* Return: always 0
*/
int mei_cl_unlink(struct mei_cl *cl)
{
Expand Down Expand Up @@ -756,6 +760,7 @@ int mei_cl_flow_ctrl_reduce(struct mei_cl *cl)
* mei_cl_read_start - the start read client message function.
*
* @cl: host client
* @length: number of bytes to read
*
* Return: 0 on success, <0 on failure.
*/
Expand Down Expand Up @@ -916,6 +921,7 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
*
* @cl: host client
* @cb: write callback with filled data
* @blocking: block until completed
*
* Return: number of bytes sent on success, <0 on failure.
*/
Expand Down
2 changes: 2 additions & 0 deletions drivers/misc/mei/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ void mei_dbgfs_deregister(struct mei_device *dev)
*
* @dev: the mei device structure
* @name: the mei device name
*
* Return: 0 on success, <0 on failure.
*/
int mei_dbgfs_register(struct mei_device *dev, const char *name)
{
Expand Down
2 changes: 2 additions & 0 deletions drivers/misc/mei/hbm.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ void mei_hbm_cl_hdr(struct mei_cl *cl, u8 hbm_cmd, void *buf, size_t len)
* @cl: client
* @hbm_cmd: host bus message command
* @len: buffer length
*
* Return: 0 on success, <0 on failure.
*/
static inline
int mei_hbm_cl_write(struct mei_device *dev,
Expand Down
41 changes: 34 additions & 7 deletions drivers/misc/mei/hw-me.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static inline u32 mei_hcsr_read(const struct mei_me_hw *hw)
* and ignores the H_IS bit for it is write-one-to-zero.
*
* @hw: the me hardware structure
* @hcsr: new register value
*/
static inline void mei_hcsr_set(struct mei_me_hw *hw, u32 hcsr)
{
Expand All @@ -106,6 +107,8 @@ static inline void mei_hcsr_set(struct mei_me_hw *hw, u32 hcsr)
*
* @dev: mei device
* @fw_status: fw status register values
*
* Return: 0 on success, error otherwise
*/
static int mei_me_fw_status(struct mei_device *dev,
struct mei_fw_status *fw_status)
Expand Down Expand Up @@ -149,8 +152,9 @@ static void mei_me_hw_config(struct mei_device *dev)
* mei_me_pg_state - translate internal pg state
* to the mei power gating state
*
* @hw - me hardware
* returns: MEI_PG_OFF if aliveness is on and MEI_PG_ON otherwise
* @dev: mei device
*
* Return: MEI_PG_OFF if aliveness is on and MEI_PG_ON otherwise
*/
static inline enum mei_pg_state mei_me_pg_state(struct mei_device *dev)
{
Expand All @@ -160,7 +164,7 @@ static inline enum mei_pg_state mei_me_pg_state(struct mei_device *dev)
}

/**
* mei_clear_interrupts - clear and stop interrupts
* mei_me_intr_clear - clear and stop interrupts
*
* @dev: the device structure
*/
Expand All @@ -187,7 +191,7 @@ static void mei_me_intr_enable(struct mei_device *dev)
}

/**
* mei_disable_interrupts - disables mei device interrupts
* mei_me_intr_disable - disables mei device interrupts
*
* @dev: the device structure
*/
Expand Down Expand Up @@ -222,6 +226,8 @@ static void mei_me_hw_reset_release(struct mei_device *dev)
*
* @dev: the device structure
* @intr_enable: if interrupt should be enabled after reset.
*
* Return: always 0
*/
static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
{
Expand Down Expand Up @@ -259,10 +265,8 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
/**
* mei_me_host_set_ready - enable device
*
* @dev - mei device
* returns bool
* @dev: mei device
*/

static void mei_me_host_set_ready(struct mei_device *dev)
{
struct mei_me_hw *hw = to_me_hw(dev);
Expand All @@ -271,6 +275,7 @@ static void mei_me_host_set_ready(struct mei_device *dev)
hw->host_hw_state |= H_IE | H_IG | H_RDY;
mei_hcsr_set(hw, hw->host_hw_state);
}

/**
* mei_me_host_is_ready - check whether the host has turned ready
*
Expand Down Expand Up @@ -299,6 +304,13 @@ static bool mei_me_hw_is_ready(struct mei_device *dev)
return (hw->me_hw_state & ME_RDY_HRA) == ME_RDY_HRA;
}

/**
* mei_me_hw_ready_wait - wait until the me(hw) has turned ready
* or timeout is reached
*
* @dev: mei device
* Return: 0 on success, error otherwise
*/
static int mei_me_hw_ready_wait(struct mei_device *dev)
{
mutex_unlock(&dev->device_lock);
Expand All @@ -315,6 +327,12 @@ static int mei_me_hw_ready_wait(struct mei_device *dev)
return 0;
}

/**
* mei_me_hw_start - hw start routine
*
* @dev: mei device
* Return: 0 on success, error otherwise
*/
static int mei_me_hw_start(struct mei_device *dev)
{
int ret = mei_me_hw_ready_wait(dev);
Expand Down Expand Up @@ -381,6 +399,13 @@ static int mei_me_hbuf_empty_slots(struct mei_device *dev)
return empty_slots;
}

/**
* mei_me_hbuf_max_len - returns size of hw buffer.
*
* @dev: the device structure
*
* Return: size of hw buffer in bytes
*/
static size_t mei_me_hbuf_max_len(const struct mei_device *dev)
{
return dev->hbuf_depth * sizeof(u32) - sizeof(struct mei_msg_hdr);
Expand Down Expand Up @@ -472,6 +497,8 @@ static int mei_me_count_full_read_slots(struct mei_device *dev)
* @dev: the device structure
* @buffer: message buffer will be written
* @buffer_length: message size will be read
*
* Return: always 0
*/
static int mei_me_read_slots(struct mei_device *dev, unsigned char *buffer,
unsigned long buffer_length)
Expand Down
6 changes: 6 additions & 0 deletions drivers/misc/mei/hw-me.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ struct mei_cfg {
#define MEI_ME_RPM_TIMEOUT 500 /* ms */

/**
* struct mei_me_hw - me hw specific data
*
* @cfg: per device generation config and ops
* @mem_addr: io memory address
* @host_hw_state: cached host state
* @me_hw_state: cached me (fw) state
* @pg_state: power gating state
*/
struct mei_me_hw {
const struct mei_cfg *cfg;
Expand Down
Loading

0 comments on commit ce23139

Please sign in to comment.