Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4888422pjb; Mon, 27 Jul 2020 07:39:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHGXtIMM9cqIB9PMCslNIZMT1E/dilFXTXTIoOwjBinwuJvWavj9Sf39G3VqWjbt/ZeXDy X-Received: by 2002:a17:907:72c7:: with SMTP id du7mr22192723ejc.248.1595860762702; Mon, 27 Jul 2020 07:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860762; cv=none; d=google.com; s=arc-20160816; b=eaTG/DNsT9CGfOc3rLfIDEa3//tPAlM0GcSwj3UFCCGOnvE73Aeac5pcOWksrLp8/9 HPpmWNCyFL0/V/v7XtA3zMZbFsX94ZKQHmKdURy1y5ggmRs9PlD6Hzw5BFCdwp6wYKqs dK2Q3AADXQ/OvXnck40jxzp/Y7INhplgD8a2reUfYSSdOLBNdlqzGhy0rS0qdLU5aNVM fW0s+NPfDew+oy/SRk03/SHaxF6sgQmGGPP5dBEnHV8+3krRJvYAZhgZQtljSS/YyrfN Dr9V587GIvot9LWpN4hOnDt2D6Tx8R0x6k2GvCUK76KiSWhrjqybVGRRW5wXM86cZkWE 1CqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=4JgRbp7y5AMyhvqG5bScPLnAhL+Dr6FW3JEWyK7fnPk=; b=PPsSUrgBEwGnsp7Qgr4LOjYeq63pulQSmNhCPapojPse0pRCS2U4pMT/ypYvBtI9op zfeoDTWJouSeDSzT1MDn7PTZlmKnm8keYaY3kjbgF/wXpUXB0PA1IEO5OeFaQPYmLO8P Xz6mV1s6bL49zlKNh5MxUWtfZGsJqJVaDS5NTtlfhkWYJbjwbo+Vb0+V4faYPV1mKVJj KRk3h6VeCogO7oB2nzHG8hWorLRHpTvoioJAKD8o7SIv025Bbdff/puiLzFS7AMp2oy5 H+9MVR/5qZ8JEASvY5WL/q/CF4D9mLF9Jss4XiaA9oVsWAxaafsZuHbIb4NEvsMejtar eK3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=Thx0NMVZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si498108edv.36.2020.07.27.07.39.01; Mon, 27 Jul 2020 07:39:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=Thx0NMVZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730844AbgG0Oh6 (ORCPT + 99 others); Mon, 27 Jul 2020 10:37:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730093AbgG0OLz (ORCPT ); Mon, 27 Jul 2020 10:11:55 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A10CC0619D2 for ; Mon, 27 Jul 2020 07:11:54 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id f18so15065384wrs.0 for ; Mon, 27 Jul 2020 07:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4JgRbp7y5AMyhvqG5bScPLnAhL+Dr6FW3JEWyK7fnPk=; b=Thx0NMVZq3esv/QXucfWm4kQBU20kaxbTvp2huJ8YMSgaOyNpOu2HcIk+4W8IY3A8f HjtYp6mAAec55vmuLzIiSogxlGoEU2880uywG1sqaBwr/n1omJywwQw0DKjB060HOv49 4lWKCNp+doOf1wBGb/+2Ts1l+JExa32v9Wgo0Ndj4HWfA/O6qn5ZCoMu+i8V7sKNq6uv cm7mwcqZs7QeMkTXYOmIEjL9AEbmeFfQ+v+C0rhByRRxf4nRuZ7K/NKS0EuxDM7Y/Yuz pocwriw+mhSodfDj+M8fa0/rKQ5CI4r36WwUoUc6qFkMVxBjkCfGIS9etNNNYwOx1xQP 3YQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4JgRbp7y5AMyhvqG5bScPLnAhL+Dr6FW3JEWyK7fnPk=; b=PYcIo0R+e5NplTQqz/jPN/QOhAv0mTjh5mnolb64qOo4rryCndhbCXMKoEwfSB1DMO aH0ZHd7Z7evz4CoLdgkw0TG7xuxnb0Md7goVjdgVKqZPwphuCuGnOkiDxSyyFZScNRbo ZDOx9XrCP7DZXTm2LG25rR4tEd4Jd+uyabibEP/sbeONY6HDFBuPgJue5sJA/KshrZ2o ugZUMbYCo8Sy44Y4Hfidf/exNn3PPEyj7GOwiCnofbdxU8K0Hai0TTPzwfyvEAsKvYcB eM469vM/SpC+S0LOcOMYUeKIqjNkPUsZKLrc7ToK7r+omKh3UEri9x9bDE/cB0vle88e z9kw== X-Gm-Message-State: AOAM531BRrPg+K/ehVVmyl4L0TkkQvV5NV0kyWwM0PMLR2a7VTyfyLv1 o/Ok6Z37Yhze3sRDNktfLmO/tQ== X-Received: by 2002:adf:ee8e:: with SMTP id b14mr9197042wro.213.1595859113354; Mon, 27 Jul 2020 07:11:53 -0700 (PDT) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id p6sm13014534wmg.0.2020.07.27.07.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 07:11:52 -0700 (PDT) Date: Mon, 27 Jul 2020 16:11:52 +0200 From: Jiri Pirko To: Andy Shevchenko Cc: Vadym Kochan , "David S. Miller" , Jakub Kicinski , Jiri Pirko , Ido Schimmel , Andrew Lunn , Oleksandr Mazur , Serhiy Boiko , Serhiy Pshyk , Volodymyr Mytnyk , Taras Chornyi , Andrii Savka , netdev , Linux Kernel Mailing List , Mickey Rachamim Subject: Re: [net-next v4 2/6] net: marvell: prestera: Add PCI interface support Message-ID: <20200727141152.GM2216@nanopsycho> References: <20200727122242.32337-1-vadym.kochan@plvision.eu> <20200727122242.32337-3-vadym.kochan@plvision.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mon, Jul 27, 2020 at 03:29:17PM CEST, andy.shevchenko@gmail.com wrote: >On Mon, Jul 27, 2020 at 3:23 PM Vadym Kochan 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. [...]