From patchwork Mon Feb 1 12:16:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 12058907 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2288BC433E0 for ; Mon, 1 Feb 2021 12:17:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D309864E9E for ; Mon, 1 Feb 2021 12:17:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230063AbhBAMR7 (ORCPT ); Mon, 1 Feb 2021 07:17:59 -0500 Received: from mga18.intel.com ([134.134.136.126]:57353 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhBAMR6 (ORCPT ); Mon, 1 Feb 2021 07:17:58 -0500 IronPort-SDR: 8wY0V+dH4ObPk3UaqDt6Mn6IRLf0L2/YqCV2suKBId9oZRyeVPtip9HYvhlk6kw96kEO+O//56 AyWKGcM7n4eg== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="168356407" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="168356407" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 04:16:32 -0800 IronPort-SDR: yYL6Nh5jXY5qucuIldWgJsW8N8xvFmEd14c88iPj9IbnRYhHa4jsoGq/DpkEFm22Ww3za+5S0h F+fm+393WiEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="412739239" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 01 Feb 2021 04:16:30 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 83B02108; Mon, 1 Feb 2021 14:16:29 +0200 (EET) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Andreas Noever , Lukas Wunner , Lee Jones , Mika Westerberg Subject: [PATCH v2 1/6] thunderbolt: ctl: Fix kernel-doc descriptions of non-static functions Date: Mon, 1 Feb 2021 15:16:24 +0300 Message-Id: <20210201121629.76969-2-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210201121629.76969-1-mika.westerberg@linux.intel.com> References: <20210201121629.76969-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix kernel-doc descriptions of all non-static functions and struct tb_cfg. Gets rid of several warnings on W=1 builds too. Reported-by: Lee Jones Signed-off-by: Mika Westerberg Reviewed-by: Lee Jones --- drivers/thunderbolt/ctl.c | 47 ++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c index 2f9d4fc8aa23..f1aeaff9f368 100644 --- a/drivers/thunderbolt/ctl.c +++ b/drivers/thunderbolt/ctl.c @@ -20,7 +20,17 @@ #define TB_CTL_RETRIES 4 /** - * struct tb_cfg - thunderbolt control channel + * struct tb_ctl - Thunderbolt control channel + * @nhi: Pointer to the NHI structure + * @tx: Transmit ring + * @rx: Receive ring + * @frame_pool: DMA pool for control messages + * @rx_packets: Received control messages + * @request_queue_lock: Lock protecting @request_queue + * @request_queue: List of outstanding requests + * @running: Is the control channel running at the moment + * @callback: Callback called when hotplug message is received + * @callback_data: Data passed to @callback */ struct tb_ctl { struct tb_nhi *nhi; @@ -602,6 +612,9 @@ struct tb_cfg_result tb_cfg_request_sync(struct tb_ctl *ctl, /** * tb_ctl_alloc() - allocate a control channel + * @nhi: Pointer to NHI + * @cb: Callback called for plug events + * @cb_data: Data passed to @cb * * cb will be invoked once for every hot plug event. * @@ -649,6 +662,7 @@ struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, event_cb cb, void *cb_data) /** * tb_ctl_free() - free a control channel + * @ctl: Control channel to free * * Must be called after tb_ctl_stop. * @@ -677,6 +691,7 @@ void tb_ctl_free(struct tb_ctl *ctl) /** * tb_cfg_start() - start/resume the control channel + * @ctl: Control channel to start */ void tb_ctl_start(struct tb_ctl *ctl) { @@ -691,7 +706,8 @@ void tb_ctl_start(struct tb_ctl *ctl) } /** - * control() - pause the control channel + * tb_ctrl_stop() - pause the control channel + * @ctl: Control channel to stop * * All invocations of ctl->callback will have finished after this method * returns. @@ -784,6 +800,9 @@ static bool tb_cfg_copy(struct tb_cfg_request *req, const struct ctl_pkg *pkg) /** * tb_cfg_reset() - send a reset packet and wait for a response + * @ctl: Control channel pointer + * @route: Router string for the router to send reset + * @timeout_msec: Timeout in ms how long to wait for the response * * If the switch at route is incorrectly configured then we will not receive a * reply (even though the switch will reset). The caller should check for @@ -820,9 +839,17 @@ struct tb_cfg_result tb_cfg_reset(struct tb_ctl *ctl, u64 route, } /** - * tb_cfg_read() - read from config space into buffer + * tb_cfg_read_raw() - read from config space into buffer + * @ctl: Pointer to the control channel + * @buffer: Buffer where the data is read + * @route: Route string of the router + * @port: Port number when reading from %TB_CFG_PORT, %0 otherwise + * @space: Config space selector + * @offset: Dword word offset of the register to start reading + * @length: Number of dwords to read + * @timeout_msec: Timeout in ms how long to wait for the response * - * Offset and length are in dwords. + * Reads from router config space without translating the possible error. */ struct tb_cfg_result tb_cfg_read_raw(struct tb_ctl *ctl, void *buffer, u64 route, u32 port, enum tb_cfg_space space, @@ -884,8 +911,16 @@ struct tb_cfg_result tb_cfg_read_raw(struct tb_ctl *ctl, void *buffer, /** * tb_cfg_write() - write from buffer into config space + * @ctl: Pointer to the control channel + * @buffer: Data to write + * @route: Route string of the router + * @port: Port number when writing to %TB_CFG_PORT, %0 otherwise + * @space: Config space selector + * @offset: Dword word offset of the register to start writing + * @length: Number of dwords to write + * @timeout_msec: Timeout in ms how long to wait for the response * - * Offset and length are in dwords. + * Writes to router config space without translating the possible error. */ struct tb_cfg_result tb_cfg_write_raw(struct tb_ctl *ctl, const void *buffer, u64 route, u32 port, enum tb_cfg_space space, @@ -1022,6 +1057,8 @@ int tb_cfg_write(struct tb_ctl *ctl, const void *buffer, u64 route, u32 port, /** * tb_cfg_get_upstream_port() - get upstream port number of switch at route + * @ctl: Pointer to the control channel + * @route: Route string of the router * * Reads the first dword from the switches TB_CFG_SWITCH config area and * returns the port number from which the reply originated. From patchwork Mon Feb 1 12:16:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 12058911 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79422C433E6 for ; Mon, 1 Feb 2021 12:18:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39CDA64E96 for ; Mon, 1 Feb 2021 12:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231272AbhBAMST (ORCPT ); Mon, 1 Feb 2021 07:18:19 -0500 Received: from mga12.intel.com ([192.55.52.136]:2645 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231192AbhBAMST (ORCPT ); Mon, 1 Feb 2021 07:18:19 -0500 IronPort-SDR: jSN9b8a/5AFMz+gBRC++yXY+Sc77od/uuJHW150/7i/c8tADS4qPtrh3WIR2h3yzw9m7A8Rq79 UikxYdie55vA== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="159841707" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="159841707" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 04:16:32 -0800 IronPort-SDR: q2po7mvQgdvEmio2cDC+PI5owAuX3eEg+NXd39d+9Y/fMm9JiK1pYY5AIwkf9lIWW4C0sCNiG0 vacMkRr2MjYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="581443236" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 01 Feb 2021 04:16:30 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 8E53B1A2; Mon, 1 Feb 2021 14:16:29 +0200 (EET) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Andreas Noever , Lukas Wunner , Lee Jones , Mika Westerberg Subject: [PATCH v2 2/6] thunderbolt: eeprom: Fix kernel-doc descriptions of non-static functions Date: Mon, 1 Feb 2021 15:16:25 +0300 Message-Id: <20210201121629.76969-3-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210201121629.76969-1-mika.westerberg@linux.intel.com> References: <20210201121629.76969-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix kernel-doc descriptions of the two non-static functions. This also gets rid of the rest of the warnings on W=1 build. Reported-by: Lee Jones Signed-off-by: Mika Westerberg Reviewed-by: Lee Jones --- drivers/thunderbolt/eeprom.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c index 63c64f503faa..dd03d3096653 100644 --- a/drivers/thunderbolt/eeprom.c +++ b/drivers/thunderbolt/eeprom.c @@ -279,7 +279,9 @@ struct tb_drom_entry_port { /** - * tb_drom_read_uid_only - read uid directly from drom + * tb_drom_read_uid_only() - Read UID directly from DROM + * @sw: Router whose UID to read + * @uid: UID is placed here * * Does not use the cached copy in sw->drom. Used during resume to check switch * identity. @@ -520,7 +522,14 @@ static int tb_drom_read_n(struct tb_switch *sw, u16 offset, u8 *val, } /** - * tb_drom_read - copy drom to sw->drom and parse it + * tb_drom_read() - Copy DROM to sw->drom and parse it + * @sw: Router whose DROM to read and parse + * + * This function reads router DROM and if successful parses the entries and + * populates the fields in @sw accordingly. Can be called for any router + * generation. + * + * Returns %0 in case of success and negative errno otherwise. */ int tb_drom_read(struct tb_switch *sw) { From patchwork Mon Feb 1 12:16:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 12058917 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61084C433DB for ; Mon, 1 Feb 2021 12:18:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 245F064E9C for ; Mon, 1 Feb 2021 12:18:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231388AbhBAMS2 (ORCPT ); Mon, 1 Feb 2021 07:18:28 -0500 Received: from mga01.intel.com ([192.55.52.88]:22151 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbhBAMSX (ORCPT ); Mon, 1 Feb 2021 07:18:23 -0500 IronPort-SDR: b9u9P96VFPuxveUqafsVVnHjS5+uB7NmczV3/z3e0F2Uzk1eFcEgGl0Jxjx8b6xvItehhNjcAA P/fyiIfql+cg== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="199568262" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="199568262" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 04:16:34 -0800 IronPort-SDR: u65Z9w7cbZRAUbug1tjfpksLgl02dbn+se7q9OGPiPlLb1U+lYm/bvFhxYaUSQysaX5dwoEj+B zF1Eq8Q8C0kw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="371527723" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 01 Feb 2021 04:16:30 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 9726F1A8; Mon, 1 Feb 2021 14:16:29 +0200 (EET) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Andreas Noever , Lukas Wunner , Lee Jones , Mika Westerberg Subject: [PATCH v2 3/6] thunderbolt: path: Fix kernel-doc descriptions of non-static functions Date: Mon, 1 Feb 2021 15:16:26 +0300 Message-Id: <20210201121629.76969-4-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210201121629.76969-1-mika.westerberg@linux.intel.com> References: <20210201121629.76969-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix kernel-doc descriptions of the two non-static functions. This also gets rid of the warnings on W=1 build. Reported-by: Lee Jones Signed-off-by: Mika Westerberg Reviewed-by: Lee Jones --- drivers/thunderbolt/path.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c index ca7d738d66de..f63e205a35d9 100644 --- a/drivers/thunderbolt/path.c +++ b/drivers/thunderbolt/path.c @@ -466,6 +466,7 @@ void tb_path_deactivate(struct tb_path *path) /** * tb_path_activate() - activate a path + * @path: Path to activate * * Activate a path starting with the last hop and iterating backwards. The * caller must fill path->hops before calling tb_path_activate(). @@ -561,6 +562,7 @@ int tb_path_activate(struct tb_path *path) /** * tb_path_is_invalid() - check whether any ports on the path are invalid + * @path: Path to check * * Return: Returns true if the path is invalid, false otherwise. */ From patchwork Mon Feb 1 12:16:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 12058909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA69FC433E0 for ; Mon, 1 Feb 2021 12:18:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F26464E9E for ; Mon, 1 Feb 2021 12:18:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231268AbhBAMST (ORCPT ); Mon, 1 Feb 2021 07:18:19 -0500 Received: from mga17.intel.com ([192.55.52.151]:14229 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhBAMSS (ORCPT ); Mon, 1 Feb 2021 07:18:18 -0500 IronPort-SDR: qFmTb+Oi4AmvXoHUep3QR/3/IS4JgTuAQTfFKJX9Z1nMP6Jpniqhzdkxu+V2iCC+rgcPrSBGBA Cx93YbvS2jUQ== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="160440865" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="160440865" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 04:16:32 -0800 IronPort-SDR: AfYddwictoMFMFO9+S5moFS2hk4cmghgkSFu8KAbUKKQbBLymrPjlIcY1EqPMSg3Ig5W/fvcGF iAJGvikpRmPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="369835249" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 01 Feb 2021 04:16:30 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id A081F1CE; Mon, 1 Feb 2021 14:16:29 +0200 (EET) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Andreas Noever , Lukas Wunner , Lee Jones , Mika Westerberg Subject: [PATCH v2 4/6] thunderbolt: nhi: Fix kernel-doc descriptions of non-static functions Date: Mon, 1 Feb 2021 15:16:27 +0300 Message-Id: <20210201121629.76969-5-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210201121629.76969-1-mika.westerberg@linux.intel.com> References: <20210201121629.76969-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix kernel-doc descriptions of the two non-static functions. This also gets rids of the warnings on W=1 build. Reported-by: Lee Jones Signed-off-by: Mika Westerberg Reviewed-by: Lee Jones --- drivers/thunderbolt/nhi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 7073c25248b3..782404eb10b0 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -592,6 +592,7 @@ EXPORT_SYMBOL_GPL(tb_ring_alloc_rx); /** * tb_ring_start() - enable a ring + * @ring: Ring to start * * Must not be invoked in parallel with tb_ring_stop(). */ @@ -667,6 +668,7 @@ EXPORT_SYMBOL_GPL(tb_ring_start); /** * tb_ring_stop() - shutdown a ring + * @ring: Ring to stop * * Must not be invoked from a callback. * From patchwork Mon Feb 1 12:16:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 12058915 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07156C433E0 for ; Mon, 1 Feb 2021 12:18:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A760B64E96 for ; Mon, 1 Feb 2021 12:18:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231356AbhBAMSY (ORCPT ); Mon, 1 Feb 2021 07:18:24 -0500 Received: from mga17.intel.com ([192.55.52.151]:14235 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231334AbhBAMSU (ORCPT ); Mon, 1 Feb 2021 07:18:20 -0500 IronPort-SDR: /fTikA1suLIZlTbsSbCiPMO7tQOqrJMrBToMK5rxiBr2PFpFXJzrBKRXLZX5ZfmkKc1KCODAN1 GJKBPpplobOw== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="160440872" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="160440872" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 04:16:34 -0800 IronPort-SDR: l+nim+WbcNsbB/cTJ/Owqb0cRab+QKhCjNpn7sid25YKeORQWfYs93e1M8BdE5nHVa2t4kGePl 0yTeTWtiCaGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="412400472" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 01 Feb 2021 04:16:33 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id AAAB7346; Mon, 1 Feb 2021 14:16:29 +0200 (EET) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Andreas Noever , Lukas Wunner , Lee Jones , Mika Westerberg Subject: [PATCH v2 5/6] thunderbolt: switch: Fix kernel-doc descriptions of non-static functions Date: Mon, 1 Feb 2021 15:16:28 +0300 Message-Id: <20210201121629.76969-6-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210201121629.76969-1-mika.westerberg@linux.intel.com> References: <20210201121629.76969-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix kernel-doc descriptions of all non-static functions. This also gets rid of the warnings on W=1 build. Reported-by: Lee Jones Signed-off-by: Mika Westerberg Reviewed-by: Lee Jones --- drivers/thunderbolt/switch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 6ca3efba4520..5377d0a3390f 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -525,6 +525,8 @@ int tb_port_state(struct tb_port *port) /** * tb_wait_for_port() - wait for a port to become ready + * @port: Port to wait + * @wait_if_unplugged: Wait also when port is unplugged * * Wait up to 1 second for a port to reach state TB_PORT_UP. If * wait_if_unplugged is set then we also wait if the port is in state @@ -589,6 +591,8 @@ int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged) /** * tb_port_add_nfc_credits() - add/remove non flow controlled credits to port + * @port: Port to add/remove NFC credits + * @credits: Credits to add/remove * * Change the number of NFC credits allocated to @port by @credits. To remove * NFC credits pass a negative amount of credits. @@ -646,6 +650,8 @@ int tb_port_set_initial_credits(struct tb_port *port, u32 credits) /** * tb_port_clear_counter() - clear a counter in TB_CFG_COUNTER + * @port: Port whose counters to clear + * @counter: Counter index to clear * * Return: Returns 0 on success or an error code on failure. */ @@ -2649,6 +2655,7 @@ void tb_switch_remove(struct tb_switch *sw) /** * tb_sw_set_unplugged() - set is_unplugged on switch and downstream switches + * @sw: Router to mark unplugged */ void tb_sw_set_unplugged(struct tb_switch *sw) { From patchwork Mon Feb 1 12:16:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 12058919 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C77F9C433E0 for ; Mon, 1 Feb 2021 12:18:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7563F64EA0 for ; Mon, 1 Feb 2021 12:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231403AbhBAMSi (ORCPT ); Mon, 1 Feb 2021 07:18:38 -0500 Received: from mga09.intel.com ([134.134.136.24]:22929 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbhBAMSg (ORCPT ); Mon, 1 Feb 2021 07:18:36 -0500 IronPort-SDR: ixnjdWZQ7SqrLPuY0qTTrTcnGKAgtkzR4pGtCIe95d8Ehvztq6bRkNAh+KdrqECsgUlCww9wIr qmcmGbpT3n0g== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="180820114" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="180820114" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 04:16:35 -0800 IronPort-SDR: 3Jx53TZ/+ySAyRrjshAkxt3dIwi6niIZfbyzVDx5CUaY33LPa1rC6MblzmRsZPjEQBDp5vpF/4 X3Q9dhXc98DQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="390886510" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 01 Feb 2021 04:16:33 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id B4B6E38F; Mon, 1 Feb 2021 14:16:29 +0200 (EET) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Andreas Noever , Lukas Wunner , Lee Jones , Mika Westerberg Subject: [PATCH v2 6/6] thunderbolt: Add clarifying comments about USB4 terms router and adapter Date: Mon, 1 Feb 2021 15:16:29 +0300 Message-Id: <20210201121629.76969-7-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210201121629.76969-1-mika.westerberg@linux.intel.com> References: <20210201121629.76969-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org USB4 spec talks about routers and adapters whereas Thunderbolt 1-3 talked about CIO (Converged I/O) switches and ports. These are the same thing but might cause confusion so add clarifying comments to struct tb_switch and struct tb_port about the USB4 terms. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/tb.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index 31468de658e4..37679b54808d 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -138,6 +138,8 @@ struct tb_switch_tmu { * * When the switch is being added or removed to the domain (other * switches) you need to have domain lock held. + * + * In USB4 terminology this structure represents a router. */ struct tb_switch { struct device dev; @@ -196,6 +198,9 @@ struct tb_switch { * @in_hopids: Currently allocated input HopIDs * @out_hopids: Currently allocated output HopIDs * @list: Used to link ports to DP resources list + * + * In USB4 terminology this structure represents an adapter (protocol or + * lane adapter). */ struct tb_port { struct tb_regs_port_header config;