Commit 4ef2dfbd authored by Lee Jones's avatar Lee Jones Committed by Greg Kroah-Hartman

usb: gadget: udc: pch_udc: Fix a plethora of function documentation related issues

Ranging from missing descriptions and formatting mishaps to over-documenting
of missing arguments, likely due to bitrot.

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

 drivers/usb/gadget/udc/pch_udc.c:239: warning: Function parameter or member 'request' not described in 'pch_udc_stp_dma_desc'
 drivers/usb/gadget/udc/pch_udc.c:315: warning: Function parameter or member 'irq_work_fall' not described in 'pch_vbus_gpio_data'
 drivers/usb/gadget/udc/pch_udc.c:315: warning: Function parameter or member 'irq_work_rise' not described in 'pch_vbus_gpio_data'
 drivers/usb/gadget/udc/pch_udc.c:482: warning: Function parameter or member 'ep' not described in 'pch_udc_write_csr'
 drivers/usb/gadget/udc/pch_udc.c:482: warning: Excess function parameter 'addr' description in 'pch_udc_write_csr'
 drivers/usb/gadget/udc/pch_udc.c:498: warning: Function parameter or member 'ep' not described in 'pch_udc_read_csr'
 drivers/usb/gadget/udc/pch_udc.c:498: warning: Excess function parameter 'addr' description in 'pch_udc_read_csr'
 drivers/usb/gadget/udc/pch_udc.c:662: warning: Function parameter or member 'ep_in' not described in 'pch_udc_ep_set_bufsz'
 drivers/usb/gadget/udc/pch_udc.c:977: warning: Function parameter or member 'ep' not described in 'pch_udc_ep_enable'
 drivers/usb/gadget/udc/pch_udc.c:977: warning: Function parameter or member 'cfg' not described in 'pch_udc_ep_enable'
 drivers/usb/gadget/udc/pch_udc.c:977: warning: Excess function parameter 'regs' description in 'pch_udc_ep_enable'
 drivers/usb/gadget/udc/pch_udc.c:1010: warning: Function parameter or member 'ep' not described in 'pch_udc_ep_disable'
 drivers/usb/gadget/udc/pch_udc.c:1010: warning: Excess function parameter 'regs' description in 'pch_udc_ep_disable'
 drivers/usb/gadget/udc/pch_udc.c:1030: warning: Function parameter or member 'ep' not described in 'pch_udc_wait_ep_stall'
 drivers/usb/gadget/udc/pch_udc.c:1030: warning: Excess function parameter 'dev' description in 'pch_udc_wait_ep_stall'
 drivers/usb/gadget/udc/pch_udc.c:1341: warning: Function parameter or member 'data' not described in 'pch_vbus_gpio_irq'
 drivers/usb/gadget/udc/pch_udc.c:1341: warning: Excess function parameter 'dev' description in 'pch_vbus_gpio_irq'
 drivers/usb/gadget/udc/pch_udc.c:1365: warning: Function parameter or member 'vbus_gpio_port' not described in 'pch_vbus_gpio_init'
 drivers/usb/gadget/udc/pch_udc.c:1510: warning: Function parameter or member 'dev' not described in 'pch_udc_free_dma_chain'
 drivers/usb/gadget/udc/pch_udc.c:1510: warning: Function parameter or member 'req' not described in 'pch_udc_free_dma_chain'
 drivers/usb/gadget/udc/pch_udc.c:1717: warning: Function parameter or member 'usbep' not described in 'pch_udc_pcd_ep_disable'
 drivers/usb/gadget/udc/pch_udc.c:2006: warning: Excess function parameter 'halt' description in 'pch_udc_pcd_set_wedge'
 drivers/usb/gadget/udc/pch_udc.c:2756: warning: Function parameter or member 'pdev' not described in 'pch_udc_isr'
 drivers/usb/gadget/udc/pch_udc.c:2756: warning: Excess function parameter 'dev' description in 'pch_udc_isr'
 drivers/usb/gadget/udc/pch_udc.c:2906: warning: Function parameter or member 'dev' not described in 'init_dma_pools'
 drivers/usb/gadget/udc/pch_udc.c:2906: warning: Excess function parameter 'pdev' description in 'init_dma_pools'

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Chuhong Yuan <hslester96@gmail.com>
Cc: LAPIS Semiconductor <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200706133341.476881-16-lee.jones@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6327bf75
...@@ -229,8 +229,7 @@ struct pch_udc_data_dma_desc { ...@@ -229,8 +229,7 @@ struct pch_udc_data_dma_desc {
* for control data * for control data
* @status: Status * @status: Status
* @reserved: Reserved * @reserved: Reserved
* @data12: First setup word * @request: Control Request
* @data34: Second setup word
*/ */
struct pch_udc_stp_dma_desc { struct pch_udc_stp_dma_desc {
u32 status; u32 status;
...@@ -304,8 +303,8 @@ struct pch_udc_ep { ...@@ -304,8 +303,8 @@ struct pch_udc_ep {
* for detecting VBUS * for detecting VBUS
* @port: gpio port number * @port: gpio port number
* @intr: gpio interrupt number * @intr: gpio interrupt number
* @irq_work_fall Structure for WorkQueue * @irq_work_fall: Structure for WorkQueue
* @irq_work_rise Structure for WorkQueue * @irq_work_rise: Structure for WorkQueue
*/ */
struct pch_vbus_gpio_data { struct pch_vbus_gpio_data {
int port; int port;
...@@ -475,7 +474,7 @@ static void pch_udc_csr_busy(struct pch_udc_dev *dev) ...@@ -475,7 +474,7 @@ static void pch_udc_csr_busy(struct pch_udc_dev *dev)
* pch_udc_write_csr() - Write the command and status registers. * pch_udc_write_csr() - Write the command and status registers.
* @dev: Reference to pch_udc_dev structure * @dev: Reference to pch_udc_dev structure
* @val: value to be written to CSR register * @val: value to be written to CSR register
* @addr: address of CSR register * @ep: end-point number
*/ */
static void pch_udc_write_csr(struct pch_udc_dev *dev, unsigned long val, static void pch_udc_write_csr(struct pch_udc_dev *dev, unsigned long val,
unsigned int ep) unsigned int ep)
...@@ -490,7 +489,7 @@ static void pch_udc_write_csr(struct pch_udc_dev *dev, unsigned long val, ...@@ -490,7 +489,7 @@ static void pch_udc_write_csr(struct pch_udc_dev *dev, unsigned long val,
/** /**
* pch_udc_read_csr() - Read the command and status registers. * pch_udc_read_csr() - Read the command and status registers.
* @dev: Reference to pch_udc_dev structure * @dev: Reference to pch_udc_dev structure
* @addr: address of CSR register * @ep: end-point number
* *
* Return codes: content of CSR register * Return codes: content of CSR register
*/ */
...@@ -656,6 +655,7 @@ static inline void pch_udc_ep_set_trfr_type(struct pch_udc_ep *ep, ...@@ -656,6 +655,7 @@ static inline void pch_udc_ep_set_trfr_type(struct pch_udc_ep *ep,
* pch_udc_ep_set_bufsz() - Set the maximum packet size for the endpoint * pch_udc_ep_set_bufsz() - Set the maximum packet size for the endpoint
* @ep: Reference to structure of type pch_udc_ep_regs * @ep: Reference to structure of type pch_udc_ep_regs
* @buf_size: The buffer word size * @buf_size: The buffer word size
* @ep_in: EP is IN
*/ */
static void pch_udc_ep_set_bufsz(struct pch_udc_ep *ep, static void pch_udc_ep_set_bufsz(struct pch_udc_ep *ep,
u32 buf_size, u32 ep_in) u32 buf_size, u32 ep_in)
...@@ -968,7 +968,8 @@ static void pch_udc_ep_fifo_flush(struct pch_udc_ep *ep, int dir) ...@@ -968,7 +968,8 @@ static void pch_udc_ep_fifo_flush(struct pch_udc_ep *ep, int dir)
/** /**
* pch_udc_ep_enable() - This api enables endpoint * pch_udc_ep_enable() - This api enables endpoint
* @regs: Reference to structure pch_udc_ep_regs * @ep: reference to structure of type pch_udc_ep_regs
* @cfg: current configuration information
* @desc: endpoint descriptor * @desc: endpoint descriptor
*/ */
static void pch_udc_ep_enable(struct pch_udc_ep *ep, static void pch_udc_ep_enable(struct pch_udc_ep *ep,
...@@ -1004,7 +1005,7 @@ static void pch_udc_ep_enable(struct pch_udc_ep *ep, ...@@ -1004,7 +1005,7 @@ static void pch_udc_ep_enable(struct pch_udc_ep *ep,
/** /**
* pch_udc_ep_disable() - This api disables endpoint * pch_udc_ep_disable() - This api disables endpoint
* @regs: Reference to structure pch_udc_ep_regs * @ep: reference to structure of type pch_udc_ep_regs
*/ */
static void pch_udc_ep_disable(struct pch_udc_ep *ep) static void pch_udc_ep_disable(struct pch_udc_ep *ep)
{ {
...@@ -1024,7 +1025,7 @@ static void pch_udc_ep_disable(struct pch_udc_ep *ep) ...@@ -1024,7 +1025,7 @@ static void pch_udc_ep_disable(struct pch_udc_ep *ep)
/** /**
* pch_udc_wait_ep_stall() - Wait EP stall. * pch_udc_wait_ep_stall() - Wait EP stall.
* @dev: Reference to pch_udc_dev structure * @ep: reference to structure of type pch_udc_ep_regs
*/ */
static void pch_udc_wait_ep_stall(struct pch_udc_ep *ep) static void pch_udc_wait_ep_stall(struct pch_udc_ep *ep)
{ {
...@@ -1331,7 +1332,7 @@ static void pch_vbus_gpio_work_rise(struct work_struct *irq_work) ...@@ -1331,7 +1332,7 @@ static void pch_vbus_gpio_work_rise(struct work_struct *irq_work)
/** /**
* pch_vbus_gpio_irq() - IRQ handler for GPIO interrupt for changing VBUS * pch_vbus_gpio_irq() - IRQ handler for GPIO interrupt for changing VBUS
* @irq: Interrupt request number * @irq: Interrupt request number
* @dev: Reference to the device structure * @data: Reference to the device structure
* *
* Return codes: * Return codes:
* 0: Success * 0: Success
...@@ -1355,7 +1356,7 @@ static irqreturn_t pch_vbus_gpio_irq(int irq, void *data) ...@@ -1355,7 +1356,7 @@ static irqreturn_t pch_vbus_gpio_irq(int irq, void *data)
/** /**
* pch_vbus_gpio_init() - This API initializes GPIO port detecting VBUS. * pch_vbus_gpio_init() - This API initializes GPIO port detecting VBUS.
* @dev: Reference to the driver structure * @dev: Reference to the driver structure
* @vbus_gpio Number of GPIO port to detect gpio * @vbus_gpio_port: Number of GPIO port to detect gpio
* *
* Return codes: * Return codes:
* 0: Success * 0: Success
...@@ -1499,8 +1500,8 @@ static void empty_req_queue(struct pch_udc_ep *ep) ...@@ -1499,8 +1500,8 @@ static void empty_req_queue(struct pch_udc_ep *ep)
/** /**
* pch_udc_free_dma_chain() - This function frees the DMA chain created * pch_udc_free_dma_chain() - This function frees the DMA chain created
* for the request * for the request
* @dev Reference to the driver structure * @dev: Reference to the driver structure
* @req Reference to the request to be freed * @req: Reference to the request to be freed
* *
* Return codes: * Return codes:
* 0: Success * 0: Success
...@@ -1707,7 +1708,7 @@ static int pch_udc_pcd_ep_enable(struct usb_ep *usbep, ...@@ -1707,7 +1708,7 @@ static int pch_udc_pcd_ep_enable(struct usb_ep *usbep,
/** /**
* pch_udc_pcd_ep_disable() - This API disables endpoint and is called * pch_udc_pcd_ep_disable() - This API disables endpoint and is called
* from gadget driver * from gadget driver
* @usbep Reference to the USB endpoint structure * @usbep: Reference to the USB endpoint structure
* *
* Return codes: * Return codes:
* 0: Success * 0: Success
...@@ -1996,7 +1997,6 @@ static int pch_udc_pcd_set_halt(struct usb_ep *usbep, int halt) ...@@ -1996,7 +1997,6 @@ static int pch_udc_pcd_set_halt(struct usb_ep *usbep, int halt)
* pch_udc_pcd_set_wedge() - This function Sets or clear the endpoint * pch_udc_pcd_set_wedge() - This function Sets or clear the endpoint
* halt feature * halt feature
* @usbep: Reference to the USB endpoint structure * @usbep: Reference to the USB endpoint structure
* @halt: Specifies whether to set or clear the feature
* *
* Return codes: * Return codes:
* 0: Success * 0: Success
...@@ -2750,7 +2750,7 @@ static void pch_udc_dev_isr(struct pch_udc_dev *dev, u32 dev_intr) ...@@ -2750,7 +2750,7 @@ static void pch_udc_dev_isr(struct pch_udc_dev *dev, u32 dev_intr)
/** /**
* pch_udc_isr() - This function handles interrupts from the PCH USB Device * pch_udc_isr() - This function handles interrupts from the PCH USB Device
* @irq: Interrupt request number * @irq: Interrupt request number
* @dev: Reference to the device structure * @pdev: Reference to the device structure
*/ */
static irqreturn_t pch_udc_isr(int irq, void *pdev) static irqreturn_t pch_udc_isr(int irq, void *pdev)
{ {
...@@ -2900,7 +2900,7 @@ static int pch_udc_pcd_init(struct pch_udc_dev *dev) ...@@ -2900,7 +2900,7 @@ static int pch_udc_pcd_init(struct pch_udc_dev *dev)
/** /**
* init_dma_pools() - create dma pools during initialization * init_dma_pools() - create dma pools during initialization
* @pdev: reference to struct pci_dev * @dev: reference to struct pci_dev
*/ */
static int init_dma_pools(struct pch_udc_dev *dev) static int init_dma_pools(struct pch_udc_dev *dev)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment