linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/30] Fix a bunch of W=1 issues in USB
@ 2020-07-02 14:45 Lee Jones
  2020-07-02 14:45 ` [PATCH 01/30] usb: phy: phy: Fix-up a whole bunch of formatting issues Lee Jones
                   ` (30 more replies)
  0 siblings, 31 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:45 UTC (permalink / raw)
  To: gregkh; +Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

Lee Jones (30):
  usb: phy: phy: Fix-up a whole bunch of formatting issues
  usb: host: pci-quirks: Demote function header from kerneldoc to
    comment block
  usb: common: debug: Demote comment blocks which are obviously not
    kerneldoc
  usb: common: usb-conn-gpio: Demote comment block which is clearly not
    kerneldoc
  usb: dwc3: drd: File headers are not doc headers
  usb: dwc3: ulpi: File headers are not doc headers
  usb: common: ulpi: Fix a few kerneldoc related issues
  usb: dwc3: dwc3-omap: Do not read DMA status
  usb: dwc2: gadget: Do not read GINTMSK2
  usb: dwc2: gadget: Remove assigned but never used 'maxsize'
  usb: dwc2: gadget: Avoid pointless read of EP control register
  usb: host: ehci-omap: Provide documentation for
    ehci_hcd_omap_probe()'s arg 'pdev'
  usb: cdns3: core: Fix incorrect formatting and misspelled function arg
    docs
  usb: cdns3: ep0: Fix a bunch of kerneldoc issues
  usb: dwc3: dwc3-haps: Function headers are not suitable for kerneldoc
  usb: mtu3: mtu3_trace: Function headers are not suitable for kerneldoc
  usb: cdns3: gadget: Fix a bunch of kernel doc issues
  usb: dwc3: dwc3-of-simple: Function headers are not good candidates
    for kerneldoc
  usb: host: isp1362: Mark the many unused ISP1362_REG entries as
    __maybe_unused
  usb: host: ohci-at91: Demote kerneldoc headers down to basic comment
    blocks
  usb: host: ohci: Mark cc_to_error as __maybe_unused
  usb: cdns3: ep0: Move 'zlp' description to appropriate function header
  usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef
    OXU_URB_TRACE'
  usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file
  usb: mtu3: mtu3_core: Demote obvious misuse of kerneldoc to standard
    comment block
  usb: c67x00: c67x00-ll-hpi: Demote obvious misuse of kerneldoc to
    standard comment blocks
  usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s
    manage_power arg
  usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to
    standard comment blocks
  usb: class: usbtmc: File headers are not good candidates for kerneldoc
  usb: c67x00: c67x00-sched: Demote obvious misuse of kerneldoc to
    standard comment blocks

 drivers/usb/c67x00/c67x00-hcd.c    |  6 ++--
 drivers/usb/c67x00/c67x00-ll-hpi.c |  6 ++--
 drivers/usb/c67x00/c67x00-sched.c  | 26 ++++++++--------
 drivers/usb/cdns3/core.c           |  8 ++---
 drivers/usb/cdns3/ep0.c            | 12 ++++++--
 drivers/usb/cdns3/gadget.c         | 11 ++++---
 drivers/usb/class/cdc-wdm.c        |  3 +-
 drivers/usb/class/usbtmc.c         |  2 +-
 drivers/usb/common/debug.c         |  4 +--
 drivers/usb/common/ulpi.c          |  5 +--
 drivers/usb/common/usb-conn-gpio.c |  2 +-
 drivers/usb/dwc2/gadget.c          |  7 +----
 drivers/usb/dwc3/drd.c             |  2 +-
 drivers/usb/dwc3/dwc3-haps.c       |  2 +-
 drivers/usb/dwc3/dwc3-of-simple.c  |  2 +-
 drivers/usb/dwc3/dwc3-omap.c       |  7 +----
 drivers/usb/dwc3/ulpi.c            |  2 +-
 drivers/usb/host/ehci-omap.c       |  1 +
 drivers/usb/host/isp1362.h         |  2 +-
 drivers/usb/host/ohci-at91.c       |  5 ++-
 drivers/usb/host/ohci.h            |  2 +-
 drivers/usb/host/oxu210hp-hcd.c    |  7 ++---
 drivers/usb/host/pci-quirks.c      |  2 +-
 drivers/usb/mtu3/mtu3_core.c       |  2 +-
 drivers/usb/mtu3/mtu3_trace.c      |  3 +-
 drivers/usb/phy/phy.c              | 49 +++++++++++++++---------------
 26 files changed, 90 insertions(+), 90 deletions(-)

-- 
2.25.1


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

* [PATCH 01/30] usb: phy: phy: Fix-up a whole bunch of formatting issues
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
@ 2020-07-02 14:45 ` Lee Jones
  2020-07-02 14:45 ` [PATCH 02/30] usb: host: pci-quirks: Demote function header from kerneldoc to comment block Lee Jones
                   ` (29 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:45 UTC (permalink / raw)
  To: gregkh; +Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones, Felipe Balbi

Kerneldoc expects arg descriptions to be in the format '@.*: '.  If either
the '@' or the ':' is omitted then kerneldoc complains that the description
is missing.  Add the missing ':'s here.

Also provide a new description for 'event'.

Fixes the following kernel build W=1 warnings:

 drivers/usb/phy/phy.c:106: warning: Function parameter or member 'work' not described in 'usb_phy_notify_charger_work'
 drivers/usb/phy/phy.c:172: warning: Function parameter or member 'nb' not described in 'usb_phy_get_charger_type'
 drivers/usb/phy/phy.c:172: warning: Function parameter or member 'state' not described in 'usb_phy_get_charger_type'
 drivers/usb/phy/phy.c:172: warning: Function parameter or member 'data' not described in 'usb_phy_get_charger_type'
 drivers/usb/phy/phy.c:194: warning: Function parameter or member 'usb_phy' not described in 'usb_phy_set_charger_current'
 drivers/usb/phy/phy.c:194: warning: Function parameter or member 'mA' not described in 'usb_phy_set_charger_current'
 drivers/usb/phy/phy.c:244: warning: Function parameter or member 'usb_phy' not described in 'usb_phy_get_charger_current'
 drivers/usb/phy/phy.c:244: warning: Function parameter or member 'min' not described in 'usb_phy_get_charger_current'
 drivers/usb/phy/phy.c:244: warning: Function parameter or member 'max' not described in 'usb_phy_get_charger_current'
 drivers/usb/phy/phy.c:281: warning: Function parameter or member 'usb_phy' not described in 'usb_phy_set_charger_state'
 drivers/usb/phy/phy.c:281: warning: Function parameter or member 'state' not described in 'usb_phy_set_charger_state'
 drivers/usb/phy/phy.c:427: warning: Function parameter or member 'dev' not described in 'devm_usb_get_phy'
 drivers/usb/phy/phy.c:427: warning: Function parameter or member 'type' not described in 'devm_usb_get_phy'
 drivers/usb/phy/phy.c:456: warning: Function parameter or member 'type' not described in 'usb_get_phy'
 drivers/usb/phy/phy.c:500: warning: Function parameter or member 'dev' not described in 'devm_usb_get_phy_by_node'
 drivers/usb/phy/phy.c:500: warning: Function parameter or member 'node' not described in 'devm_usb_get_phy_by_node'
 drivers/usb/phy/phy.c:500: warning: Function parameter or member 'nb' not described in 'devm_usb_get_phy_by_node'
 drivers/usb/phy/phy.c:558: warning: Function parameter or member 'dev' not described in 'devm_usb_get_phy_by_phandle'
 drivers/usb/phy/phy.c:558: warning: Function parameter or member 'phandle' not described in 'devm_usb_get_phy_by_phandle'
 drivers/usb/phy/phy.c:558: warning: Function parameter or member 'index' not described in 'devm_usb_get_phy_by_phandle'
 drivers/usb/phy/phy.c:590: warning: Function parameter or member 'dev' not described in 'devm_usb_put_phy'
 drivers/usb/phy/phy.c:590: warning: Function parameter or member 'phy' not described in 'devm_usb_put_phy'
 drivers/usb/phy/phy.c:627: warning: Function parameter or member 'type' not described in 'usb_add_phy'
 drivers/usb/phy/phy.c:721: warning: Function parameter or member 'event' not described in 'usb_phy_set_event'

Cc: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/phy/phy.c | 49 ++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 24 deletions(-)

diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
index ad25546308897..b47285f023cf7 100644
--- a/drivers/usb/phy/phy.c
+++ b/drivers/usb/phy/phy.c
@@ -88,7 +88,7 @@ static void usb_phy_set_default_current(struct usb_phy *usb_phy)
 
 /**
  * usb_phy_notify_charger_work - notify the USB charger state
- * @work - the charger work to notify the USB charger state
+ * @work: the charger work to notify the USB charger state
  *
  * This work can be issued when USB charger state has been changed or
  * USB charger current has been changed, then we can notify the current
@@ -160,9 +160,9 @@ static void __usb_phy_get_charger_type(struct usb_phy *usb_phy)
 
 /**
  * usb_phy_get_charger_type - get charger type from extcon subsystem
- * @nb -the notifier block to determine charger type
- * @state - the cable state
- * @data - private data
+ * @nb: the notifier block to determine charger type
+ * @state: the cable state
+ * @data: private data
  *
  * Determin the charger type from extcon subsystem which also means the
  * charger state has been chaned, then we should notify this event.
@@ -178,8 +178,8 @@ static int usb_phy_get_charger_type(struct notifier_block *nb,
 
 /**
  * usb_phy_set_charger_current - set the USB charger current
- * @usb_phy - the USB phy to be used
- * @mA - the current need to be set
+ * @usb_phy: the USB phy to be used
+ * @mA: the current need to be set
  *
  * Usually we only change the charger default current when USB finished the
  * enumeration as one SDP charger. As one SDP charger, usb_phy_set_power()
@@ -231,9 +231,9 @@ EXPORT_SYMBOL_GPL(usb_phy_set_charger_current);
 
 /**
  * usb_phy_get_charger_current - get the USB charger current
- * @usb_phy - the USB phy to be used
- * @min - the minimum current
- * @max - the maximum current
+ * @usb_phy: the USB phy to be used
+ * @min: the minimum current
+ * @max: the maximum current
  *
  * Usually we will notify the maximum current to power user, but for some
  * special case, power user also need the minimum current value. Then the
@@ -269,8 +269,8 @@ EXPORT_SYMBOL_GPL(usb_phy_get_charger_current);
 
 /**
  * usb_phy_set_charger_state - set the USB charger state
- * @usb_phy - the USB phy to be used
- * @state - the new state need to be set for charger
+ * @usb_phy: the USB phy to be used
+ * @state: the new state need to be set for charger
  *
  * The usb phy driver can issue this function when the usb phy driver
  * detected the charger state has been changed, in this case the charger
@@ -414,8 +414,8 @@ static int usb_add_extcon(struct usb_phy *x)
 
 /**
  * devm_usb_get_phy - find the USB PHY
- * @dev - device that requests this phy
- * @type - the type of the phy the controller requires
+ * @dev: device that requests this phy
+ * @type: the type of the phy the controller requires
  *
  * Gets the phy using usb_get_phy(), and associates a device with it using
  * devres. On driver detach, release function is invoked on the devres data,
@@ -444,7 +444,7 @@ EXPORT_SYMBOL_GPL(devm_usb_get_phy);
 
 /**
  * usb_get_phy - find the USB PHY
- * @type - the type of the phy the controller requires
+ * @type: the type of the phy the controller requires
  *
  * Returns the phy driver, after getting a refcount to it; or
  * -ENODEV if there is no such phy.  The caller is responsible for
@@ -480,9 +480,9 @@ EXPORT_SYMBOL_GPL(usb_get_phy);
 
 /**
  * devm_usb_get_phy_by_node - find the USB PHY by device_node
- * @dev - device that requests this phy
- * @node - the device_node for the phy device.
- * @nb - a notifier_block to register with the phy.
+ * @dev: device that requests this phy
+ * @node: the device_node for the phy device.
+ * @nb: a notifier_block to register with the phy.
  *
  * Returns the phy driver associated with the given device_node,
  * after getting a refcount to it, -ENODEV if there is no such phy or
@@ -540,9 +540,9 @@ EXPORT_SYMBOL_GPL(devm_usb_get_phy_by_node);
 
 /**
  * devm_usb_get_phy_by_phandle - find the USB PHY by phandle
- * @dev - device that requests this phy
- * @phandle - name of the property holding the phy phandle value
- * @index - the index of the phy
+ * @dev: device that requests this phy
+ * @phandle: name of the property holding the phy phandle value
+ * @index: the index of the phy
  *
  * Returns the phy driver associated with the given phandle value,
  * after getting a refcount to it, -ENODEV if there is no such phy or
@@ -578,8 +578,8 @@ EXPORT_SYMBOL_GPL(devm_usb_get_phy_by_phandle);
 
 /**
  * devm_usb_put_phy - release the USB PHY
- * @dev - device that wants to release this phy
- * @phy - the phy returned by devm_usb_get_phy()
+ * @dev: device that wants to release this phy
+ * @phy: the phy returned by devm_usb_get_phy()
  *
  * destroys the devres associated with this phy and invokes usb_put_phy
  * to release the phy.
@@ -615,9 +615,9 @@ void usb_put_phy(struct usb_phy *x)
 EXPORT_SYMBOL_GPL(usb_put_phy);
 
 /**
- * usb_add_phy - declare the USB PHY
+ * usb_add_phy: declare the USB PHY
  * @x: the USB phy to be used; or NULL
- * @type - the type of this PHY
+ * @type: the type of this PHY
  *
  * This call is exclusively for use by phy drivers, which
  * coordinate the activities of drivers for host and peripheral
@@ -714,6 +714,7 @@ EXPORT_SYMBOL_GPL(usb_remove_phy);
 /**
  * usb_phy_set_event - set event to phy event
  * @x: the phy returned by usb_get_phy();
+ * @event: event to set
  *
  * This sets event to phy event
  */
-- 
2.25.1


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

* [PATCH 02/30] usb: host: pci-quirks: Demote function header from kerneldoc to comment block
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
  2020-07-02 14:45 ` [PATCH 01/30] usb: phy: phy: Fix-up a whole bunch of formatting issues Lee Jones
@ 2020-07-02 14:45 ` Lee Jones
  2020-07-03 10:22   ` Mathias Nyman
  2020-07-02 14:45 ` [PATCH 03/30] usb: common: debug: Demote comment blocks which are obviously not kerneldoc Lee Jones
                   ` (28 subsequent siblings)
  30 siblings, 1 reply; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:45 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Mathias Nyman, Martin Mares, aleksey_gorelov

quirk_usb_handoff_xhci()'s function header is the only one across
the sourcefile which is denoted as a kerneldoc header.  Despite
no attempt to document its arguments.  Drop it down in status from
kerneldoc to a standard comment block to match the other headers
in the file.

Fixes the following W=1 kernel build warning:

 drivers/usb/host/pci-quirks.c:1145: warning: Function parameter or member 'pdev' not described in 'quirk_usb_handoff_xhci'

Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: Martin Mares <mj@ucw.cz>
Cc: aleksey_gorelov@phoenix.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/host/pci-quirks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 0b949acfa2589..b8961c0381cfd 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -1133,7 +1133,7 @@ void usb_disable_xhci_ports(struct pci_dev *xhci_pdev)
 }
 EXPORT_SYMBOL_GPL(usb_disable_xhci_ports);
 
-/**
+/*
  * PCI Quirks for xHCI.
  *
  * Takes care of the handoff between the Pre-OS (i.e. BIOS) and the OS.
-- 
2.25.1


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

* [PATCH 03/30] usb: common: debug: Demote comment blocks which are obviously not kerneldoc
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
  2020-07-02 14:45 ` [PATCH 01/30] usb: phy: phy: Fix-up a whole bunch of formatting issues Lee Jones
  2020-07-02 14:45 ` [PATCH 02/30] usb: host: pci-quirks: Demote function header from kerneldoc to comment block Lee Jones
@ 2020-07-02 14:45 ` Lee Jones
  2020-07-02 14:45 ` [PATCH 04/30] usb: common: usb-conn-gpio: Demote comment block which is clearly " Lee Jones
                   ` (27 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:45 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Pawel Laszczak, Felipe Balbi, Andrzej Siewior

File headers and simple comments are not kerneldoc worthy.

Fixes the following W=1 warnings:

 drivers/usb/common/debug.c:15: warning: Function parameter or member 'bRequestType' not described in 'usb_decode_get_status'
 drivers/usb/common/debug.c:15: warning: Function parameter or member 'wIndex' not described in 'usb_decode_get_status'
 drivers/usb/common/debug.c:15: warning: Function parameter or member 'wLength' not described in 'usb_decode_get_status'
 drivers/usb/common/debug.c:15: warning: Function parameter or member 'str' not described in 'usb_decode_get_status'
 drivers/usb/common/debug.c:15: warning: Function parameter or member 'size' not described in 'usb_decode_get_status'
 drivers/usb/common/debug.c:216: warning: Function parameter or member 'str' not described in 'usb_decode_ctrl'
 drivers/usb/common/debug.c:216: warning: Function parameter or member 'size' not described in 'usb_decode_ctrl'
 drivers/usb/common/debug.c:216: warning: Function parameter or member 'bRequestType' not described in 'usb_decode_ctrl'
 drivers/usb/common/debug.c:216: warning: Function parameter or member 'bRequest' not described in 'usb_decode_ctrl'
 drivers/usb/common/debug.c:216: warning: Function parameter or member 'wValue' not described in 'usb_decode_ctrl'
 drivers/usb/common/debug.c:216: warning: Function parameter or member 'wIndex' not described in 'usb_decode_ctrl'
 drivers/usb/common/debug.c:216: warning: Function parameter or member 'wLength' not described in 'usb_decode_ctrl'

Cc: Pawel Laszczak <pawell@cadence.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/common/debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/common/debug.c b/drivers/usb/common/debug.c
index 92a986aeaa5d6..092e179d5d5aa 100644
--- a/drivers/usb/common/debug.c
+++ b/drivers/usb/common/debug.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * Common USB debugging functions
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
@@ -207,7 +207,7 @@ static void usb_decode_set_isoch_delay(__u8 wValue, char *str, size_t size)
 	snprintf(str, size, "Set Isochronous Delay(Delay = %d ns)", wValue);
 }
 
-/**
+/*
  * usb_decode_ctrl - returns a string representation of ctrl request
  */
 const char *usb_decode_ctrl(char *str, size_t size, __u8 bRequestType,
-- 
2.25.1


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

* [PATCH 04/30] usb: common: usb-conn-gpio: Demote comment block which is clearly not kerneldoc
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (2 preceding siblings ...)
  2020-07-02 14:45 ` [PATCH 03/30] usb: common: debug: Demote comment blocks which are obviously not kerneldoc Lee Jones
@ 2020-07-02 14:45 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 05/30] usb: dwc3: drd: File headers are not doc headers Lee Jones
                   ` (26 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:45 UTC (permalink / raw)
  To: gregkh; +Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones, Chunfeng Yun

This block lacks a title and argument descriptions.

Fixes the following W=1 kernel build warning:

 drivers/usb/common/usb-conn-gpio.c:44: warning: Cannot understand  * "DEVICE" = VBUS and "HOST" = !ID, so we have:
 on line 44 - I thought it was a doc line

Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/common/usb-conn-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
index ed204cbb63ea1..b4051f042c79c 100644
--- a/drivers/usb/common/usb-conn-gpio.c
+++ b/drivers/usb/common/usb-conn-gpio.c
@@ -40,7 +40,7 @@ struct usb_conn_info {
 	int vbus_irq;
 };
 
-/**
+/*
  * "DEVICE" = VBUS and "HOST" = !ID, so we have:
  * Both "DEVICE" and "HOST" can't be set as active at the same time
  * so if "HOST" is active (i.e. ID is 0)  we keep "DEVICE" inactive
-- 
2.25.1


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

* [PATCH 05/30] usb: dwc3: drd: File headers are not doc headers
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (3 preceding siblings ...)
  2020-07-02 14:45 ` [PATCH 04/30] usb: common: usb-conn-gpio: Demote comment block which is clearly " Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 06/30] usb: dwc3: ulpi: " Lee Jones
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Felipe Balbi, Roger Quadros

Demote drd.c's file header to a standard comment block.

Fixes the following W=1 build warnings:

 drivers/usb/dwc3/drd.c:20: warning: Function parameter or member 'dwc' not described in 'dwc3_otg_disable_events'
 drivers/usb/dwc3/drd.c:20: warning: Function parameter or member 'disable_mask' not described in 'dwc3_otg_disable_events'

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc3/drd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
index 2e483448d6959..fd7f9a9f67dc7 100644
--- a/drivers/usb/dwc3/drd.c
+++ b/drivers/usb/dwc3/drd.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * drd.c - DesignWare USB3 DRD Controller Dual-role support
  *
  * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com
-- 
2.25.1


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

* [PATCH 06/30] usb: dwc3: ulpi: File headers are not doc headers
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (4 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 05/30] usb: dwc3: drd: File headers are not doc headers Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 07/30] usb: common: ulpi: Fix a few kerneldoc related issues Lee Jones
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Felipe Balbi, Heikki Krogerus

Demote ulpi.c's file header to a standard comment block.

Fixes the following W=1 build warning:

 drivers/usb/dwc3/ulpi.c:18: warning: Function parameter or member 'a' not described in 'DWC3_ULPI_ADDR'

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc3/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/ulpi.c b/drivers/usb/dwc3/ulpi.c
index f62b5f3c2d67d..e6e6176386a4b 100644
--- a/drivers/usb/dwc3/ulpi.c
+++ b/drivers/usb/dwc3/ulpi.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * ulpi.c - DesignWare USB3 Controller's ULPI PHY interface
  *
  * Copyright (C) 2015 Intel Corporation
-- 
2.25.1


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

* [PATCH 07/30] usb: common: ulpi: Fix a few kerneldoc related issues
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (5 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 06/30] usb: dwc3: ulpi: " Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 08/30] usb: dwc3: dwc3-omap: Do not read DMA status Lee Jones
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Felipe Balbi, Heikki Krogerus

Firstly, demote function header to standard comment block as
they are not suitable for kerneldoc.  Then provide description
for ulpi_register_driver()'s argument 'module'.  Finally rename
description for ulpi_unregister_interface()'s 'ulpi' arg.

Fixes the following W=1 warnings:

 drivers/usb/common/ulpi.c:23: warning: Function parameter or member 'ulpi' not described in 'ulpi_read'
 drivers/usb/common/ulpi.c:23: warning: Function parameter or member 'addr' not described in 'ulpi_read'
 drivers/usb/common/ulpi.c:150: warning: Function parameter or member 'module' not described in '__ulpi_register_driver'
 drivers/usb/common/ulpi.c:299: warning: Function parameter or member 'ulpi' not described in 'ulpi_unregister_interface'
 drivers/usb/common/ulpi.c:299: warning: Excess function parameter 'intrf' description in 'ulpi_unregister_interface'

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/common/ulpi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index 9a2ab6751a23c..a18d7c4222ddf 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * ulpi.c - USB ULPI PHY bus
  *
  * Copyright (C) 2015 Intel Corporation
@@ -143,6 +143,7 @@ static const struct device_type ulpi_dev_type = {
 /**
  * ulpi_register_driver - register a driver with the ULPI bus
  * @drv: driver being registered
+ * @module: ends up being THIS_MODULE
  *
  * Registers a driver with the ULPI bus.
  */
@@ -290,7 +291,7 @@ EXPORT_SYMBOL_GPL(ulpi_register_interface);
 
 /**
  * ulpi_unregister_interface - unregister ULPI interface
- * @intrf: struct ulpi_interface
+ * @ulpi: struct ulpi_interface
  *
  * Unregisters a ULPI device and it's interface that was created with
  * ulpi_create_interface().
-- 
2.25.1


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

* [PATCH 08/30] usb: dwc3: dwc3-omap: Do not read DMA status
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (6 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 07/30] usb: common: ulpi: Fix a few kerneldoc related issues Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 09/30] usb: dwc2: gadget: Do not read GINTMSK2 Lee Jones
                   ` (22 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Felipe Balbi, Andrzej Siewior, linux-omap

Commit af566a0be6e49 ("usb: dwc3: omap: get rid of dma_status") rendered
reading DMA status from the H/W even more redundant.  The variable hasn't
been read/used since 2016.  Remove the set but unused variable and the call
which populates it.

Fixes the following W=1 warning:

 drivers/usb/dwc3/dwc3-omap.c: In function ‘dwc3_omap_probe’:
 drivers/usb/dwc3/dwc3-omap.c:460:8: warning: variable ‘reg’ set but not used [-Wunused-but-set-variable]
 460 | u32 reg;
 | ^~~

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc3/dwc3-omap.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 8c3de2d258bf7..11288a370828c 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * dwc3-omap.c - OMAP Specific Glue layer
  *
  * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
@@ -457,8 +457,6 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 	int			ret;
 	int			irq;
 
-	u32			reg;
-
 	void __iomem		*base;
 
 	if (!node) {
@@ -503,9 +501,6 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 	dwc3_omap_map_offset(omap);
 	dwc3_omap_set_utmi_mode(omap);
 
-	/* check the DMA Status */
-	reg = dwc3_omap_readl(omap->base, USBOTGSS_SYSCONFIG);
-
 	ret = dwc3_omap_extcon_register(omap);
 	if (ret < 0)
 		goto err1;
-- 
2.25.1


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

* [PATCH 09/30] usb: dwc2: gadget: Do not read GINTMSK2
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (7 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 08/30] usb: dwc3: dwc3-omap: Do not read DMA status Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 10/30] usb: dwc2: gadget: Remove assigned but never used 'maxsize' Lee Jones
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Minas Harutyunyan, Ben Dooks

The value of GINTMSK2 hasn't been checked since the inception of
dwc2_gadget_wkup_alert_handler() in 2018.

Fixes the following W=1 warning:

 drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_wkup_alert_handler’:
 drivers/usb/dwc2/gadget.c:259:6: warning: variable ‘gintmsk2’ set but not used [-Wunused-but-set-variable]
 259 | u32 gintmsk2;
 | ^~~~~~~~

Cc: Minas Harutyunyan <hminas@synopsys.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc2/gadget.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 12b98b4662872..14c422ee6a069 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -256,10 +256,8 @@ int dwc2_hsotg_tx_fifo_total_depth(struct dwc2_hsotg *hsotg)
 static void dwc2_gadget_wkup_alert_handler(struct dwc2_hsotg *hsotg)
 {
 	u32 gintsts2;
-	u32 gintmsk2;
 
 	gintsts2 = dwc2_readl(hsotg, GINTSTS2);
-	gintmsk2 = dwc2_readl(hsotg, GINTMSK2);
 
 	if (gintsts2 & GINTSTS2_WKUP_ALERT_INT) {
 		dev_dbg(hsotg->dev, "%s: Wkup_Alert_Int\n", __func__);
-- 
2.25.1


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

* [PATCH 10/30] usb: dwc2: gadget: Remove assigned but never used 'maxsize'
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (8 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 09/30] usb: dwc2: gadget: Do not read GINTMSK2 Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register Lee Jones
                   ` (20 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Minas Harutyunyan, Ben Dooks

The value of 'maxsize' has not been checked since commit 729cac693eecf
("usb: dwc2: Change ISOC DDMA flow") back in 2018, so remove the set but
unused variable, which fixes the following W=1 kernel build warning:

 drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_fill_isoc_desc’:
 drivers/usb/dwc2/gadget.c:885:6: warning: variable ‘maxsize’ set but not used [-Wunused-but-set-variable]
 885 | u32 maxsize = 0;
 | ^~~~~~~

Cc: Minas Harutyunyan <hminas@synopsys.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc2/gadget.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 14c422ee6a069..116e6175c7a48 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -880,11 +880,10 @@ static int dwc2_gadget_fill_isoc_desc(struct dwc2_hsotg_ep *hs_ep,
 	struct dwc2_dma_desc *desc;
 	struct dwc2_hsotg *hsotg = hs_ep->parent;
 	u32 index;
-	u32 maxsize = 0;
 	u32 mask = 0;
 	u8 pid = 0;
 
-	maxsize = dwc2_gadget_get_desc_params(hs_ep, &mask);
+	dwc2_gadget_get_desc_params(hs_ep, &mask);
 
 	index = hs_ep->next_desc;
 	desc = &hs_ep->desc_list[index];
-- 
2.25.1


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

* [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (9 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 10/30] usb: dwc2: gadget: Remove assigned but never used 'maxsize' Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-03  7:29   ` Greg KH
  2020-07-02 14:46 ` [PATCH 12/30] usb: host: ehci-omap: Provide documentation for ehci_hcd_omap_probe()'s arg 'pdev' Lee Jones
                   ` (19 subsequent siblings)
  30 siblings, 1 reply; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Minas Harutyunyan, Ben Dooks

Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved
these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015.  The assigned
value hasn't been read back since.  Let's remove the unnecessary H/W read.

Fixes the following W=1 warning:

 drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’:
 drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable]
 2981 | u32 ctrl;
 | ^~~~

Cc: Minas Harutyunyan <hminas@synopsys.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc2/gadget.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 116e6175c7a48..fa07e3fcb8841 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2975,10 +2975,8 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx,
 	u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx);
 	u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx);
 	u32 ints;
-	u32 ctrl;
 
 	ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in);
-	ctrl = dwc2_readl(hsotg, epctl_reg);
 
 	/* Clear endpoint interrupts */
 	dwc2_writel(hsotg, ints, epint_reg);
-- 
2.25.1


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

* [PATCH 12/30] usb: host: ehci-omap: Provide documentation for ehci_hcd_omap_probe()'s arg 'pdev'
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (10 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 13/30] usb: cdns3: core: Fix incorrect formatting and misspelled function arg docs Lee Jones
                   ` (18 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones, Alan Stern,
	Vikram Pandita, Anand Gadiyar, Keshava Munegowda, Roger Quadros,
	Felipe Balbi, linux-omap

Description for 'pdev' argument was missing from the function header.

Fixes the following W=1 warning:

 drivers/usb/host/ehci-omap.c:87: warning: Function parameter or member 'pdev' not described in 'ehci_hcd_omap_probe'

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Vikram Pandita <vikram.pandita@ti.com>
Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/host/ehci-omap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index fc125b3d06e7d..2ec686e28582a 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -78,6 +78,7 @@ static const struct ehci_driver_overrides ehci_omap_overrides __initconst = {
 
 /**
  * ehci_hcd_omap_probe - initialize TI-based HCDs
+ * @pdev: Pointer to this platform device's information
  *
  * Allocates basic resources for this USB host controller, and
  * then invokes the start() method for the HCD associated with it
-- 
2.25.1


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

* [PATCH 13/30] usb: cdns3: core: Fix incorrect formatting and misspelled function arg docs
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (11 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 12/30] usb: host: ehci-omap: Provide documentation for ehci_hcd_omap_probe()'s arg 'pdev' Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 14/30] usb: cdns3: ep0: Fix a bunch of kerneldoc issues Lee Jones
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Pawel Laszczak, Peter Chen, Roger Quadros

There are 3 misspellings and 1 incorrect format used in this file's
kerneldoc function headers.  Fixing them squashes the following W=1
kernel build warnings:

 drivers/usb/cdns3/gadget.c:653: warning: Function parameter or member 'priv_ep' not described in 'cdns3_wa2_descmissing_packet'
 drivers/usb/cdns3/gadget.c:653: warning: Excess function parameter 'priv_dev' description in 'cdns3_wa2_descmissing_packet'
 drivers/usb/cdns3/gadget.c:1088: warning: Function parameter or member 'request' not described in 'cdns3_ep_run_transfer'
 drivers/usb/cdns3/gadget.c:2574: warning: Function parameter or member 'priv_ep' not described in '__cdns3_gadget_ep_set_halt'
 drivers/usb/cdns3/gadget.c:2574: warning: Excess function parameter 'ep' description in '__cdns3_gadget_ep_set_halt'
 drivers/usb/cdns3/gadget.c:2595: warning: Function parameter or member 'priv_ep' not described in '__cdns3_gadget_ep_clear_halt'
 drivers/usb/cdns3/gadget.c:2595: warning: Excess function parameter 'ep' description in '__cdns3_gadget_ep_clear_halt'
 drivers/usb/cdns3/gadget.c:2898: warning: Function parameter or member 'priv_dev' not described in 'cdns3_init_eps'
 drivers/usb/cdns3/gadget.c:2898: warning: Excess function parameter 'cdns3' description in 'cdns3_init_eps'
 drivers/usb/cdns3/gadget.c:3210: warning: Function parameter or member 'cdns' not described in 'cdns3_gadget_init'

Cc: Pawel Laszczak <pawell@cadence.com>
Cc: Peter Chen <peter.chen@nxp.com>
Cc: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/cdns3/core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 19bbb5b7e6b6c..59e5e213a99bb 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -282,7 +282,7 @@ static int cdns3_idle_init(struct cdns3 *cdns)
 
 /**
  * cdns3_hw_role_switch - switch roles based on HW state
- * @cdns3: controller
+ * @cdns: controller
  */
 int cdns3_hw_role_switch(struct cdns3 *cdns)
 {
@@ -320,7 +320,7 @@ int cdns3_hw_role_switch(struct cdns3 *cdns)
 /**
  * cdsn3_role_get - get current role of controller.
  *
- * @dev: Pointer to device structure
+ * @sw: pointer to USB role switch structure
  *
  * Returns role
  */
@@ -334,8 +334,8 @@ static enum usb_role cdns3_role_get(struct usb_role_switch *sw)
 /**
  * cdns3_role_set - set current role of controller.
  *
- * @dev: pointer to device object
- * @role - the previous role
+ * @sw: pointer to USB role switch structure
+ * @role: the previous role
  * Handles below events:
  * - Role switch for dual-role devices
  * - USB_ROLE_GADGET <--> USB_ROLE_NONE for peripheral-only devices
-- 
2.25.1


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

* [PATCH 14/30] usb: cdns3: ep0: Fix a bunch of kerneldoc issues
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (12 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 13/30] usb: cdns3: core: Fix incorrect formatting and misspelled function arg docs Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 15/30] usb: dwc3: dwc3-haps: Function headers are not suitable for kerneldoc Lee Jones
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Pawel Laszczak, Pawel Jez, Peter Chen

Add some missing function argument descriptions for 'ep', 'desc'
and 'zlp', and correct spelling/bitrot issues surrounding the
correct spelling of present args.

Fixes the following W=1 warnings:

 drivers/usb/cdns3/ep0.c:36: warning: Function parameter or member 'zlp' not described in 'cdns3_ep0_run_transfer'
 drivers/usb/cdns3/ep0.c:236: warning: Function parameter or member 'ctrl' not described in 'cdns3_req_ep0_get_status'
 drivers/usb/cdns3/ep0.c:236: warning: Excess function parameter 'ctrl_req' description in 'cdns3_req_ep0_get_status'
 drivers/usb/cdns3/ep0.c:411: warning: Function parameter or member 'ctrl' not described in 'cdns3_req_ep0_handle_feature'
 drivers/usb/cdns3/ep0.c:411: warning: Excess function parameter 'ctrl_req' description in 'cdns3_req_ep0_handle_feature'
 drivers/usb/cdns3/ep0.c:661: warning: Function parameter or member 'ep' not described in 'cdns3_gadget_ep0_enable'
 drivers/usb/cdns3/ep0.c:661: warning: Function parameter or member 'desc' not described in 'cdns3_gadget_ep0_enable'
 drivers/usb/cdns3/ep0.c:671: warning: Function parameter or member 'ep' not described in 'cdns3_gadget_ep0_disable'
 drivers/usb/cdns3/ep0.c:867: warning: Function parameter or member 'priv_ep' not described in 'cdns3_init_ep0'
 drivers/usb/cdns3/ep0.c:867: warning: Excess function parameter 'ep_priv' description in 'cdns3_init_ep0'

Cc: Pawel Laszczak <pawell@cadence.com>
Cc: Pawel Jez <pjez@cadence.com>
Cc: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/cdns3/ep0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index 82645a2a0f529..5b3f682338e50 100644
--- a/drivers/usb/cdns3/ep0.c
+++ b/drivers/usb/cdns3/ep0.c
@@ -227,7 +227,7 @@ static int cdns3_req_ep0_set_address(struct cdns3_device *priv_dev,
 /**
  * cdns3_req_ep0_get_status - Handling of GET_STATUS standard USB request
  * @priv_dev: extended gadget object
- * @ctrl_req: pointer to received setup packet
+ * @ctrl: pointer to received setup packet
  *
  * Returns 0 if success, error code on error
  */
@@ -400,7 +400,7 @@ static int cdns3_ep0_feature_handle_endpoint(struct cdns3_device *priv_dev,
  * Handling of GET/SET_FEATURE standard USB request
  *
  * @priv_dev: extended gadget object
- * @ctrl_req: pointer to received setup packet
+ * @ctrl: pointer to received setup packet
  * @set: must be set to 1 for SET_FEATURE request
  *
  * Returns 0 if success, error code on error
@@ -653,6 +653,9 @@ void cdns3_check_ep0_interrupt_proceed(struct cdns3_device *priv_dev, int dir)
 
 /**
  * cdns3_gadget_ep0_enable
+ * @ep: pointer to endpoint zero object
+ * @desc: pointer to usb endpoint descriptor
+ *
  * Function shouldn't be called by gadget driver,
  * endpoint 0 is allways active
  */
@@ -664,6 +667,8 @@ static int cdns3_gadget_ep0_enable(struct usb_ep *ep,
 
 /**
  * cdns3_gadget_ep0_disable
+ * @ep: pointer to endpoint zero object
+ *
  * Function shouldn't be called by gadget driver,
  * endpoint 0 is allways active
  */
@@ -690,6 +695,7 @@ static int cdns3_gadget_ep0_set_halt(struct usb_ep *ep, int value)
  * @ep: pointer to endpoint zero object
  * @request: pointer to request object
  * @gfp_flags: gfp flags
+ * @zlp: add zero length packet
  *
  * Returns 0 on success, error code elsewhere
  */
@@ -858,7 +864,7 @@ void cdns3_ep0_config(struct cdns3_device *priv_dev)
 /**
  * cdns3_init_ep0 Initializes software endpoint 0 of gadget
  * @priv_dev: extended gadget object
- * @ep_priv: extended endpoint object
+ * @priv_ep: extended endpoint object
  *
  * Returns 0 on success else error code.
  */
-- 
2.25.1


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

* [PATCH 15/30] usb: dwc3: dwc3-haps: Function headers are not suitable for kerneldoc
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (13 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 14/30] usb: cdns3: ep0: Fix a bunch of kerneldoc issues Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 16/30] usb: mtu3: mtu3_trace: " Lee Jones
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Felipe Balbi, Thinh Nguyen, John Youn

Fixes the following W=1 kernel build warnings:

 drivers/usb/dwc3/dwc3-haps.c:19: warning: Incorrect use of kernel-doc format:  * struct dwc3_haps - Driver private structure
 drivers/usb/dwc3/dwc3-haps.c:23: warning: cannot understand function prototype: 'struct dwc3_haps '

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Thinh Nguyen <thinhn@synopsys.com>
Cc: John Youn <johnyoun@synopsys.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc3/dwc3-haps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-haps.c b/drivers/usb/dwc3/dwc3-haps.c
index 3cecbf1694526..55b4a901168e8 100644
--- a/drivers/usb/dwc3/dwc3-haps.c
+++ b/drivers/usb/dwc3/dwc3-haps.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * dwc3-haps.c - Synopsys HAPS PCI Specific glue layer
  *
  * Copyright (C) 2018 Synopsys, Inc.
-- 
2.25.1


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

* [PATCH 16/30] usb: mtu3: mtu3_trace: Function headers are not suitable for kerneldoc
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (14 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 15/30] usb: dwc3: dwc3-haps: Function headers are not suitable for kerneldoc Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-03  1:41   ` Chunfeng Yun
  2020-07-02 14:46 ` [PATCH 17/30] usb: cdns3: gadget: Fix a bunch of kernel doc issues Lee Jones
                   ` (14 subsequent siblings)
  30 siblings, 1 reply; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Chunfeng Yun, linux-mediatek

Fixes the following W=1 kernel build warnings:

 drivers/usb/mtu3/mtu3_trace.c:13:6: warning: no previous prototype for ‘mtu3_dbg_trace’ [-Wmissing-prototypes]
 13 | void mtu3_dbg_trace(struct device *dev, const char *fmt, ...)
 | ^~~~~~~~~~~~~~

Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: linux-mediatek@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/mtu3/mtu3_trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/mtu3/mtu3_trace.c b/drivers/usb/mtu3/mtu3_trace.c
index 4f5e7857ec312..155eae126e5e2 100644
--- a/drivers/usb/mtu3/mtu3_trace.c
+++ b/drivers/usb/mtu3/mtu3_trace.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * mtu3_trace.c - trace support
  *
  * Copyright (C) 2019 MediaTek Inc.
-- 
2.25.1


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

* [PATCH 17/30] usb: cdns3: gadget: Fix a bunch of kernel doc issues
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (15 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 16/30] usb: mtu3: mtu3_trace: " Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 18/30] usb: dwc3: dwc3-of-simple: Function headers are not good candidates for kerneldoc Lee Jones
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Pawel Laszczak, Pawel Jez, Peter Chen

Mainline misspelled function argument descriptions.  Also one
formatting issue with a missing '@' identifier.

Fixes the following W=1 build warnings:

 drivers/usb/cdns3/gadget.c:653: warning: Function parameter or member 'priv_ep' not described in 'cdns3_wa2_descmissing_packet'
 drivers/usb/cdns3/gadget.c:653: warning: Excess function parameter 'priv_dev' description in 'cdns3_wa2_descmissing_packet'
 drivers/usb/cdns3/gadget.c:1088: warning: Function parameter or member 'request' not described in 'cdns3_ep_run_transfer'
 drivers/usb/cdns3/gadget.c:2574: warning: Function parameter or member 'priv_ep' not described in '__cdns3_gadget_ep_set_halt'
 drivers/usb/cdns3/gadget.c:2574: warning: Excess function parameter 'ep' description in '__cdns3_gadget_ep_set_halt'
 drivers/usb/cdns3/gadget.c:2595: warning: Function parameter or member 'priv_ep' not described in '__cdns3_gadget_ep_clear_halt'
 drivers/usb/cdns3/gadget.c:2595: warning: Excess function parameter 'ep' description in '__cdns3_gadget_ep_clear_halt'
 drivers/usb/cdns3/gadget.c:2898: warning: Function parameter or member 'priv_dev' not described in 'cdns3_init_eps'
 drivers/usb/cdns3/gadget.c:2898: warning: Excess function parameter 'cdns3' description in 'cdns3_init_eps'
 drivers/usb/cdns3/gadget.c:3210: warning: Function parameter or member 'cdns' not described in 'cdns3_gadget_init'

Cc: Pawel Laszczak <pawell@cadence.com>
Cc: Pawel Jez <pjez@cadence.com>
Cc: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/cdns3/gadget.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index 5e24c2e57c0d8..bfb1cbd492892 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -644,7 +644,7 @@ static void cdns3_wa2_remove_old_request(struct cdns3_endpoint *priv_ep)
 
 /**
  * cdns3_wa2_descmissing_packet - handles descriptor missing event.
- * @priv_dev: extended gadget object
+ * @priv_ep: extended gadget object
  *
  * This function is used only for WA2. For more information see Work around 2
  * description.
@@ -1080,6 +1080,7 @@ static int cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep,
 /**
  * cdns3_ep_run_transfer - start transfer on no-default endpoint hardware
  * @priv_ep: endpoint object
+ * @request: request object
  *
  * Returns zero on success or negative value on failure
  */
@@ -2568,7 +2569,7 @@ int cdns3_gadget_ep_dequeue(struct usb_ep *ep,
 /**
  * __cdns3_gadget_ep_set_halt Sets stall on selected endpoint
  * Should be called after acquiring spin_lock and selecting ep
- * @ep: endpoint object to set stall on.
+ * @priv_ep: endpoint object to set stall on.
  */
 void __cdns3_gadget_ep_set_halt(struct cdns3_endpoint *priv_ep)
 {
@@ -2589,7 +2590,7 @@ void __cdns3_gadget_ep_set_halt(struct cdns3_endpoint *priv_ep)
 /**
  * __cdns3_gadget_ep_clear_halt Clears stall on selected endpoint
  * Should be called after acquiring spin_lock and selecting ep
- * @ep: endpoint object to clear stall on
+ * @priv_ep: endpoint object to clear stall on
  */
 int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep)
 {
@@ -2890,7 +2891,7 @@ static void cdns3_free_all_eps(struct cdns3_device *priv_dev)
 
 /**
  * cdns3_init_eps Initializes software endpoints of gadget
- * @cdns3: extended gadget object
+ * @priv_dev: extended gadget object
  *
  * Returns 0 on success, error code elsewhere
  */
@@ -3202,7 +3203,7 @@ static int cdns3_gadget_resume(struct cdns3 *cdns, bool hibernated)
 /**
  * cdns3_gadget_init - initialize device structure
  *
- * cdns: cdns3 instance
+ * @cdns: cdns3 instance
  *
  * This function initializes the gadget.
  */
-- 
2.25.1


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

* [PATCH 18/30] usb: dwc3: dwc3-of-simple: Function headers are not good candidates for kerneldoc
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (16 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 17/30] usb: cdns3: gadget: Fix a bunch of kernel doc issues Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 19/30] usb: host: isp1362: Mark the many unused ISP1362_REG entries as __maybe_unused Lee Jones
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Felipe Balbi, iivanov, Sundeep Bhatta

Fixes the following kernel build warning(s):

 drivers/usb/dwc3/dwc3-of-simple.c:25: warning: cannot understand function prototype: 'struct dwc3_of_simple '

Cc: Felipe Balbi <balbi@kernel.org>
Cc: iivanov@mm-sol.com
Cc: Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc3/dwc3-of-simple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
index 8852fbfdead4e..34c828c221977 100644
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * dwc3-of-simple.c - OF glue layer for simple integrations
  *
  * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
-- 
2.25.1


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

* [PATCH 19/30] usb: host: isp1362: Mark the many unused ISP1362_REG entries as __maybe_unused
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (17 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 18/30] usb: dwc3: dwc3-of-simple: Function headers are not good candidates for kerneldoc Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 20/30] usb: host: ohci-at91: Demote kerneldoc headers down to basic comment blocks Lee Jones
                   ` (11 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones, by L. Wassmann

It would seem a shame to strip out all of the unused register entries,
since they can act as a fair source of documentation.  Instead, mark
them all as __maybe_unused to show the build system that this behaviour
is known and intentional.

Fixes the following kernel build warning(s):

 In file included from drivers/usb/host/isp1362-hcd.c:96:
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGALTTMR’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:199:1: note: in expansion of macro ‘ISP1362_REG’
 199 | ISP1362_REG(OTGALTTMR, 0x6C, REG_WIDTH_16, REG_ACCESS_RW);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGTIMER’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:198:1: note: in expansion of macro ‘ISP1362_REG’
 198 | ISP1362_REG(OTGTIMER, 0x6A, REG_WIDTH_16, REG_ACCESS_RW);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGINTENB’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:197:1: note: in expansion of macro ‘ISP1362_REG’
 197 | ISP1362_REG(OTGINTENB, 0x69, REG_WIDTH_16, REG_ACCESS_RW);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGINT’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:196:1: note: in expansion of macro ‘ISP1362_REG’
 196 | ISP1362_REG(OTGINT, 0x68, REG_WIDTH_16, REG_ACCESS_RW);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGSTATUS’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:195:1: note: in expansion of macro ‘ISP1362_REG’
 195 | ISP1362_REG(OTGSTATUS, 0x67, REG_WIDTH_16, REG_ACCESS_R);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGCONTROL’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:194:1: note: in expansion of macro ‘ISP1362_REG’
 194 | ISP1362_REG(OTGCONTROL, 0x62, REG_WIDTH_16, REG_ACCESS_RW);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCATLPORT’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:183:1: note: in expansion of macro ‘ISP1362_REG’
 183 | ISP1362_REG(HCATLPORT, 0x44, REG_WIDTH_16, REG_ACCESS_RW);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCINTLPORT’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:175:1: note: in expansion of macro ‘ISP1362_REG’
 175 | ISP1362_REG(HCINTLPORT, 0x43, REG_WIDTH_16, REG_ACCESS_RW);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCISTL1PORT’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:171:1: note: in expansion of macro ‘ISP1362_REG’
 171 | ISP1362_REG(HCISTL1PORT, 0x42, REG_WIDTH_16, REG_ACCESS_RW);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCISTL0PORT’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:170:1: note: in expansion of macro ‘ISP1362_REG’
 170 | ISP1362_REG(HCISTL0PORT, 0x40, REG_WIDTH_16, REG_ACCESS_RW);
 | ^~~~~~~~~~~
 drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCINTDIS’ defined but not used [-Wunused-const-variable=]
 59 | static isp1362_reg_t ISP1362_REG_##name = addr
 | ^~~~~~~~~~~~
 drivers/usb/host/isp1362.h:77:1: note: in expansion of macro ‘ISP1362_REG’
 77 | ISP1362_REG(HCINTDIS, 0x05, REG_WIDTH_32, REG_ACCESS_RW);
 | ^~~~~~~~~~~

Cc: "by L. Wassmann" <LW@KARO-electronics.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/host/isp1362.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/isp1362.h b/drivers/usb/host/isp1362.h
index 4c49688a069d1..9bbfcc3fdd3cc 100644
--- a/drivers/usb/host/isp1362.h
+++ b/drivers/usb/host/isp1362.h
@@ -56,7 +56,7 @@ typedef const unsigned char isp1362_reg_t;
 #define ISP1362_REG_NO(r)		(r)
 
 #define ISP1362_REG(name, addr, width, rw) \
-static isp1362_reg_t ISP1362_REG_##name = addr
+static isp1362_reg_t __maybe_unused ISP1362_REG_##name = addr
 
 #define REG_ACCESS_TEST(r)		do {} while (0)
 #define REG_WIDTH_TEST(r, w)		do {} while (0)
-- 
2.25.1


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

* [PATCH 20/30] usb: host: ohci-at91: Demote kerneldoc headers down to basic comment blocks
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (18 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 19/30] usb: host: isp1362: Mark the many unused ISP1362_REG entries as __maybe_unused Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 21/30] usb: host: ohci: Mark cc_to_error as __maybe_unused Lee Jones
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones, Alan Stern,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Thibaut VARENE

Neither usb_hcd_at91_probe() nor usb_hcd_at91_remove()'s function
headers reach the standards required of a kerneldoc entry.  Only
one attempt at describing an argument was made, as it is not
correct (we're removing that too to save confusion).

Fixes the following kernel build warning(s):

 drivers/usb/host/ohci-at91.c:166: warning: Function parameter or member 'driver' not described in 'usb_hcd_at91_probe'
 drivers/usb/host/ohci-at91.c:166: warning: Function parameter or member 'pdev' not described in 'usb_hcd_at91_probe'
 drivers/usb/host/ohci-at91.c:259: warning: Function parameter or member 'hcd' not described in 'usb_hcd_at91_remove'
 drivers/usb/host/ohci-at91.c:259: warning: Function parameter or member 'pdev' not described in 'usb_hcd_at91_remove'
 drivers/usb/host/ohci-at91.c:259: warning: Excess function parameter 'dev' description in 'usb_hcd_at91_remove'

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Thibaut VARENE <varenet@parisc-linux.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/host/ohci-at91.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index b635c6a1b1a91..0487a4b0501ec 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -153,7 +153,7 @@ static struct regmap *at91_dt_syscon_sfr(void)
 /* always called with process context; sleeping is OK */
 
 
-/**
+/*
  * usb_hcd_at91_probe - initialize AT91-based HCDs
  * Context: !in_interrupt()
  *
@@ -244,9 +244,8 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
 
 /* may be called with controller, bus, and devices active */
 
-/**
+/*
  * usb_hcd_at91_remove - shutdown processing for AT91-based HCDs
- * @dev: USB Host Controller being removed
  * Context: !in_interrupt()
  *
  * Reverses the effect of usb_hcd_at91_probe(), first invoking
-- 
2.25.1


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

* [PATCH 21/30] usb: host: ohci: Mark cc_to_error as __maybe_unused
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (19 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 20/30] usb: host: ohci-at91: Demote kerneldoc headers down to basic comment blocks Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 22/30] usb: cdns3: ep0: Move 'zlp' description to appropriate function header Lee Jones
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones, Alan Stern,
	Roman Weissgaerber, David Brownell

drivers/usb/host/ohci.h in included by a whole much of different
sourcefiles.  Not all of them make use of cc_to_error.  So mark
it as __maybe_used to convey that this behaviour is not only
acceptable it's expected.

Fixes the following kernel build warning(s):

 In file included from drivers/usb/host/ohci-pci.c:25:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-platform.c:32:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-exynos.c:20:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-spear.c:22:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-st.c:26:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-at91.c:31:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-s3c2410.c:32:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Roman Weissgaerber <weissg@vienna.at>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/host/ohci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index b85a39588f9d9..aac6285b37f80 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -162,7 +162,7 @@ struct td {
 
 
 /* map OHCI TD status codes (CC) to errno values */
-static const int cc_to_error [16] = {
+static const int __maybe_unused cc_to_error [16] = {
 	/* No  Error  */               0,
 	/* CRC Error  */               -EILSEQ,
 	/* Bit Stuff  */               -EPROTO,
-- 
2.25.1


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

* [PATCH 22/30] usb: cdns3: ep0: Move 'zlp' description to appropriate function header
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (20 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 21/30] usb: host: ohci: Mark cc_to_error as __maybe_unused Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 23/30] usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef OXU_URB_TRACE' Lee Jones
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Pawel Laszczak, Pawel Jez, Peter Chen

'zlp' was documented, but in the wrong place.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/cdns3/ep0.c:36: warning: Function parameter or member 'zlp' not described in 'cdns3_ep0_run_transfer'
 drivers/usb/cdns3/ep0.c:705: warning: Excess function parameter 'zlp' description in 'cdns3_gadget_ep0_queue'

Cc: Pawel Laszczak <pawell@cadence.com>
Cc: Pawel Jez <pjez@cadence.com>
Cc: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/cdns3/ep0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index 5b3f682338e50..5b1aec80b2d7f 100644
--- a/drivers/usb/cdns3/ep0.c
+++ b/drivers/usb/cdns3/ep0.c
@@ -29,6 +29,7 @@ static struct usb_endpoint_descriptor cdns3_gadget_ep0_desc = {
  * @length: data length
  * @erdy: set it to 1 when ERDY packet should be sent -
  *        exit from flow control state
+ * @zlp: add zero length packet
  */
 static void cdns3_ep0_run_transfer(struct cdns3_device *priv_dev,
 				   dma_addr_t dma_addr,
@@ -695,7 +696,6 @@ static int cdns3_gadget_ep0_set_halt(struct usb_ep *ep, int value)
  * @ep: pointer to endpoint zero object
  * @request: pointer to request object
  * @gfp_flags: gfp flags
- * @zlp: add zero length packet
  *
  * Returns 0 on success, error code elsewhere
  */
-- 
2.25.1


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

* [PATCH 23/30] usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef OXU_URB_TRACE'
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (21 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 22/30] usb: cdns3: ep0: Move 'zlp' description to appropriate function header Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-03  7:36   ` Greg KH
  2020-07-02 14:46 ` [PATCH 24/30] usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file Lee Jones
                   ` (7 subsequent siblings)
  30 siblings, 1 reply; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Masahiro Yamada, Rodolfo Giometti, Eurotech S.p.A

If we assign 'epnum' during the declaration we can also avoid "ISO
C90 forbids mixed declarations" issues.  So it does looks like we
can have our cake and eat it in this scenario.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/host/oxu210hp-hcd.c: In function ‘submit_async’:
 drivers/usb/host/oxu210hp-hcd.c:2040:19: warning: variable ‘qtd’ set but not used [-Wunused-but-set-variable]
 2040 | struct ehci_qtd *qtd;
 | ^~~

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Rodolfo Giometti <giometti@linux.it>
Cc: "Eurotech S.p.A" <info@eurtech.it>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/host/oxu210hp-hcd.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 120666a0d5901..b00673295c9fe 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -2037,16 +2037,15 @@ static struct ehci_qh *qh_append_tds(struct oxu_hcd *oxu,
 static int submit_async(struct oxu_hcd	*oxu, struct urb *urb,
 			struct list_head *qtd_list, gfp_t mem_flags)
 {
-	struct ehci_qtd	*qtd;
-	int epnum;
+	int epnum = urb->ep->desc.bEndpointAddress;
 	unsigned long flags;
 	struct ehci_qh *qh = NULL;
 	int rc = 0;
+#ifdef OXU_URB_TRACE
+	struct ehci_qtd	*qtd;
 
 	qtd = list_entry(qtd_list->next, struct ehci_qtd, qtd_list);
-	epnum = urb->ep->desc.bEndpointAddress;
 
-#ifdef OXU_URB_TRACE
 	oxu_dbg(oxu, "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
 		__func__, urb->dev->devpath, urb,
 		epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out",
-- 
2.25.1


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

* [PATCH 24/30] usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (22 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 23/30] usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef OXU_URB_TRACE' Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-03  5:41   ` kernel test robot
  2020-07-02 14:46 ` [PATCH 25/30] usb: mtu3: mtu3_core: Demote obvious misuse of kerneldoc to standard comment block Lee Jones
                   ` (6 subsequent siblings)
  30 siblings, 1 reply; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Chunfeng Yun, linux-mediatek

If the header file containing a function's prototype isn't included by
the sourcefile containing the associated function, the build system
complains of missing prototypes.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/mtu3/mtu3_trace.c:13:6: warning: no previous prototype for ‘mtu3_dbg_trace’ [-Wmissing-prototypes]
 13 | void mtu3_dbg_trace(struct device *dev, const char *fmt, ...)
 | ^~~~~~~~~~~~~~

Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/mtu3/mtu3_trace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/mtu3/mtu3_trace.c b/drivers/usb/mtu3/mtu3_trace.c
index 155eae126e5e2..d17ddb87cdcf2 100644
--- a/drivers/usb/mtu3/mtu3_trace.c
+++ b/drivers/usb/mtu3/mtu3_trace.c
@@ -8,6 +8,7 @@
  */
 
 #define CREATE_TRACE_POINTS
+#include "mtu3_debug.h"
 #include "mtu3_trace.h"
 
 void mtu3_dbg_trace(struct device *dev, const char *fmt, ...)
-- 
2.25.1


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

* [PATCH 25/30] usb: mtu3: mtu3_core: Demote obvious misuse of kerneldoc to standard comment block
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (23 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 24/30] usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 26/30] usb: c67x00: c67x00-ll-hpi: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Chunfeng Yun, linux-mediatek

No attempt has been made to document the function.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/mtu3/mtu3_core.c:805: warning: Function parameter or member 'mtu' not described in 'mtu3_set_dma_mask'

Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/mtu3/mtu3_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index 9dd02160cca97..6d515eb67ea79 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
@@ -797,7 +797,7 @@ static void mtu3_hw_exit(struct mtu3 *mtu)
 	mtu3_mem_free(mtu);
 }
 
-/**
+/*
  * we set 32-bit DMA mask by default, here check whether the controller
  * supports 36-bit DMA or not, if it does, set 36-bit DMA mask.
  */
-- 
2.25.1


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

* [PATCH 26/30] usb: c67x00: c67x00-ll-hpi: Demote obvious misuse of kerneldoc to standard comment blocks
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (24 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 25/30] usb: mtu3: mtu3_core: Demote obvious misuse of kerneldoc to standard comment block Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 27/30] usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s manage_power arg Lee Jones
                   ` (4 subsequent siblings)
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones, Peter Korsgaard

No attempt has been made to document any of the functions here.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/c67x00/c67x00-ll-hpi.c:269: warning: Function parameter or member 'sie' not described in 'c67x00_ll_usb_clear_status'
 drivers/usb/c67x00/c67x00-ll-hpi.c:269: warning: Function parameter or member 'bits' not described in 'c67x00_ll_usb_clear_status'
 drivers/usb/c67x00/c67x00-ll-hpi.c:404: warning: Function parameter or member 'dev' not described in 'c67x00_ll_write_mem_le16'
 drivers/usb/c67x00/c67x00-ll-hpi.c:404: warning: Function parameter or member 'addr' not described in 'c67x00_ll_write_mem_le16'
 drivers/usb/c67x00/c67x00-ll-hpi.c:404: warning: Function parameter or member 'data' not described in 'c67x00_ll_write_mem_le16'
 drivers/usb/c67x00/c67x00-ll-hpi.c:404: warning: Function parameter or member 'len' not described in 'c67x00_ll_write_mem_le16'
 drivers/usb/c67x00/c67x00-ll-hpi.c:443: warning: Function parameter or member 'dev' not described in 'c67x00_ll_read_mem_le16'
 drivers/usb/c67x00/c67x00-ll-hpi.c:443: warning: Function parameter or member 'addr' not described in 'c67x00_ll_read_mem_le16'
 drivers/usb/c67x00/c67x00-ll-hpi.c:443: warning: Function parameter or member 'data' not described in 'c67x00_ll_read_mem_le16'
 drivers/usb/c67x00/c67x00-ll-hpi.c:443: warning: Function parameter or member 'len' not described in 'c67x00_ll_read_mem_le16'

Cc: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/c67x00/c67x00-ll-hpi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/c67x00/c67x00-ll-hpi.c b/drivers/usb/c67x00/c67x00-ll-hpi.c
index e1fe3603140a8..7a214a3a6cc70 100644
--- a/drivers/usb/c67x00/c67x00-ll-hpi.c
+++ b/drivers/usb/c67x00/c67x00-ll-hpi.c
@@ -262,7 +262,7 @@ u16 c67x00_ll_get_usb_ctl(struct c67x00_sie *sie)
 	return hpi_read_word(sie->dev, USB_CTL_REG(sie->sie_num));
 }
 
-/**
+/*
  * c67x00_ll_usb_clear_status - clear the USB status bits
  */
 void c67x00_ll_usb_clear_status(struct c67x00_sie *sie, u16 bits)
@@ -395,7 +395,7 @@ int c67x00_ll_reset(struct c67x00_device *dev)
 
 /* -------------------------------------------------------------------------- */
 
-/**
+/*
  * c67x00_ll_write_mem_le16 - write into c67x00 memory
  * Only data is little endian, addr has cpu endianess.
  */
@@ -434,7 +434,7 @@ void c67x00_ll_write_mem_le16(struct c67x00_device *dev, u16 addr,
 	}
 }
 
-/**
+/*
  * c67x00_ll_read_mem_le16 - read from c67x00 memory
  * Only data is little endian, addr has cpu endianess.
  */
-- 
2.25.1


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

* [PATCH 27/30] usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s manage_power arg
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (25 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 26/30] usb: c67x00: c67x00-ll-hpi: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-03  7:32   ` Greg KH
  2020-07-02 14:46 ` [PATCH 28/30] usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
                   ` (3 subsequent siblings)
  30 siblings, 1 reply; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones, Oliver Neukum

A good attempt was made to document everything else.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/class/cdc-wdm.c:961: warning: Function parameter or member 'manage_power' not described in 'usb_cdc_wdm_register'

Cc: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/class/cdc-wdm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index e3db6fbeadef8..4dceaeca46e73 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -940,7 +940,8 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
  * @intf: usb interface the subdriver will associate with
  * @ep: interrupt endpoint to monitor for notifications
  * @bufsize: maximum message size to support for read/write
- *
+ * @manage_power: call-back invoked during open and release to
+ *                manage the device's power 
  * Create WDM usb class character device and associate it with intf
  * without binding, allowing another driver to manage the interface.
  *
-- 
2.25.1


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

* [PATCH 28/30] usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to standard comment blocks
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (26 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 27/30] usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s manage_power arg Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-03  7:34   ` Greg KH
  2020-07-02 14:46 ` [PATCH 29/30] usb: class: usbtmc: File headers are not good candidates for kerneldoc Lee Jones
                   ` (2 subsequent siblings)
  30 siblings, 1 reply; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones,
	Peter Korsgaard, Oliver Neukum

No attempt has been made to document any of the functions here.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/c67x00/c67x00-hcd.c:237: warning: Function parameter or member 'sie' not described in 'c67x00_hcd_irq'
 drivers/usb/c67x00/c67x00-hcd.c:237: warning: Function parameter or member 'int_status' not described in 'c67x00_hcd_irq'
 drivers/usb/c67x00/c67x00-hcd.c:237: warning: Function parameter or member 'msg' not described in 'c67x00_hcd_irq'
 drivers/usb/c67x00/c67x00-hcd.c:267: warning: Function parameter or member 'hcd' not described in 'c67x00_hcd_start'
 drivers/usb/c67x00/c67x00-hcd.c:279: warning: Function parameter or member 'hcd' not described in 'c67x00_hcd_stop'

Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/c67x00/c67x00-hcd.c | 6 +++---
 drivers/usb/class/cdc-wdm.c     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/c67x00/c67x00-hcd.c b/drivers/usb/c67x00/c67x00-hcd.c
index c39eee17c0e46..39f2376663314 100644
--- a/drivers/usb/c67x00/c67x00-hcd.c
+++ b/drivers/usb/c67x00/c67x00-hcd.c
@@ -228,7 +228,7 @@ static int c67x00_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
  * Main part of host controller driver
  */
 
-/**
+/*
  * c67x00_hcd_irq
  *
  * This function is called from the interrupt handler in c67x00-drv.c
@@ -260,7 +260,7 @@ static void c67x00_hcd_irq(struct c67x00_sie *sie, u16 int_status, u16 msg)
 	}
 }
 
-/**
+/*
  * c67x00_hcd_start: Host controller start hook
  */
 static int c67x00_hcd_start(struct usb_hcd *hcd)
@@ -272,7 +272,7 @@ static int c67x00_hcd_start(struct usb_hcd *hcd)
 	return 0;
 }
 
-/**
+/*
  * c67x00_hcd_stop: Host controller stop hook
  */
 static void c67x00_hcd_stop(struct usb_hcd *hcd)
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 4dceaeca46e73..7f5de956a2fc8 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -941,7 +941,7 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
  * @ep: interrupt endpoint to monitor for notifications
  * @bufsize: maximum message size to support for read/write
  * @manage_power: call-back invoked during open and release to
- *                manage the device's power 
+ *                manage the device's power
  * Create WDM usb class character device and associate it with intf
  * without binding, allowing another driver to manage the interface.
  *
-- 
2.25.1


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

* [PATCH 29/30] usb: class: usbtmc: File headers are not good candidates for kerneldoc
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (27 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 28/30] usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-02 14:46 ` [PATCH 30/30] usb: c67x00: c67x00-sched: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
  2020-07-03  7:37 ` [PATCH 00/30] Fix a bunch of W=1 issues in USB Greg KH
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh; +Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones

Demote usbtmc's file header to a standard comment block.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/class/usbtmc.c:11: warning: Function parameter or member 'fmt' not described in 'pr_fmt'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/class/usbtmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index ffc9c6fdd7e1d..4b52758d3a38f 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0+
-/**
+/*
  * drivers/usb/class/usbtmc.c - USB Test & Measurement class driver
  *
  * Copyright (C) 2007 Stefan Kopp, Gechingen, Germany
-- 
2.25.1


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

* [PATCH 30/30] usb: c67x00: c67x00-sched: Demote obvious misuse of kerneldoc to standard comment blocks
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (28 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 29/30] usb: class: usbtmc: File headers are not good candidates for kerneldoc Lee Jones
@ 2020-07-02 14:46 ` Lee Jones
  2020-07-03  7:37 ` [PATCH 00/30] Fix a bunch of W=1 issues in USB Greg KH
  30 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-02 14:46 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Lee Jones, Peter Korsgaard

No attempt has been made to document any of the functions here.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'queue' not described in 'c67x00_ep_data'
 drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'node' not described in 'c67x00_ep_data'
 drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'hep' not described in 'c67x00_ep_data'
 drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'dev' not described in 'c67x00_ep_data'
 drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'next_frame' not described in 'c67x00_ep_data'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'ly_base_addr' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'port_length' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'pid_ep' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'dev_addr' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'ctrl_reg' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'status' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'retry_cnt' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'residue' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'next_td_addr' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'td_list' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'td_addr' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'data' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'urb' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'privdata' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'ep_data' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'pipe' not described in 'c67x00_td'
 drivers/usb/c67x00/c67x00-sched.c:137: warning: Function parameter or member 'c67x00' not described in 'dbg_td'
 drivers/usb/c67x00/c67x00-sched.c:137: warning: Function parameter or member 'td' not described in 'dbg_td'
 drivers/usb/c67x00/c67x00-sched.c:137: warning: Function parameter or member 'msg' not described in 'dbg_td'
 drivers/usb/c67x00/c67x00-sched.c:169: warning: Function parameter or member 'a' not described in 'frame_add'
 drivers/usb/c67x00/c67x00-sched.c:169: warning: Function parameter or member 'b' not described in 'frame_add'
 drivers/usb/c67x00/c67x00-sched.c:177: warning: Function parameter or member 'a' not described in 'frame_after'
 drivers/usb/c67x00/c67x00-sched.c:177: warning: Function parameter or member 'b' not described in 'frame_after'
 drivers/usb/c67x00/c67x00-sched.c:186: warning: Function parameter or member 'a' not described in 'frame_after_eq'
 drivers/usb/c67x00/c67x00-sched.c:186: warning: Function parameter or member 'b' not described in 'frame_after_eq'
 drivers/usb/c67x00/c67x00-sched.c:199: warning: Function parameter or member 'c67x00' not described in 'c67x00_release_urb'
 drivers/usb/c67x00/c67x00-sched.c:199: warning: Function parameter or member 'urb' not described in 'c67x00_release_urb'
 drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'c67x00' not described in 'c67x00_create_td'
 drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'urb' not described in 'c67x00_create_td'
 drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'data' not described in 'c67x00_create_td'
 drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'len' not described in 'c67x00_create_td'
 drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'pid' not described in 'c67x00_create_td'
 drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'toggle' not described in 'c67x00_create_td'
 drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'privdata' not described in 'c67x00_create_td'
 drivers/usb/c67x00/c67x00-sched.c:692: warning: Function parameter or member 'c67x00' not described in 'c67x00_add_ctrl_urb'
 drivers/usb/c67x00/c67x00-sched.c:692: warning: Function parameter or member 'urb' not described in 'c67x00_add_ctrl_urb'
 drivers/usb/c67x00/c67x00-sched.c:830: warning: Function parameter or member 'c67x00' not described in 'c67x00_parse_td'
 drivers/usb/c67x00/c67x00-sched.c:830: warning: Function parameter or member 'td' not described in 'c67x00_parse_td'
 drivers/usb/c67x00/c67x00-sched.c:978: warning: Function parameter or member 'c67x00' not described in 'c67x00_check_td_list'
 drivers/usb/c67x00/c67x00-sched.c:1052: warning: Function parameter or member 'c67x00' not described in 'c67x00_send_td'
 drivers/usb/c67x00/c67x00-sched.c:1052: warning: Function parameter or member 'td' not described in 'c67x00_send_td'
 drivers/usb/c67x00/c67x00-sched.c:1088: warning: Function parameter or member 'c67x00' not described in 'c67x00_do_work'

Cc: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/c67x00/c67x00-sched.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/c67x00/c67x00-sched.c b/drivers/usb/c67x00/c67x00-sched.c
index 633c52de3bb36..ef1e4ecaee996 100644
--- a/drivers/usb/c67x00/c67x00-sched.c
+++ b/drivers/usb/c67x00/c67x00-sched.c
@@ -23,7 +23,7 @@
 
 /* -------------------------------------------------------------------------- */
 
-/**
+/*
  * struct c67x00_ep_data: Host endpoint data structure
  */
 struct c67x00_ep_data {
@@ -34,7 +34,7 @@ struct c67x00_ep_data {
 	u16 next_frame;		/* For int/isoc transactions */
 };
 
-/**
+/*
  * struct c67x00_td
  *
  * Hardware parts are little endiannes, SW in CPU endianess.
@@ -130,7 +130,7 @@ struct c67x00_urb_priv {
 
 /* -------------------------------------------------------------------------- */
 
-/**
+/*
  * dbg_td - Dump the contents of the TD
  */
 static void dbg_td(struct c67x00_hcd *c67x00, struct c67x00_td *td, char *msg)
@@ -161,7 +161,7 @@ static inline u16 c67x00_get_current_frame_number(struct c67x00_hcd *c67x00)
 	return c67x00_ll_husb_get_frame(c67x00->sie) & HOST_FRAME_MASK;
 }
 
-/**
+/*
  * frame_add
  * Software wraparound for framenumbers.
  */
@@ -170,7 +170,7 @@ static inline u16 frame_add(u16 a, u16 b)
 	return (a + b) & HOST_FRAME_MASK;
 }
 
-/**
+/*
  * frame_after - is frame a after frame b
  */
 static inline int frame_after(u16 a, u16 b)
@@ -179,7 +179,7 @@ static inline int frame_after(u16 a, u16 b)
 	    (HOST_FRAME_MASK / 2);
 }
 
-/**
+/*
  * frame_after_eq - is frame a after or equal to frame b
  */
 static inline int frame_after_eq(u16 a, u16 b)
@@ -190,7 +190,7 @@ static inline int frame_after_eq(u16 a, u16 b)
 
 /* -------------------------------------------------------------------------- */
 
-/**
+/*
  * c67x00_release_urb - remove link from all tds to this urb
  * Disconnects the urb from it's tds, so that it can be given back.
  * pre: urb->hcpriv != NULL
@@ -557,7 +557,7 @@ static int c67x00_claim_frame_bw(struct c67x00_hcd *c67x00, struct urb *urb,
 
 /* -------------------------------------------------------------------------- */
 
-/**
+/*
  * td_addr and buf_addr must be word aligned
  */
 static int c67x00_create_td(struct c67x00_hcd *c67x00, struct urb *urb,
@@ -685,7 +685,7 @@ static int c67x00_add_data_urb(struct c67x00_hcd *c67x00, struct urb *urb)
 	return 0;
 }
 
-/**
+/*
  * return 0 in case more bandwidth is available, else errorcode
  */
 static int c67x00_add_ctrl_urb(struct c67x00_hcd *c67x00, struct urb *urb)
@@ -822,7 +822,7 @@ static void c67x00_fill_frame(struct c67x00_hcd *c67x00)
 
 /* -------------------------------------------------------------------------- */
 
-/**
+/*
  * Get TD from C67X00
  */
 static inline void
@@ -970,7 +970,7 @@ static void c67x00_handle_isoc(struct c67x00_hcd *c67x00, struct c67x00_td *td)
 
 /* -------------------------------------------------------------------------- */
 
-/**
+/*
  * c67x00_check_td_list - handle tds which have been processed by the c67x00
  * pre: current_td == 0
  */
@@ -1045,7 +1045,7 @@ static inline int c67x00_all_tds_processed(struct c67x00_hcd *c67x00)
 	return !c67x00_ll_husb_get_current_td(c67x00->sie);
 }
 
-/**
+/*
  * Send td to C67X00
  */
 static void c67x00_send_td(struct c67x00_hcd *c67x00, struct c67x00_td *td)
@@ -1081,7 +1081,7 @@ static void c67x00_send_frame(struct c67x00_hcd *c67x00)
 
 /* -------------------------------------------------------------------------- */
 
-/**
+/*
  * c67x00_do_work - Schedulers state machine
  */
 static void c67x00_do_work(struct c67x00_hcd *c67x00)
-- 
2.25.1


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

* Re: [PATCH 16/30] usb: mtu3: mtu3_trace: Function headers are not suitable for kerneldoc
  2020-07-02 14:46 ` [PATCH 16/30] usb: mtu3: mtu3_trace: " Lee Jones
@ 2020-07-03  1:41   ` Chunfeng Yun
  0 siblings, 0 replies; 45+ messages in thread
From: Chunfeng Yun @ 2020-07-03  1:41 UTC (permalink / raw)
  To: Lee Jones
  Cc: gregkh, linux-arm-kernel, linux-kernel, linux-usb, linux-mediatek

On Thu, 2020-07-02 at 15:46 +0100, Lee Jones wrote:
> Fixes the following W=1 kernel build warnings:
> 
>  drivers/usb/mtu3/mtu3_trace.c:13:6: warning: no previous prototype for ‘mtu3_dbg_trace’ [-Wmissing-prototypes]
>  13 | void mtu3_dbg_trace(struct device *dev, const char *fmt, ...)
>  | ^~~~~~~~~~~~~~
The description doesn't match with the title and code changes

> 
> Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>
> Cc: linux-mediatek@lists.infradead.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/usb/mtu3/mtu3_trace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/mtu3/mtu3_trace.c b/drivers/usb/mtu3/mtu3_trace.c
> index 4f5e7857ec312..155eae126e5e2 100644
> --- a/drivers/usb/mtu3/mtu3_trace.c
> +++ b/drivers/usb/mtu3/mtu3_trace.c
> @@ -1,5 +1,5 @@
>  // SPDX-License-Identifier: GPL-2.0
> -/**
> +/*
>   * mtu3_trace.c - trace support
>   *
>   * Copyright (C) 2019 MediaTek Inc.


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

* Re: [PATCH 24/30] usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file
  2020-07-02 14:46 ` [PATCH 24/30] usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file Lee Jones
@ 2020-07-03  5:41   ` kernel test robot
  0 siblings, 0 replies; 45+ messages in thread
From: kernel test robot @ 2020-07-03  5:41 UTC (permalink / raw)
  To: Lee Jones, gregkh
  Cc: kbuild-all, clang-built-linux, linux-arm-kernel, linux-kernel,
	linux-usb, Lee Jones, Chunfeng Yun, linux-mediatek

[-- Attachment #1: Type: text/plain, Size: 5305 bytes --]

Hi Lee,

I love your patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on balbi-usb/testing/next char-misc/char-misc-testing v5.8-rc3 next-20200702]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Lee-Jones/Fix-a-bunch-of-W-1-issues-in-USB/20200702-225210
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 003a086ffc0d1affbb8300b36225fb8150a2d40a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/usb/mtu3/mtu3_trace.c:11:
>> drivers/usb/mtu3/mtu3_debug.h:29:36: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility]
   void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb);
                                      ^
   drivers/usb/mtu3/mtu3_debug.h:30:35: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility]
   void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb);
                                     ^
   drivers/usb/mtu3/mtu3_debug.h:31:39: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility]
   void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb);
                                         ^
   drivers/usb/mtu3/mtu3_debug.h:32:39: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility]
   void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb);
                                         ^
   In file included from drivers/usb/mtu3/mtu3_trace.c:12:
   In file included from drivers/usb/mtu3/mtu3_trace.h:279:
   include/trace/define_trace.h:95:10: fatal error: './mtu3_trace.h' file not found
   #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/trace/define_trace.h:90:32: note: expanded from macro 'TRACE_INCLUDE'
   # define TRACE_INCLUDE(system) __TRACE_INCLUDE(system)
                                  ^~~~~~~~~~~~~~~~~~~~~~~
   include/trace/define_trace.h:87:34: note: expanded from macro '__TRACE_INCLUDE'
   # define __TRACE_INCLUDE(system) __stringify(TRACE_INCLUDE_PATH/system.h)
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/stringify.h:10:27: note: expanded from macro '__stringify'
   #define __stringify(x...)       __stringify_1(x)
                                   ^~~~~~~~~~~~~~~~
   include/linux/stringify.h:9:29: note: expanded from macro '__stringify_1'
   #define __stringify_1(x...)     #x
                                   ^~
   <scratch space>:48:1: note: expanded from here
   "./mtu3_trace.h"
   ^~~~~~~~~~~~~~~~
   4 warnings and 1 error generated.
--
   In file included from drivers/usb/mtu3/mtu3_trace.c:11:
>> drivers/usb/mtu3/mtu3_debug.h:29:36: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility]
   void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb);
                                      ^
   drivers/usb/mtu3/mtu3_debug.h:30:35: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility]
   void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb);
                                     ^
   drivers/usb/mtu3/mtu3_debug.h:31:39: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility]
   void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb);
                                         ^
   drivers/usb/mtu3/mtu3_debug.h:32:39: warning: declaration of 'struct ssusb_mtk' will not be visible outside of this function [-Wvisibility]
   void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb);
                                         ^
   4 warnings generated.

vim +29 drivers/usb/mtu3/mtu3_debug.h

ae07809255d3e3 Chunfeng Yun 2019-03-21  27  
ae07809255d3e3 Chunfeng Yun 2019-03-21  28  #if IS_ENABLED(CONFIG_DEBUG_FS)
ae07809255d3e3 Chunfeng Yun 2019-03-21 @29  void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb);
4aab6ad24a101b Chunfeng Yun 2019-03-21  30  void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb);
ae07809255d3e3 Chunfeng Yun 2019-03-21  31  void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb);
ae07809255d3e3 Chunfeng Yun 2019-03-21  32  void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb);
ae07809255d3e3 Chunfeng Yun 2019-03-21  33  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 75349 bytes --]

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

* Re: [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register
  2020-07-02 14:46 ` [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register Lee Jones
@ 2020-07-03  7:29   ` Greg KH
  2020-07-03  7:38     ` Minas Harutyunyan
  0 siblings, 1 reply; 45+ messages in thread
From: Greg KH @ 2020-07-03  7:29 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Minas Harutyunyan, Ben Dooks

On Thu, Jul 02, 2020 at 03:46:06PM +0100, Lee Jones wrote:
> Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved
> these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015.  The assigned
> value hasn't been read back since.  Let's remove the unnecessary H/W read.
> 
> Fixes the following W=1 warning:
> 
>  drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’:
>  drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable]
>  2981 | u32 ctrl;
>  | ^~~~
> 
> Cc: Minas Harutyunyan <hminas@synopsys.com>
> Cc: Ben Dooks <ben@simtec.co.uk>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/usb/dwc2/gadget.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index 116e6175c7a48..fa07e3fcb8841 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -2975,10 +2975,8 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx,
>  	u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx);
>  	u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx);
>  	u32 ints;
> -	u32 ctrl;
>  
>  	ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in);
> -	ctrl = dwc2_readl(hsotg, epctl_reg);

As you know, lots of hardware requires reads to happen to do things, so
are you sure it is safe to remove this read call?

thanks,

greg k-h

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

* Re: [PATCH 27/30] usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s manage_power arg
  2020-07-02 14:46 ` [PATCH 27/30] usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s manage_power arg Lee Jones
@ 2020-07-03  7:32   ` Greg KH
  0 siblings, 0 replies; 45+ messages in thread
From: Greg KH @ 2020-07-03  7:32 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-kernel, linux-usb, Oliver Neukum

On Thu, Jul 02, 2020 at 03:46:22PM +0100, Lee Jones wrote:
> A good attempt was made to document everything else.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/usb/class/cdc-wdm.c:961: warning: Function parameter or member 'manage_power' not described in 'usb_cdc_wdm_register'
> 
> Cc: Oliver Neukum <oneukum@suse.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/usb/class/cdc-wdm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
> index e3db6fbeadef8..4dceaeca46e73 100644
> --- a/drivers/usb/class/cdc-wdm.c
> +++ b/drivers/usb/class/cdc-wdm.c
> @@ -940,7 +940,8 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
>   * @intf: usb interface the subdriver will associate with
>   * @ep: interrupt endpoint to monitor for notifications
>   * @bufsize: maximum message size to support for read/write
> - *
> + * @manage_power: call-back invoked during open and release to
> + *                manage the device's power 
>   * Create WDM usb class character device and associate it with intf
>   * without binding, allowing another driver to manage the interface.
>   *

You just added a coding style warning :(

Hint, set your editor to flag trailing whitespace with a BIG RED COLOR
so that you don't do that.  If you use vim, that can be done with:
	highlight WhitespaceEOL ctermbg=red guibg=red
	match WhitespaceEOL /\s\+$/
in your .vimrc

For other sane editors, I'm sure there are ways to do it as well.

Please fix this patch up and send it in a new series, I've dropped it
from this one.

thanks,

greg k-h

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

* Re: [PATCH 28/30] usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to standard comment blocks
  2020-07-02 14:46 ` [PATCH 28/30] usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
@ 2020-07-03  7:34   ` Greg KH
  0 siblings, 0 replies; 45+ messages in thread
From: Greg KH @ 2020-07-03  7:34 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Peter Korsgaard,
	Oliver Neukum

On Thu, Jul 02, 2020 at 03:46:23PM +0100, Lee Jones wrote:
> No attempt has been made to document any of the functions here.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/usb/c67x00/c67x00-hcd.c:237: warning: Function parameter or member 'sie' not described in 'c67x00_hcd_irq'
>  drivers/usb/c67x00/c67x00-hcd.c:237: warning: Function parameter or member 'int_status' not described in 'c67x00_hcd_irq'
>  drivers/usb/c67x00/c67x00-hcd.c:237: warning: Function parameter or member 'msg' not described in 'c67x00_hcd_irq'
>  drivers/usb/c67x00/c67x00-hcd.c:267: warning: Function parameter or member 'hcd' not described in 'c67x00_hcd_start'
>  drivers/usb/c67x00/c67x00-hcd.c:279: warning: Function parameter or member 'hcd' not described in 'c67x00_hcd_stop'
> 
> Cc: Peter Korsgaard <jacmet@sunsite.dk>
> Cc: Oliver Neukum <oneukum@suse.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/usb/c67x00/c67x00-hcd.c | 6 +++---
>  drivers/usb/class/cdc-wdm.c     | 2 +-

You also tried to fix up the cdc-wdm.c whitespace error in this patch :(

I've dropped this one from the queue as well.

thanks,

greg k-h

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

* Re: [PATCH 23/30] usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef OXU_URB_TRACE'
  2020-07-02 14:46 ` [PATCH 23/30] usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef OXU_URB_TRACE' Lee Jones
@ 2020-07-03  7:36   ` Greg KH
  0 siblings, 0 replies; 45+ messages in thread
From: Greg KH @ 2020-07-03  7:36 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Masahiro Yamada,
	Rodolfo Giometti, Eurotech S.p.A

On Thu, Jul 02, 2020 at 03:46:18PM +0100, Lee Jones wrote:
> If we assign 'epnum' during the declaration we can also avoid "ISO
> C90 forbids mixed declarations" issues.  So it does looks like we
> can have our cake and eat it in this scenario.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/usb/host/oxu210hp-hcd.c: In function ‘submit_async’:
>  drivers/usb/host/oxu210hp-hcd.c:2040:19: warning: variable ‘qtd’ set but not used [-Wunused-but-set-variable]
>  2040 | struct ehci_qtd *qtd;
>  | ^~~
> 
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Rodolfo Giometti <giometti@linux.it>
> Cc: "Eurotech S.p.A" <info@eurtech.it>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/usb/host/oxu210hp-hcd.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
> index 120666a0d5901..b00673295c9fe 100644
> --- a/drivers/usb/host/oxu210hp-hcd.c
> +++ b/drivers/usb/host/oxu210hp-hcd.c
> @@ -2037,16 +2037,15 @@ static struct ehci_qh *qh_append_tds(struct oxu_hcd *oxu,
>  static int submit_async(struct oxu_hcd	*oxu, struct urb *urb,
>  			struct list_head *qtd_list, gfp_t mem_flags)
>  {
> -	struct ehci_qtd	*qtd;
> -	int epnum;
> +	int epnum = urb->ep->desc.bEndpointAddress;
>  	unsigned long flags;
>  	struct ehci_qh *qh = NULL;
>  	int rc = 0;
> +#ifdef OXU_URB_TRACE
> +	struct ehci_qtd	*qtd;
>  
>  	qtd = list_entry(qtd_list->next, struct ehci_qtd, qtd_list);
> -	epnum = urb->ep->desc.bEndpointAddress;
>  
> -#ifdef OXU_URB_TRACE
>  	oxu_dbg(oxu, "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
>  		__func__, urb->dev->devpath, urb,
>  		epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out",
> -- 
> 2.25.1
> 

Ugh, nice hack, but those OXU_URB_TRACE defines really just need to be
dropped entirely.  I'll take this for now though, thanks.

greg k-h

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

* Re: [PATCH 00/30] Fix a bunch of W=1 issues in USB
  2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
                   ` (29 preceding siblings ...)
  2020-07-02 14:46 ` [PATCH 30/30] usb: c67x00: c67x00-sched: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
@ 2020-07-03  7:37 ` Greg KH
  2020-07-03 17:21   ` Lee Jones
  30 siblings, 1 reply; 45+ messages in thread
From: Greg KH @ 2020-07-03  7:37 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-kernel, linux-usb

On Thu, Jul 02, 2020 at 03:45:55PM +0100, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
> 
> Lee Jones (30):
>   usb: phy: phy: Fix-up a whole bunch of formatting issues
>   usb: host: pci-quirks: Demote function header from kerneldoc to
>     comment block
>   usb: common: debug: Demote comment blocks which are obviously not
>     kerneldoc
>   usb: common: usb-conn-gpio: Demote comment block which is clearly not
>     kerneldoc
>   usb: dwc3: drd: File headers are not doc headers
>   usb: dwc3: ulpi: File headers are not doc headers
>   usb: common: ulpi: Fix a few kerneldoc related issues
>   usb: dwc3: dwc3-omap: Do not read DMA status
>   usb: dwc2: gadget: Do not read GINTMSK2
>   usb: dwc2: gadget: Remove assigned but never used 'maxsize'
>   usb: dwc2: gadget: Avoid pointless read of EP control register
>   usb: host: ehci-omap: Provide documentation for
>     ehci_hcd_omap_probe()'s arg 'pdev'
>   usb: cdns3: core: Fix incorrect formatting and misspelled function arg
>     docs
>   usb: cdns3: ep0: Fix a bunch of kerneldoc issues
>   usb: dwc3: dwc3-haps: Function headers are not suitable for kerneldoc
>   usb: mtu3: mtu3_trace: Function headers are not suitable for kerneldoc
>   usb: cdns3: gadget: Fix a bunch of kernel doc issues
>   usb: dwc3: dwc3-of-simple: Function headers are not good candidates
>     for kerneldoc
>   usb: host: isp1362: Mark the many unused ISP1362_REG entries as
>     __maybe_unused
>   usb: host: ohci-at91: Demote kerneldoc headers down to basic comment
>     blocks
>   usb: host: ohci: Mark cc_to_error as __maybe_unused
>   usb: cdns3: ep0: Move 'zlp' description to appropriate function header
>   usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef
>     OXU_URB_TRACE'
>   usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file
>   usb: mtu3: mtu3_core: Demote obvious misuse of kerneldoc to standard
>     comment block
>   usb: c67x00: c67x00-ll-hpi: Demote obvious misuse of kerneldoc to
>     standard comment blocks
>   usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s
>     manage_power arg
>   usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to
>     standard comment blocks
>   usb: class: usbtmc: File headers are not good candidates for kerneldoc
>   usb: c67x00: c67x00-sched: Demote obvious misuse of kerneldoc to
>     standard comment blocks

I've applied 25 of these, if you could rebase and resend the remaining
ones, after fixing up the review comments made on them, that would be
wonderful.

thanks,

greg k-h

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

* Re: [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register
  2020-07-03  7:29   ` Greg KH
@ 2020-07-03  7:38     ` Minas Harutyunyan
  2020-07-03  7:43       ` Greg KH
  2020-07-03 17:16       ` Lee Jones
  0 siblings, 2 replies; 45+ messages in thread
From: Minas Harutyunyan @ 2020-07-03  7:38 UTC (permalink / raw)
  To: Greg KH, Lee Jones; +Cc: linux-arm-kernel, linux-kernel, linux-usb, Ben Dooks

Hi,

On 7/3/2020 11:29 AM, Greg KH wrote:
> On Thu, Jul 02, 2020 at 03:46:06PM +0100, Lee Jones wrote:
>> Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved
>> these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015.  The assigned
>> value hasn't been read back since.  Let's remove the unnecessary H/W read.
>>
>> Fixes the following W=1 warning:
>>
>>   drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’:
>>   drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable]
>>   2981 | u32 ctrl;
>>   | ^~~~
>>
>> Cc: Minas Harutyunyan <hminas@synopsys.com>
>> Cc: Ben Dooks <ben@simtec.co.uk>
>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>> ---
>>   drivers/usb/dwc2/gadget.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
>> index 116e6175c7a48..fa07e3fcb8841 100644
>> --- a/drivers/usb/dwc2/gadget.c
>> +++ b/drivers/usb/dwc2/gadget.c
>> @@ -2975,10 +2975,8 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx,
>>   	u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx);
>>   	u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx);
>>   	u32 ints;
>> -	u32 ctrl;
>>   
>>   	ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in);
>> -	ctrl = dwc2_readl(hsotg, epctl_reg);
> 
> As you know, lots of hardware requires reads to happen to do things, so
> are you sure it is safe to remove this read call?
> 

Greg, yes, it's Ok to remove this unnecessary read which remained from 
previous implementations.

Lee, please add "Fixes:" tag and resubmit v2.

Thanks,
Minas


> thanks,
> 
> greg k-h
> 

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

* Re: [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register
  2020-07-03  7:38     ` Minas Harutyunyan
@ 2020-07-03  7:43       ` Greg KH
  2020-07-03  8:35         ` Minas Harutyunyan
  2020-07-03 17:16       ` Lee Jones
  1 sibling, 1 reply; 45+ messages in thread
From: Greg KH @ 2020-07-03  7:43 UTC (permalink / raw)
  To: Minas Harutyunyan
  Cc: Lee Jones, linux-arm-kernel, linux-kernel, linux-usb, Ben Dooks

On Fri, Jul 03, 2020 at 07:38:16AM +0000, Minas Harutyunyan wrote:
> Hi,
> 
> On 7/3/2020 11:29 AM, Greg KH wrote:
> > On Thu, Jul 02, 2020 at 03:46:06PM +0100, Lee Jones wrote:
> >> Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved
> >> these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015.  The assigned
> >> value hasn't been read back since.  Let's remove the unnecessary H/W read.
> >>
> >> Fixes the following W=1 warning:
> >>
> >>   drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’:
> >>   drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable]
> >>   2981 | u32 ctrl;
> >>   | ^~~~
> >>
> >> Cc: Minas Harutyunyan <hminas@synopsys.com>
> >> Cc: Ben Dooks <ben@simtec.co.uk>
> >> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> >> ---
> >>   drivers/usb/dwc2/gadget.c | 2 --
> >>   1 file changed, 2 deletions(-)
> >>
> >> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> >> index 116e6175c7a48..fa07e3fcb8841 100644
> >> --- a/drivers/usb/dwc2/gadget.c
> >> +++ b/drivers/usb/dwc2/gadget.c
> >> @@ -2975,10 +2975,8 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx,
> >>   	u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx);
> >>   	u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx);
> >>   	u32 ints;
> >> -	u32 ctrl;
> >>   
> >>   	ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in);
> >> -	ctrl = dwc2_readl(hsotg, epctl_reg);
> > 
> > As you know, lots of hardware requires reads to happen to do things, so
> > are you sure it is safe to remove this read call?
> > 
> 
> Greg, yes, it's Ok to remove this unnecessary read which remained from 
> previous implementations.

Great, thanks for confirming!

greg k-h

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

* Re: [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register
  2020-07-03  7:43       ` Greg KH
@ 2020-07-03  8:35         ` Minas Harutyunyan
  0 siblings, 0 replies; 45+ messages in thread
From: Minas Harutyunyan @ 2020-07-03  8:35 UTC (permalink / raw)
  To: Greg KH, Minas Harutyunyan
  Cc: Lee Jones, linux-arm-kernel, linux-kernel, linux-usb, Ben Dooks

Hi,

On 7/3/2020 11:43 AM, Greg KH wrote:
> On Fri, Jul 03, 2020 at 07:38:16AM +0000, Minas Harutyunyan wrote:
>> Hi,
>>
>> On 7/3/2020 11:29 AM, Greg KH wrote:
>>> On Thu, Jul 02, 2020 at 03:46:06PM +0100, Lee Jones wrote:
>>>> Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved
>>>> these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015.  The assigned
>>>> value hasn't been read back since.  Let's remove the unnecessary H/W read.
>>>>
>>>> Fixes the following W=1 warning:
>>>>
>>>>    drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’:
>>>>    drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable]
>>>>    2981 | u32 ctrl;
>>>>    | ^~~~
>>>>
>>>> Cc: Minas Harutyunyan <hminas@synopsys.com>
>>>> Cc: Ben Dooks <ben@simtec.co.uk>
>>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>>>> ---
>>>>    drivers/usb/dwc2/gadget.c | 2 --
>>>>    1 file changed, 2 deletions(-)
>>>>
>>>> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
>>>> index 116e6175c7a48..fa07e3fcb8841 100644
>>>> --- a/drivers/usb/dwc2/gadget.c
>>>> +++ b/drivers/usb/dwc2/gadget.c
>>>> @@ -2975,10 +2975,8 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx,
>>>>    	u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx);
>>>>    	u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx);
>>>>    	u32 ints;
>>>> -	u32 ctrl;
>>>>    
>>>>    	ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in);
>>>> -	ctrl = dwc2_readl(hsotg, epctl_reg);
>>>
>>> As you know, lots of hardware requires reads to happen to do things, so
>>> are you sure it is safe to remove this read call?
>>>
>>
>> Greg, yes, it's Ok to remove this unnecessary read which remained from
>> previous implementations.
> 
> Great, thanks for confirming!
> 

Acked-by: Minas Harutyunyan <hminas@synopsys.com>

> greg k-h
> 

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

* Re: [PATCH 02/30] usb: host: pci-quirks: Demote function header from kerneldoc to comment block
  2020-07-02 14:45 ` [PATCH 02/30] usb: host: pci-quirks: Demote function header from kerneldoc to comment block Lee Jones
@ 2020-07-03 10:22   ` Mathias Nyman
  0 siblings, 0 replies; 45+ messages in thread
From: Mathias Nyman @ 2020-07-03 10:22 UTC (permalink / raw)
  To: Lee Jones, gregkh
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Mathias Nyman,
	Martin Mares, aleksey_gorelov

On 2.7.2020 17.45, Lee Jones wrote:
> quirk_usb_handoff_xhci()'s function header is the only one across
> the sourcefile which is denoted as a kerneldoc header.  Despite
> no attempt to document its arguments.  Drop it down in status from
> kerneldoc to a standard comment block to match the other headers
> in the file.
> 
> Fixes the following W=1 kernel build warning:
> 
>  drivers/usb/host/pci-quirks.c:1145: warning: Function parameter or member 'pdev' not described in 'quirk_usb_handoff_xhci'
> 
> Cc: Mathias Nyman <mathias.nyman@intel.com>
> Cc: Martin Mares <mj@ucw.cz>
> Cc: aleksey_gorelov@phoenix.com
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>




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

* Re: [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register
  2020-07-03  7:38     ` Minas Harutyunyan
  2020-07-03  7:43       ` Greg KH
@ 2020-07-03 17:16       ` Lee Jones
  2020-07-04  6:04         ` Greg KH
  1 sibling, 1 reply; 45+ messages in thread
From: Lee Jones @ 2020-07-03 17:16 UTC (permalink / raw)
  To: Minas Harutyunyan
  Cc: Greg KH, linux-arm-kernel, linux-kernel, linux-usb, Ben Dooks

On Fri, 03 Jul 2020, Minas Harutyunyan wrote:

> Hi,
> 
> On 7/3/2020 11:29 AM, Greg KH wrote:
> > On Thu, Jul 02, 2020 at 03:46:06PM +0100, Lee Jones wrote:
> >> Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved
> >> these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015.  The assigned
> >> value hasn't been read back since.  Let's remove the unnecessary H/W read.
> >>
> >> Fixes the following W=1 warning:
> >>
> >>   drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’:
> >>   drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable]
> >>   2981 | u32 ctrl;
> >>   | ^~~~
> >>
> >> Cc: Minas Harutyunyan <hminas@synopsys.com>
> >> Cc: Ben Dooks <ben@simtec.co.uk>
> >> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> >> ---
> >>   drivers/usb/dwc2/gadget.c | 2 --
> >>   1 file changed, 2 deletions(-)
> >>
> >> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> >> index 116e6175c7a48..fa07e3fcb8841 100644
> >> --- a/drivers/usb/dwc2/gadget.c
> >> +++ b/drivers/usb/dwc2/gadget.c
> >> @@ -2975,10 +2975,8 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx,
> >>   	u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx);
> >>   	u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx);
> >>   	u32 ints;
> >> -	u32 ctrl;
> >>   
> >>   	ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in);
> >> -	ctrl = dwc2_readl(hsotg, epctl_reg);
> > 
> > As you know, lots of hardware requires reads to happen to do things, so
> > are you sure it is safe to remove this read call?
> > 
> 
> Greg, yes, it's Ok to remove this unnecessary read which remained from 
> previous implementations.
> 
> Lee, please add "Fixes:" tag and resubmit v2.

Is this suitable for Stable Greg?

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 00/30] Fix a bunch of W=1 issues in USB
  2020-07-03  7:37 ` [PATCH 00/30] Fix a bunch of W=1 issues in USB Greg KH
@ 2020-07-03 17:21   ` Lee Jones
  0 siblings, 0 replies; 45+ messages in thread
From: Lee Jones @ 2020-07-03 17:21 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-arm-kernel, linux-kernel, linux-usb

On Fri, 03 Jul 2020, Greg KH wrote:

> On Thu, Jul 02, 2020 at 03:45:55PM +0100, Lee Jones wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
> > 
> > Lee Jones (30):
> >   usb: phy: phy: Fix-up a whole bunch of formatting issues
> >   usb: host: pci-quirks: Demote function header from kerneldoc to
> >     comment block
> >   usb: common: debug: Demote comment blocks which are obviously not
> >     kerneldoc
> >   usb: common: usb-conn-gpio: Demote comment block which is clearly not
> >     kerneldoc
> >   usb: dwc3: drd: File headers are not doc headers
> >   usb: dwc3: ulpi: File headers are not doc headers
> >   usb: common: ulpi: Fix a few kerneldoc related issues
> >   usb: dwc3: dwc3-omap: Do not read DMA status
> >   usb: dwc2: gadget: Do not read GINTMSK2
> >   usb: dwc2: gadget: Remove assigned but never used 'maxsize'
> >   usb: dwc2: gadget: Avoid pointless read of EP control register
> >   usb: host: ehci-omap: Provide documentation for
> >     ehci_hcd_omap_probe()'s arg 'pdev'
> >   usb: cdns3: core: Fix incorrect formatting and misspelled function arg
> >     docs
> >   usb: cdns3: ep0: Fix a bunch of kerneldoc issues
> >   usb: dwc3: dwc3-haps: Function headers are not suitable for kerneldoc
> >   usb: mtu3: mtu3_trace: Function headers are not suitable for kerneldoc
> >   usb: cdns3: gadget: Fix a bunch of kernel doc issues
> >   usb: dwc3: dwc3-of-simple: Function headers are not good candidates
> >     for kerneldoc
> >   usb: host: isp1362: Mark the many unused ISP1362_REG entries as
> >     __maybe_unused
> >   usb: host: ohci-at91: Demote kerneldoc headers down to basic comment
> >     blocks
> >   usb: host: ohci: Mark cc_to_error as __maybe_unused
> >   usb: cdns3: ep0: Move 'zlp' description to appropriate function header
> >   usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef
> >     OXU_URB_TRACE'
> >   usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file
> >   usb: mtu3: mtu3_core: Demote obvious misuse of kerneldoc to standard
> >     comment block
> >   usb: c67x00: c67x00-ll-hpi: Demote obvious misuse of kerneldoc to
> >     standard comment blocks
> >   usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s
> >     manage_power arg
> >   usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to
> >     standard comment blocks
> >   usb: class: usbtmc: File headers are not good candidates for kerneldoc
> >   usb: c67x00: c67x00-sched: Demote obvious misuse of kerneldoc to
> >     standard comment blocks
> 
> I've applied 25 of these, if you could rebase and resend the remaining
> ones, after fixing up the review comments made on them, that would be
> wonderful.

Will do.  Thanks Greg.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register
  2020-07-03 17:16       ` Lee Jones
@ 2020-07-04  6:04         ` Greg KH
  0 siblings, 0 replies; 45+ messages in thread
From: Greg KH @ 2020-07-04  6:04 UTC (permalink / raw)
  To: Lee Jones
  Cc: Minas Harutyunyan, linux-arm-kernel, linux-kernel, linux-usb, Ben Dooks

On Fri, Jul 03, 2020 at 06:16:26PM +0100, Lee Jones wrote:
> On Fri, 03 Jul 2020, Minas Harutyunyan wrote:
> 
> > Hi,
> > 
> > On 7/3/2020 11:29 AM, Greg KH wrote:
> > > On Thu, Jul 02, 2020 at 03:46:06PM +0100, Lee Jones wrote:
> > >> Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved
> > >> these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015.  The assigned
> > >> value hasn't been read back since.  Let's remove the unnecessary H/W read.
> > >>
> > >> Fixes the following W=1 warning:
> > >>
> > >>   drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’:
> > >>   drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable]
> > >>   2981 | u32 ctrl;
> > >>   | ^~~~
> > >>
> > >> Cc: Minas Harutyunyan <hminas@synopsys.com>
> > >> Cc: Ben Dooks <ben@simtec.co.uk>
> > >> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > >> ---
> > >>   drivers/usb/dwc2/gadget.c | 2 --
> > >>   1 file changed, 2 deletions(-)
> > >>
> > >> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> > >> index 116e6175c7a48..fa07e3fcb8841 100644
> > >> --- a/drivers/usb/dwc2/gadget.c
> > >> +++ b/drivers/usb/dwc2/gadget.c
> > >> @@ -2975,10 +2975,8 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx,
> > >>   	u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx);
> > >>   	u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx);
> > >>   	u32 ints;
> > >> -	u32 ctrl;
> > >>   
> > >>   	ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in);
> > >> -	ctrl = dwc2_readl(hsotg, epctl_reg);
> > > 
> > > As you know, lots of hardware requires reads to happen to do things, so
> > > are you sure it is safe to remove this read call?
> > > 
> > 
> > Greg, yes, it's Ok to remove this unnecessary read which remained from 
> > previous implementations.
> > 
> > Lee, please add "Fixes:" tag and resubmit v2.
> 
> Is this suitable for Stable Greg?

Does it fix something that people have ever noticed or care about?
Given the age of the bug, I doubt it :)

thanks,

greg k-h

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

end of thread, other threads:[~2020-07-04  6:04 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02 14:45 [PATCH 00/30] Fix a bunch of W=1 issues in USB Lee Jones
2020-07-02 14:45 ` [PATCH 01/30] usb: phy: phy: Fix-up a whole bunch of formatting issues Lee Jones
2020-07-02 14:45 ` [PATCH 02/30] usb: host: pci-quirks: Demote function header from kerneldoc to comment block Lee Jones
2020-07-03 10:22   ` Mathias Nyman
2020-07-02 14:45 ` [PATCH 03/30] usb: common: debug: Demote comment blocks which are obviously not kerneldoc Lee Jones
2020-07-02 14:45 ` [PATCH 04/30] usb: common: usb-conn-gpio: Demote comment block which is clearly " Lee Jones
2020-07-02 14:46 ` [PATCH 05/30] usb: dwc3: drd: File headers are not doc headers Lee Jones
2020-07-02 14:46 ` [PATCH 06/30] usb: dwc3: ulpi: " Lee Jones
2020-07-02 14:46 ` [PATCH 07/30] usb: common: ulpi: Fix a few kerneldoc related issues Lee Jones
2020-07-02 14:46 ` [PATCH 08/30] usb: dwc3: dwc3-omap: Do not read DMA status Lee Jones
2020-07-02 14:46 ` [PATCH 09/30] usb: dwc2: gadget: Do not read GINTMSK2 Lee Jones
2020-07-02 14:46 ` [PATCH 10/30] usb: dwc2: gadget: Remove assigned but never used 'maxsize' Lee Jones
2020-07-02 14:46 ` [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register Lee Jones
2020-07-03  7:29   ` Greg KH
2020-07-03  7:38     ` Minas Harutyunyan
2020-07-03  7:43       ` Greg KH
2020-07-03  8:35         ` Minas Harutyunyan
2020-07-03 17:16       ` Lee Jones
2020-07-04  6:04         ` Greg KH
2020-07-02 14:46 ` [PATCH 12/30] usb: host: ehci-omap: Provide documentation for ehci_hcd_omap_probe()'s arg 'pdev' Lee Jones
2020-07-02 14:46 ` [PATCH 13/30] usb: cdns3: core: Fix incorrect formatting and misspelled function arg docs Lee Jones
2020-07-02 14:46 ` [PATCH 14/30] usb: cdns3: ep0: Fix a bunch of kerneldoc issues Lee Jones
2020-07-02 14:46 ` [PATCH 15/30] usb: dwc3: dwc3-haps: Function headers are not suitable for kerneldoc Lee Jones
2020-07-02 14:46 ` [PATCH 16/30] usb: mtu3: mtu3_trace: " Lee Jones
2020-07-03  1:41   ` Chunfeng Yun
2020-07-02 14:46 ` [PATCH 17/30] usb: cdns3: gadget: Fix a bunch of kernel doc issues Lee Jones
2020-07-02 14:46 ` [PATCH 18/30] usb: dwc3: dwc3-of-simple: Function headers are not good candidates for kerneldoc Lee Jones
2020-07-02 14:46 ` [PATCH 19/30] usb: host: isp1362: Mark the many unused ISP1362_REG entries as __maybe_unused Lee Jones
2020-07-02 14:46 ` [PATCH 20/30] usb: host: ohci-at91: Demote kerneldoc headers down to basic comment blocks Lee Jones
2020-07-02 14:46 ` [PATCH 21/30] usb: host: ohci: Mark cc_to_error as __maybe_unused Lee Jones
2020-07-02 14:46 ` [PATCH 22/30] usb: cdns3: ep0: Move 'zlp' description to appropriate function header Lee Jones
2020-07-02 14:46 ` [PATCH 23/30] usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef OXU_URB_TRACE' Lee Jones
2020-07-03  7:36   ` Greg KH
2020-07-02 14:46 ` [PATCH 24/30] usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file Lee Jones
2020-07-03  5:41   ` kernel test robot
2020-07-02 14:46 ` [PATCH 25/30] usb: mtu3: mtu3_core: Demote obvious misuse of kerneldoc to standard comment block Lee Jones
2020-07-02 14:46 ` [PATCH 26/30] usb: c67x00: c67x00-ll-hpi: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-02 14:46 ` [PATCH 27/30] usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s manage_power arg Lee Jones
2020-07-03  7:32   ` Greg KH
2020-07-02 14:46 ` [PATCH 28/30] usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-03  7:34   ` Greg KH
2020-07-02 14:46 ` [PATCH 29/30] usb: class: usbtmc: File headers are not good candidates for kerneldoc Lee Jones
2020-07-02 14:46 ` [PATCH 30/30] usb: c67x00: c67x00-sched: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-03  7:37 ` [PATCH 00/30] Fix a bunch of W=1 issues in USB Greg KH
2020-07-03 17:21   ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).