All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] rpmsg: glink: fix W=1 warnings.
@ 2018-06-18 12:33 Srinivas Kandagatla
  2018-06-18 12:33 ` [PATCH 1/3] rpmsg: glink: correctly annotate intent members Srinivas Kandagatla
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2018-06-18 12:33 UTC (permalink / raw)
  To: ohad, bjorn.andersson
  Cc: linux-remoteproc, linux-arm-msm, linux-kernel, Srinivas Kandagatla

Hi Bjorn,
Here are few patches for warnings which I hit while building
kernel with W=1 flag.

thanks,
srini


Srinivas Kandagatla (3):
  rpmsg: glink: correctly annotate intent members
  rpmsg: glink: Fix various kerneldoc warnings.
  rpmsg: smd: fix kerneldoc warnings

 drivers/rpmsg/qcom_glink_native.c | 45 +++++++++++++++++++++------------------
 drivers/rpmsg/qcom_smd.c          |  9 +++++++-
 2 files changed, 32 insertions(+), 22 deletions(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] rpmsg: glink: correctly annotate intent members
  2018-06-18 12:33 [PATCH 0/3] rpmsg: glink: fix W=1 warnings Srinivas Kandagatla
@ 2018-06-18 12:33 ` Srinivas Kandagatla
  2018-06-18 12:33 ` [PATCH 2/3] rpmsg: glink: Fix various kerneldoc warnings Srinivas Kandagatla
  2018-06-18 12:33 ` [PATCH 3/3] rpmsg: smd: fix " Srinivas Kandagatla
  2 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2018-06-18 12:33 UTC (permalink / raw)
  To: ohad, bjorn.andersson
  Cc: linux-remoteproc, linux-arm-msm, linux-kernel, Srinivas Kandagatla

As intent structure members are not correctly annotated, leading to below warnings

qcom_glink_native.c:614:16: warning: incorrect type in assignment (different base types)
qcom_glink_native.c:614:16:    expected unsigned short [unsigned] [usertype] id
qcom_glink_native.c:614:16:    got restricted __le16 [usertype] <noident>
qcom_glink_native.c:615:18: warning: incorrect type in assignment (different base types)
qcom_glink_native.c:615:18:    expected unsigned short [unsigned] [usertype] lcid
qcom_glink_native.c:615:18:    got restricted __le16 [usertype] <noident>
qcom_glink_native.c:616:19: warning: incorrect type in assignment (different base types)
qcom_glink_native.c:616:19:    expected unsigned int [unsigned] [usertype] count
qcom_glink_native.c:616:19:    got restricted __le32 [usertype] <noident>
qcom_glink_native.c:617:18: warning: incorrect type in assignment (different base types)
qcom_glink_native.c:617:18:    expected unsigned int [unsigned] [usertype] size
qcom_glink_native.c:617:18:    got restricted __le32 [usertype] <noident>
qcom_glink_native.c:618:18: warning: incorrect type in assignment (different base types)
qcom_glink_native.c:618:18:    expected unsigned int [unsigned] [usertype] liid
qcom_glink_native.c:618:18:    got restricted __le32 [usertype] <noident>

Fix this by correctly annotating them.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/rpmsg/qcom_glink_native.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index f505f58b797d..e4eb5a1f417a 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -603,11 +603,11 @@ static int qcom_glink_advertise_intent(struct qcom_glink *glink,
 				       struct glink_core_rx_intent *intent)
 {
 	struct command {
-		u16 id;
-		u16 lcid;
-		u32 count;
-		u32 size;
-		u32 liid;
+		__le16 id;
+		__le16 lcid;
+		__le32 count;
+		__le32 size;
+		__le32 liid;
 	} __packed;
 	struct command cmd;
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] rpmsg: glink: Fix various kerneldoc warnings.
  2018-06-18 12:33 [PATCH 0/3] rpmsg: glink: fix W=1 warnings Srinivas Kandagatla
  2018-06-18 12:33 ` [PATCH 1/3] rpmsg: glink: correctly annotate intent members Srinivas Kandagatla
@ 2018-06-18 12:33 ` Srinivas Kandagatla
  2018-06-18 12:33 ` [PATCH 3/3] rpmsg: smd: fix " Srinivas Kandagatla
  2 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2018-06-18 12:33 UTC (permalink / raw)
  To: ohad, bjorn.andersson
  Cc: linux-remoteproc, linux-arm-msm, linux-kernel, Srinivas Kandagatla

Fix below kerneldoc warnings while building with W=1
qcom_glink_native.c:53: warning: Function parameter or member 'data' not described in 'glink_defer_cmd'
qcom_glink_native.c:75: warning: Function parameter or member 'data' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'id' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'size' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'reuse' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'in_use' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'offset' not described in 'glink_core_rx_intent'
qcom_glink_native.c:75: warning: Function parameter or member 'node' not described in 'glink_core_rx_intent'
qcom_glink_native.c:116: warning: Function parameter or member 'features' not described in 'qcom_glink'
qcom_glink_native.c:116: warning: Function parameter or member 'intentless' not described in 'qcom_glink'
qcom_glink_native.c:524: warning: Function parameter or member 'version' not described in 'qcom_glink_receive_version'
qcom_glink_native.c:524: warning: Function parameter or member 'features' not described in 'qcom_glink_receive_version'
qcom_glink_native.c:524: warning: Excess function parameter 'r_version' description in 'qcom_glink_receive_version'
qcom_glink_native.c:524: warning: Excess function parameter 'r_features' description in 'qcom_glink_receive_version'
qcom_glink_native.c:551: warning: Function parameter or member 'version' not described in 'qcom_glink_receive_version_ack'
qcom_glink_native.c:551: warning: Function parameter or member 'features' not described in 'qcom_glink_receive_version_ack'
qcom_glink_native.c:551: warning: Excess function parameter 'r_version' description in 'qcom_glink_receive_version_ack'
qcom_glink_native.c:551: warning: Excess function parameter 'r_features' description in 'qcom_glink_receive_version_ack'
qcom_glink_native.c:570: warning: bad line:                                       wire format and transmit
qcom_glink_native.c:604: warning: Function parameter or member 'intent' not described in 'qcom_glink_advertise_intent'
qcom_glink_native.c:604: warning: Excess function parameter 'size' description in 'qcom_glink_advertise_intent'
qcom_glink_native.c:710: warning: Function parameter or member 'glink' not described in 'qcom_glink_handle_intent_req'
qcom_glink_native.c:710: warning: Function parameter or member 'cid' not described in 'qcom_glink_handle_intent_req'
qcom_glink_native.c:710: warning: Function parameter or member 'size' not described in 'qcom_glink_handle_intent_req'

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/rpmsg/qcom_glink_native.c | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index e4eb5a1f417a..df1d923c0db5 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -40,7 +40,7 @@ struct glink_msg {
  * struct glink_defer_cmd - deferred incoming control message
  * @node:	list node
  * @msg:	message header
- * data:	payload of the message
+ * @data:	payload of the message
  *
  * Copy of a received control message, to be added to @rx_queue and processed
  * by @rx_work of @qcom_glink.
@@ -56,12 +56,13 @@ struct glink_defer_cmd {
  * struct glink_core_rx_intent - RX intent
  * RX intent
  *
- * data: pointer to the data (may be NULL for zero-copy)
- * id: remote or local intent ID
- * size: size of the original intent (do not modify)
- * reuse: To mark if the intent can be reused after first use
- * in_use: To mark if intent is already in use for the channel
- * offset: next write offset (initially 0)
+ * @data: pointer to the data (may be NULL for zero-copy)
+ * @id: remote or local intent ID
+ * @size: size of the original intent (do not modify)
+ * @reuse: To mark if the intent can be reused after first use
+ * @in_use: To mark if intent is already in use for the channel
+ * @offset: next write offset (initially 0)
+ * @node:	list node
  */
 struct glink_core_rx_intent {
 	void *data;
@@ -89,6 +90,8 @@ struct glink_core_rx_intent {
  * @idr_lock:	synchronizes @lcids and @rcids modifications
  * @lcids:	idr of all channels with a known local channel id
  * @rcids:	idr of all channels with a known remote channel id
+ * @features:	remote features
+ * @intentless:	flag to indicate that there is no intent
  */
 struct qcom_glink {
 	struct device *dev;
@@ -512,8 +515,8 @@ static void qcom_glink_rx_done(struct qcom_glink *glink,
  * qcom_glink_receive_version() - receive version/features from remote system
  *
  * @glink:	pointer to transport interface
- * @r_version:	remote version
- * @r_features:	remote features
+ * @version:	remote version
+ * @features:	remote features
  *
  * This function is called in response to a remote-initiated version/feature
  * negotiation sequence.
@@ -538,8 +541,8 @@ static void qcom_glink_receive_version(struct qcom_glink *glink,
  * qcom_glink_receive_version_ack() - receive negotiation ack from remote system
  *
  * @glink:	pointer to transport interface
- * @r_version:	remote version response
- * @r_features:	remote features response
+ * @version:	remote version response
+ * @features:	remote features response
  *
  * This function is called in response to a local-initiated version/feature
  * negotiation sequence and is the counter-offer from the remote side based
@@ -567,7 +570,7 @@ static void qcom_glink_receive_version_ack(struct qcom_glink *glink,
 
 /**
  * qcom_glink_send_intent_req_ack() - convert an rx intent request ack cmd to
-				      wire format and transmit
+ * 	wire format and transmit
  * @glink:	The transport to transmit on.
  * @channel:	The glink channel
  * @granted:	The request response to encode.
@@ -594,7 +597,7 @@ static int qcom_glink_send_intent_req_ack(struct qcom_glink *glink,
  *			   transmit
  * @glink:	The transport to transmit on.
  * @channel:	The local channel
- * @size:	The intent to pass on to remote.
+ * @intent:	The intent to pass on to remote.
  *
  * Return: 0 on success or standard Linux error code.
  */
@@ -698,9 +701,9 @@ static void qcom_glink_handle_rx_done(struct qcom_glink *glink,
 /**
  * qcom_glink_handle_intent_req() - Receive a request for rx_intent
  *					    from remote side
- * if_ptr:      Pointer to the transport interface
- * rcid:	Remote channel ID
- * size:	size of the intent
+ * @glink:      Pointer to the transport interface
+ * @cid:	Remote channel ID
+ * @size:	size of the intent
  *
  * The function searches for the local channel to which the request for
  * rx_intent has arrived and allocates and notifies the remote back
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] rpmsg: smd: fix kerneldoc warnings
  2018-06-18 12:33 [PATCH 0/3] rpmsg: glink: fix W=1 warnings Srinivas Kandagatla
  2018-06-18 12:33 ` [PATCH 1/3] rpmsg: glink: correctly annotate intent members Srinivas Kandagatla
  2018-06-18 12:33 ` [PATCH 2/3] rpmsg: glink: Fix various kerneldoc warnings Srinivas Kandagatla
@ 2018-06-18 12:33 ` Srinivas Kandagatla
  2018-06-19  4:36   ` Vinod
  2 siblings, 1 reply; 5+ messages in thread
From: Srinivas Kandagatla @ 2018-06-18 12:33 UTC (permalink / raw)
  To: ohad, bjorn.andersson
  Cc: linux-remoteproc, linux-arm-msm, linux-kernel, Srinivas Kandagatla

This patch fixes below kerneldoc warnings

qcom_smd.c:141: warning: Function parameter or member 'dev' not described in 'qcom_smd_edge'
qcom_smd.c:141: warning: Function parameter or member 'name' not described in 'qcom_smd_edge'
qcom_smd.c:141: warning: Function parameter or member 'new_channel_event' not described in 'qcom_smd_edge'
qcom_smd.c:222: warning: Function parameter or member 'qsept' not described in 'qcom_smd_channel'
qcom_smd.c:222: warning: Function parameter or member 'registered' not described in 'qcom_smd_channel'
qcom_smd.c:222: warning: Function parameter or member 'state_change_event' not described in 'qcom_smd_channel'
qcom_smd.c:222: warning: Function parameter or member 'drvdata' not described in 'qcom_smd_channel'
qcom_smd.c:737: warning: Function parameter or member 'wait' not described in '__qcom_smd_send'

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

qcom_smd.c
---
 drivers/rpmsg/qcom_smd.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index 6437bbeebc91..8c6a142050f8 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -93,6 +93,8 @@ static const struct {
 
 /**
  * struct qcom_smd_edge - representing a remote processor
+ * @dev:		device associated with this edge
+ * @name:		name of this edge
  * @of_node:		of_node handle for information related to this edge
  * @edge_id:		identifier of this edge
  * @remote_pid:		identifier of remote processor
@@ -106,6 +108,7 @@ static const struct {
  * @channels_lock:	guard for modifications of @channels
  * @allocated:		array of bitmaps representing already allocated channels
  * @smem_available:	last available amount of smem triggering a channel scan
+ * @new_channel_event:	wait queue for new channel events
  * @scan_work:		work item for discovering new channels
  * @state_work:		work item for edge state changes
  */
@@ -172,10 +175,12 @@ struct qcom_smd_endpoint {
 /**
  * struct qcom_smd_channel - smd channel struct
  * @edge:		qcom_smd_edge this channel is living on
- * @qsdev:		reference to a associated smd client device
+ * @qsept:		reference to a associated smd endpoint
+ * @registered:		flag to indicate if the channel is registered
  * @name:		name of the channel
  * @state:		local state of the channel
  * @remote_state:	remote state of the channel
+ * @state_change_event:	state change event
  * @info:		byte aligned outgoing/incoming channel info
  * @info_word:		word aligned outgoing/incoming channel info
  * @tx_lock:		lock to make writes to the channel mutually exclusive
@@ -187,6 +192,7 @@ struct qcom_smd_endpoint {
  * @cb:			callback function registered for this channel
  * @recv_lock:		guard for rx info modifications and cb pointer
  * @pkt_size:		size of the currently handled packet
+ * @drvdata:		driver private data
  * @list:		lite entry for @channels in qcom_smd_edge
  */
 struct qcom_smd_channel {
@@ -726,6 +732,7 @@ static int qcom_smd_write_fifo(struct qcom_smd_channel *channel,
  * @channel:	channel handle
  * @data:	buffer of data to write
  * @len:	number of bytes to write
+ * @wait:	flag to indicate if write has ca wait
  *
  * This is a blocking write of len bytes into the channel's tx ring buffer and
  * signal the remote end. It will sleep until there is enough space available
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] rpmsg: smd: fix kerneldoc warnings
  2018-06-18 12:33 ` [PATCH 3/3] rpmsg: smd: fix " Srinivas Kandagatla
@ 2018-06-19  4:36   ` Vinod
  0 siblings, 0 replies; 5+ messages in thread
From: Vinod @ 2018-06-19  4:36 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: ohad, bjorn.andersson, linux-remoteproc, linux-arm-msm, linux-kernel

On 18-06-18, 13:33, Srinivas Kandagatla wrote:
> This patch fixes below kerneldoc warnings
> 
> qcom_smd.c:141: warning: Function parameter or member 'dev' not described in 'qcom_smd_edge'
> qcom_smd.c:141: warning: Function parameter or member 'name' not described in 'qcom_smd_edge'
> qcom_smd.c:141: warning: Function parameter or member 'new_channel_event' not described in 'qcom_smd_edge'
> qcom_smd.c:222: warning: Function parameter or member 'qsept' not described in 'qcom_smd_channel'
> qcom_smd.c:222: warning: Function parameter or member 'registered' not described in 'qcom_smd_channel'
> qcom_smd.c:222: warning: Function parameter or member 'state_change_event' not described in 'qcom_smd_channel'
> qcom_smd.c:222: warning: Function parameter or member 'drvdata' not described in 'qcom_smd_channel'
> qcom_smd.c:737: warning: Function parameter or member 'wait' not described in '__qcom_smd_send'
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> 
> qcom_smd.c

this one looks out of place to me :)

> ---
>  drivers/rpmsg/qcom_smd.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
> index 6437bbeebc91..8c6a142050f8 100644
> --- a/drivers/rpmsg/qcom_smd.c
> +++ b/drivers/rpmsg/qcom_smd.c
> @@ -93,6 +93,8 @@ static const struct {
>  
>  /**
>   * struct qcom_smd_edge - representing a remote processor
> + * @dev:		device associated with this edge
> + * @name:		name of this edge
>   * @of_node:		of_node handle for information related to this edge
>   * @edge_id:		identifier of this edge
>   * @remote_pid:		identifier of remote processor
> @@ -106,6 +108,7 @@ static const struct {
>   * @channels_lock:	guard for modifications of @channels
>   * @allocated:		array of bitmaps representing already allocated channels
>   * @smem_available:	last available amount of smem triggering a channel scan
> + * @new_channel_event:	wait queue for new channel events
>   * @scan_work:		work item for discovering new channels
>   * @state_work:		work item for edge state changes
>   */
> @@ -172,10 +175,12 @@ struct qcom_smd_endpoint {
>  /**
>   * struct qcom_smd_channel - smd channel struct
>   * @edge:		qcom_smd_edge this channel is living on
> - * @qsdev:		reference to a associated smd client device
> + * @qsept:		reference to a associated smd endpoint
> + * @registered:		flag to indicate if the channel is registered
>   * @name:		name of the channel
>   * @state:		local state of the channel
>   * @remote_state:	remote state of the channel
> + * @state_change_event:	state change event
>   * @info:		byte aligned outgoing/incoming channel info
>   * @info_word:		word aligned outgoing/incoming channel info
>   * @tx_lock:		lock to make writes to the channel mutually exclusive
> @@ -187,6 +192,7 @@ struct qcom_smd_endpoint {
>   * @cb:			callback function registered for this channel
>   * @recv_lock:		guard for rx info modifications and cb pointer
>   * @pkt_size:		size of the currently handled packet
> + * @drvdata:		driver private data
>   * @list:		lite entry for @channels in qcom_smd_edge
>   */
>  struct qcom_smd_channel {
> @@ -726,6 +732,7 @@ static int qcom_smd_write_fifo(struct qcom_smd_channel *channel,
>   * @channel:	channel handle
>   * @data:	buffer of data to write
>   * @len:	number of bytes to write
> + * @wait:	flag to indicate if write has ca wait
>   *
>   * This is a blocking write of len bytes into the channel's tx ring buffer and
>   * signal the remote end. It will sleep until there is enough space available
> -- 
> 2.16.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-19  4:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-18 12:33 [PATCH 0/3] rpmsg: glink: fix W=1 warnings Srinivas Kandagatla
2018-06-18 12:33 ` [PATCH 1/3] rpmsg: glink: correctly annotate intent members Srinivas Kandagatla
2018-06-18 12:33 ` [PATCH 2/3] rpmsg: glink: Fix various kerneldoc warnings Srinivas Kandagatla
2018-06-18 12:33 ` [PATCH 3/3] rpmsg: smd: fix " Srinivas Kandagatla
2018-06-19  4:36   ` Vinod

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.