aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2010-04-15 00:22:11 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-05-11 15:01:39 -0400
commitf6d3780061283039de33b402c35c3bf9322afe14 (patch)
tree67ec48ba847e45e372d20f93facb658c4d6f2b4f /drivers/pci
parent89713422a768458a0d375f0c2f3586cd5ccde6a1 (diff)
PCI: aerdrv: trivial cleanup for aerdrv.c
Skip zero-ing in aer_alloc_rpc() since it is allocated by kzalloc(). The closing comment marker "*/" is recommended for kernel-doc comments. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie/aer/aerdrv.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index a225d58c1ac8..484cc55194b8 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -185,7 +185,7 @@ static void aer_disable_rootport(struct aer_rpc *rpc)
185 * @context: pointer to Root Port data structure 185 * @context: pointer to Root Port data structure
186 * 186 *
187 * Invoked when Root Port detects AER messages. 187 * Invoked when Root Port detects AER messages.
188 **/ 188 */
189irqreturn_t aer_irq(int irq, void *context) 189irqreturn_t aer_irq(int irq, void *context)
190{ 190{
191 unsigned int status, id; 191 unsigned int status, id;
@@ -242,7 +242,7 @@ EXPORT_SYMBOL_GPL(aer_irq);
242 * @dev: pointer to the pcie_dev data structure 242 * @dev: pointer to the pcie_dev data structure
243 * 243 *
244 * Invoked when Root Port's AER service is loaded. 244 * Invoked when Root Port's AER service is loaded.
245 **/ 245 */
246static struct aer_rpc *aer_alloc_rpc(struct pcie_device *dev) 246static struct aer_rpc *aer_alloc_rpc(struct pcie_device *dev)
247{ 247{
248 struct aer_rpc *rpc; 248 struct aer_rpc *rpc;
@@ -251,15 +251,11 @@ static struct aer_rpc *aer_alloc_rpc(struct pcie_device *dev)
251 if (!rpc) 251 if (!rpc)
252 return NULL; 252 return NULL;
253 253
254 /* 254 /* Initialize Root lock access, e_lock, to Root Error Status Reg */
255 * Initialize Root lock access, e_lock, to Root Error Status Reg,
256 * Root Error ID Reg, and Root error producer/consumer index.
257 */
258 spin_lock_init(&rpc->e_lock); 255 spin_lock_init(&rpc->e_lock);
259 256
260 rpc->rpd = dev; 257 rpc->rpd = dev;
261 INIT_WORK(&rpc->dpc_handler, aer_isr); 258 INIT_WORK(&rpc->dpc_handler, aer_isr);
262 rpc->prod_idx = rpc->cons_idx = 0;
263 mutex_init(&rpc->rpc_mutex); 259 mutex_init(&rpc->rpc_mutex);
264 init_waitqueue_head(&rpc->wait_release); 260 init_waitqueue_head(&rpc->wait_release);
265 261
@@ -274,7 +270,7 @@ static struct aer_rpc *aer_alloc_rpc(struct pcie_device *dev)
274 * @dev: pointer to the pcie_dev data structure 270 * @dev: pointer to the pcie_dev data structure
275 * 271 *
276 * Invoked when PCI Express bus unloads or AER probe fails. 272 * Invoked when PCI Express bus unloads or AER probe fails.
277 **/ 273 */
278static void aer_remove(struct pcie_device *dev) 274static void aer_remove(struct pcie_device *dev)
279{ 275{
280 struct aer_rpc *rpc = get_service_data(dev); 276 struct aer_rpc *rpc = get_service_data(dev);
@@ -298,7 +294,7 @@ static void aer_remove(struct pcie_device *dev)
298 * @id: pointer to the service id data structure 294 * @id: pointer to the service id data structure
299 * 295 *
300 * Invoked when PCI Express bus loads AER service driver. 296 * Invoked when PCI Express bus loads AER service driver.
301 **/ 297 */
302static int __devinit aer_probe(struct pcie_device *dev) 298static int __devinit aer_probe(struct pcie_device *dev)
303{ 299{
304 int status; 300 int status;
@@ -338,7 +334,7 @@ static int __devinit aer_probe(struct pcie_device *dev)
338 * @dev: pointer to Root Port's pci_dev data structure 334 * @dev: pointer to Root Port's pci_dev data structure
339 * 335 *
340 * Invoked by Port Bus driver when performing link reset at Root Port. 336 * Invoked by Port Bus driver when performing link reset at Root Port.
341 **/ 337 */
342static pci_ers_result_t aer_root_reset(struct pci_dev *dev) 338static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
343{ 339{
344 u32 reg32; 340 u32 reg32;
@@ -372,7 +368,7 @@ static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
372 * @error: error severity being notified by port bus 368 * @error: error severity being notified by port bus
373 * 369 *
374 * Invoked by Port Bus driver during error recovery. 370 * Invoked by Port Bus driver during error recovery.
375 **/ 371 */
376static pci_ers_result_t aer_error_detected(struct pci_dev *dev, 372static pci_ers_result_t aer_error_detected(struct pci_dev *dev,
377 enum pci_channel_state error) 373 enum pci_channel_state error)
378{ 374{
@@ -385,7 +381,7 @@ static pci_ers_result_t aer_error_detected(struct pci_dev *dev,
385 * @dev: pointer to Root Port's pci_dev data structure 381 * @dev: pointer to Root Port's pci_dev data structure
386 * 382 *
387 * Invoked by Port Bus driver during nonfatal recovery. 383 * Invoked by Port Bus driver during nonfatal recovery.
388 **/ 384 */
389static void aer_error_resume(struct pci_dev *dev) 385static void aer_error_resume(struct pci_dev *dev)
390{ 386{
391 int pos; 387 int pos;
@@ -412,7 +408,7 @@ static void aer_error_resume(struct pci_dev *dev)
412 * aer_service_init - register AER root service driver 408 * aer_service_init - register AER root service driver
413 * 409 *
414 * Invoked when AER root service driver is loaded. 410 * Invoked when AER root service driver is loaded.
415 **/ 411 */
416static int __init aer_service_init(void) 412static int __init aer_service_init(void)
417{ 413{
418 if (pcie_aer_disable) 414 if (pcie_aer_disable)
@@ -426,7 +422,7 @@ static int __init aer_service_init(void)
426 * aer_service_exit - unregister AER root service driver 422 * aer_service_exit - unregister AER root service driver
427 * 423 *
428 * Invoked when AER root service driver is unloaded. 424 * Invoked when AER root service driver is unloaded.
429 **/ 425 */
430static void __exit aer_service_exit(void) 426static void __exit aer_service_exit(void)
431{ 427{
432 pcie_port_service_unregister(&aerdriver); 428 pcie_port_service_unregister(&aerdriver);