Skip to content

Commit ec977c5

Browse files
David Daneyralfbaechle
authored andcommitted
Staging: Octeon: Reformat a bunch of comments.
Many of the comments didn't follow kerneldoc guidlines. Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org To: netdev@vger.kernel.org To: gregkh@suse.de Patchwork: http://patchwork.linux-mips.org/patch/971/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 4898c56 commit ec977c5

7 files changed

Lines changed: 44 additions & 71 deletions

File tree

‎drivers/staging/octeon/ethernet-mdio.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ const struct ethtool_ops cvm_oct_ethtool_ops = {
9696
};
9797

9898
/**
99-
* IOCTL support for PHY control
100-
*
99+
* cvm_oct_ioctl - IOCTL support for PHY control
101100
* @dev: Device to change
102101
* @rq: the request
103102
* @cmd: the command
103+
*
104104
* Returns Zero on success
105105
*/
106106
int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
@@ -153,7 +153,7 @@ static void cvm_oct_adjust_link(struct net_device *dev)
153153

154154

155155
/**
156-
* Setup the PHY
156+
* cvm_oct_phy_setup_device - setup the PHY
157157
*
158158
* @dev: Device to setup
159159
*

‎drivers/staging/octeon/ethernet-mem.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@
3434
#include "cvmx-fpa.h"
3535

3636
/**
37-
* Fill the supplied hardware pool with skbuffs
38-
*
37+
* cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs
3938
* @pool: Pool to allocate an skbuff for
4039
* @size: Size of the buffer needed for the pool
4140
* @elements: Number of buffers to allocate
41+
*
42+
* Returns the actual number of buffers allocated.
4243
*/
4344
static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
4445
{
@@ -62,8 +63,7 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
6263
}
6364

6465
/**
65-
* Free the supplied hardware pool of skbuffs
66-
*
66+
* cvm_oct_free_hw_skbuff- free hardware pool skbuffs
6767
* @pool: Pool to allocate an skbuff for
6868
* @size: Size of the buffer needed for the pool
6969
* @elements: Number of buffers to allocate
@@ -91,11 +91,12 @@ static void cvm_oct_free_hw_skbuff(int pool, int size, int elements)
9191
}
9292

9393
/**
94-
* This function fills a hardware pool with memory.
95-
*
94+
* cvm_oct_fill_hw_memory - fill a hardware pool with memory.
9695
* @pool: Pool to populate
9796
* @size: Size of each buffer in the pool
9897
* @elements: Number of buffers to allocate
98+
*
99+
* Returns the actual number of buffers allocated.
99100
*/
100101
static int cvm_oct_fill_hw_memory(int pool, int size, int elements)
101102
{
@@ -129,8 +130,7 @@ static int cvm_oct_fill_hw_memory(int pool, int size, int elements)
129130
}
130131

131132
/**
132-
* Free memory previously allocated with cvm_oct_fill_hw_memory
133-
*
133+
* cvm_oct_free_hw_memory - Free memory allocated by cvm_oct_fill_hw_memory
134134
* @pool: FPA pool to free
135135
* @size: Size of each buffer in the pool
136136
* @elements: Number of buffers that should be in the pool

‎drivers/staging/octeon/ethernet-rx.c‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ static void cvm_oct_no_more_work(void)
124124
}
125125

126126
/**
127-
* Interrupt handler. The interrupt occurs whenever the POW
128-
* has packets in our group.
127+
* cvm_oct_do_interrupt - interrupt handler.
128+
*
129+
* The interrupt occurs whenever the POW has packets in our group.
129130
*
130131
*/
131132
static irqreturn_t cvm_oct_do_interrupt(int cpl, void *dev_id)
@@ -138,10 +139,9 @@ static irqreturn_t cvm_oct_do_interrupt(int cpl, void *dev_id)
138139
}
139140

140141
/**
141-
* This is called on receive errors, and determines if the packet
142-
* can be dropped early-on in cvm_oct_tasklet_rx().
143-
*
142+
* cvm_oct_check_rcv_error - process receive errors
144143
* @work: Work queue entry pointing to the packet.
144+
*
145145
* Returns Non-zero if the packet can be dropped, zero otherwise.
146146
*/
147147
static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
@@ -224,10 +224,11 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
224224
}
225225

226226
/**
227-
* The NAPI poll function.
228-
*
227+
* cvm_oct_napi_poll - the NAPI poll function.
229228
* @napi: The NAPI instance, or null if called from cvm_oct_poll_controller
230229
* @budget: Maximum number of packets to receive.
230+
*
231+
* Returns the number of packets processed.
231232
*/
232233
static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
233234
{
@@ -484,7 +485,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
484485

485486
#ifdef CONFIG_NET_POLL_CONTROLLER
486487
/**
487-
* This is called when the kernel needs to manually poll the
488+
* cvm_oct_poll_controller - poll for receive packets
488489
* device.
489490
*
490491
* @dev: Device to poll. Unused

‎drivers/staging/octeon/ethernet-tx.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ void cvm_oct_free_tx_skbs(struct net_device *dev)
137137
}
138138

139139
/**
140-
* Packet transmit
141-
*
140+
* cvm_oct_xmit - transmit a packet
142141
* @skb: Packet to send
143142
* @dev: Device info structure
144-
* Returns Always returns zero
143+
*
144+
* Returns Always returns NETDEV_TX_OK
145145
*/
146146
int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
147147
{
@@ -510,10 +510,10 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
510510
}
511511

512512
/**
513-
* Packet transmit to the POW
514-
*
513+
* cvm_oct_xmit_pow - transmit a packet to the POW
515514
* @skb: Packet to send
516515
* @dev: Device info structure
516+
517517
* Returns Always returns zero
518518
*/
519519
int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
@@ -661,9 +661,9 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
661661
}
662662

663663
/**
664-
* This function frees all skb that are currently queued for TX.
665-
*
664+
* cvm_oct_tx_shutdown_dev - free all skb that are currently queued for TX.
666665
* @dev: Device being shutdown
666+
*
667667
*/
668668
void cvm_oct_tx_shutdown_dev(struct net_device *dev)
669669
{

‎drivers/staging/octeon/ethernet-util.h‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030
} while (0)
3131

3232
/**
33-
* Given a packet data address, return a pointer to the
34-
* beginning of the packet buffer.
35-
*
33+
* cvm_oct_get_buffer_ptr - convert packet data address to pointer
3634
* @packet_ptr: Packet data hardware address
35+
*
3736
* Returns Packet buffer pointer
3837
*/
3938
static inline void *cvm_oct_get_buffer_ptr(union cvmx_buf_ptr packet_ptr)
@@ -43,9 +42,7 @@ static inline void *cvm_oct_get_buffer_ptr(union cvmx_buf_ptr packet_ptr)
4342
}
4443

4544
/**
46-
* Given an IPD/PKO port number, return the logical interface it is
47-
* on.
48-
*
45+
* INTERFACE - convert IPD port to locgical interface
4946
* @ipd_port: Port to check
5047
*
5148
* Returns Logical interface
@@ -65,9 +62,7 @@ static inline int INTERFACE(int ipd_port)
6562
}
6663

6764
/**
68-
* Given an IPD/PKO port number, return the port's index on a
69-
* logical interface.
70-
*
65+
* INDEX - convert IPD/PKO port number to the port's interface index
7166
* @ipd_port: Port to check
7267
*
7368
* Returns Index into interface port list

‎drivers/staging/octeon/ethernet.c‎

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ static void cvm_oct_periodic_worker(struct work_struct *work)
176176
queue_delayed_work(cvm_oct_poll_queue, &priv->port_periodic_work, HZ);
177177
}
178178

179-
/**
180-
* Configure common hardware for all interfaces
181-
*/
182179
static __init void cvm_oct_configure_common_hw(void)
183180
{
184181
/* Setup the FPA */
@@ -198,10 +195,10 @@ static __init void cvm_oct_configure_common_hw(void)
198195
}
199196

200197
/**
201-
* Free a work queue entry received in a intercept callback.
198+
* cvm_oct_free_work- Free a work queue entry
199+
*
200+
* @work_queue_entry: Work queue entry to free
202201
*
203-
* @work_queue_entry:
204-
* Work queue entry to free
205202
* Returns Zero on success, Negative on failure.
206203
*/
207204
int cvm_oct_free_work(void *work_queue_entry)
@@ -228,9 +225,9 @@ int cvm_oct_free_work(void *work_queue_entry)
228225
EXPORT_SYMBOL(cvm_oct_free_work);
229226

230227
/**
231-
* Get the low level ethernet statistics
232-
*
228+
* cvm_oct_common_get_stats - get the low level ethernet statistics
233229
* @dev: Device to get the statistics from
230+
*
234231
* Returns Pointer to the statistics
235232
*/
236233
static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
@@ -274,8 +271,7 @@ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
274271
}
275272

276273
/**
277-
* Change the link MTU. Unimplemented
278-
*
274+
* cvm_oct_common_change_mtu - change the link MTU
279275
* @dev: Device to change
280276
* @new_mtu: The new MTU
281277
*
@@ -339,8 +335,7 @@ static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu)
339335
}
340336

341337
/**
342-
* Set the multicast list. Currently unimplemented.
343-
*
338+
* cvm_oct_common_set_multicast_list - set the multicast list
344339
* @dev: Device to work on
345340
*/
346341
static void cvm_oct_common_set_multicast_list(struct net_device *dev)
@@ -395,10 +390,10 @@ static void cvm_oct_common_set_multicast_list(struct net_device *dev)
395390
}
396391

397392
/**
398-
* Set the hardware MAC address for a device
399-
*
400-
* @dev: Device to change the MAC address for
401-
* @addr: Address structure to change it too. MAC address is addr + 2.
393+
* cvm_oct_common_set_mac_address - set the hardware MAC address for a device
394+
* @dev: The device in question.
395+
* @addr: Address structure to change it too.
396+
402397
* Returns Zero on success
403398
*/
404399
static int cvm_oct_common_set_mac_address(struct net_device *dev, void *addr)
@@ -445,9 +440,9 @@ static int cvm_oct_common_set_mac_address(struct net_device *dev, void *addr)
445440
}
446441

447442
/**
448-
* Per network device initialization
449-
*
443+
* cvm_oct_common_init - per network device initialization
450444
* @dev: Device to initialize
445+
*
451446
* Returns Zero on success
452447
*/
453448
int cvm_oct_common_init(struct net_device *dev)
@@ -603,12 +598,6 @@ static const struct net_device_ops cvm_oct_pow_netdev_ops = {
603598

604599
extern void octeon_mdiobus_force_mod_depencency(void);
605600

606-
/**
607-
* Module/ driver initialization. Creates the linux network
608-
* devices.
609-
*
610-
* Returns Zero on success
611-
*/
612601
static int __init cvm_oct_init_module(void)
613602
{
614603
int num_interfaces;
@@ -802,11 +791,6 @@ static int __init cvm_oct_init_module(void)
802791
return 0;
803792
}
804793

805-
/**
806-
* Module / driver shutdown
807-
*
808-
* Returns Zero on success
809-
*/
810794
static void __exit cvm_oct_cleanup_module(void)
811795
{
812796
int port;

‎drivers/staging/octeon/octeon-ethernet.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ struct octeon_ethernet {
6161
struct work_struct port_work; /* may be unused. */
6262
};
6363

64-
/**
65-
* Free a work queue entry received in a intercept callback.
66-
*
67-
* @work_queue_entry:
68-
* Work queue entry to free
69-
* Returns Zero on success, Negative on failure.
70-
*/
7164
int cvm_oct_free_work(void *work_queue_entry);
7265

7366
extern int cvm_oct_rgmii_init(struct net_device *dev);

0 commit comments

Comments
 (0)