[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200727141152.GM2216@nanopsycho>
Date: Mon, 27 Jul 2020 16:11:52 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Vadym Kochan <vadym.kochan@...ision.eu>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jiri Pirko <jiri@...lanox.com>,
Ido Schimmel <idosch@...lanox.com>,
Andrew Lunn <andrew@...n.ch>,
Oleksandr Mazur <oleksandr.mazur@...ision.eu>,
Serhiy Boiko <serhiy.boiko@...ision.eu>,
Serhiy Pshyk <serhiy.pshyk@...ision.eu>,
Volodymyr Mytnyk <volodymyr.mytnyk@...ision.eu>,
Taras Chornyi <taras.chornyi@...ision.eu>,
Andrii Savka <andrii.savka@...ision.eu>,
netdev <netdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mickey Rachamim <mickeyr@...vell.com>
Subject: Re: [net-next v4 2/6] net: marvell: prestera: Add PCI interface
support
Mon, Jul 27, 2020 at 03:29:17PM CEST, andy.shevchenko@...il.com wrote:
>On Mon, Jul 27, 2020 at 3:23 PM Vadym Kochan <vadym.kochan@...ision.eu> wrote:
[...]
>
>> + pci_set_drvdata(pdev, fw);
>> +
>> + err = prestera_fw_init(fw);
>> + if (err)
>> + goto err_prestera_fw_init;
>> +
>> + dev_info(fw->dev.dev, "Switch FW is ready\n");
>> +
>> + fw->wq = alloc_workqueue("prestera_fw_wq", WQ_HIGHPRI, 1);
>> + if (!fw->wq)
>> + goto err_wq_alloc;
>> +
>> + INIT_WORK(&fw->evt_work, prestera_fw_evt_work_fn);
>> +
>> + err = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
>> + if (err < 0) {
>> + pci_err(pdev, "MSI IRQ init failed\n");
>> + goto err_irq_alloc;
>> + }
>> +
>> + err = request_irq(pci_irq_vector(pdev, 0), prestera_pci_irq_handler,
>> + 0, driver_name, fw);
>> + if (err) {
>> + pci_err(pdev, "fail to request IRQ\n");
>> + goto err_request_irq;
>> + }
>> +
>> + err = prestera_device_register(&fw->dev);
>> + if (err)
>> + goto err_prestera_dev_register;
>> +
>> + return 0;
>> +
>> +err_prestera_dev_register:
>> + free_irq(pci_irq_vector(pdev, 0), fw);
>> +err_request_irq:
>> + pci_free_irq_vectors(pdev);
>> +err_irq_alloc:
>> + destroy_workqueue(fw->wq);
>> +err_wq_alloc:
>> + prestera_fw_uninit(fw);
>
>> +err_prestera_fw_init:
>> +err_pci_dev_alloc:
>> +err_dma_mask:
>
>All three are useless.
This is okay. It is symmetrical with init. err_what_you_init. It is all
over the place.
[...]
Powered by blists - more mailing lists