Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2370539ybp; Thu, 10 Oct 2019 06:30:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxy604z314kYPc6NT0T4kH4iMVVl+kW4BicAfMk1kWT8Q+e12tqMp0Sc0xekTH8r4h0qgvi X-Received: by 2002:a17:906:1f16:: with SMTP id w22mr8193752ejj.5.1570714234928; Thu, 10 Oct 2019 06:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570714234; cv=none; d=google.com; s=arc-20160816; b=YGWyzJhxeDqGBPINfb50pqEFajKxWNiYb0ToZhP3pDX9bOeCRt9LYKuCufArXkdzoM beWQ7zUx1gNOZYwabGSbeaaYJboy8bJsN35T8KRMbgVO7kbkFA1LbEZmbSJ5Bjb3cN9e Zs1I+CBz0AAdiqsXf3Nag+yf3tieEsSSXPudMtWpKxotyVzP4ZOZ5zFVWuF618zFh0De eXWW6CMFvOXjS0chgqgg7vqkAoZx9YTuAaGNniOFTr1E4w+2l+91zMj39Fxt8kb8gJWr MNqoY8zP7VMVEfSpjV0Qt53czutLhwjahw40rDkTw8ehog/34TgUQMNHCwCbH3zl+DVv ONlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=h9MdvNZJ/yGSn2s3GI5HakTrgn7MAUysJQJF2USITsA=; b=hVl97H8CgYdeDlaLVer0VQ8wz+TIZ/BLu2pOzJ7KD2Bx8rI1f947/7+Ik7FRRW8LlY V+s8EM3HM1tlVN3oG2UaVCu1UJIHDpLbI3dpHb7AgVPqIniljp858HBTdmt7qLda8nZG DgxuDfRQAPc5WqAyr+Izo0MjW5LPbiFnxs8MPAg7gJdGKjPm5AUhGqO2sY6U94FrsVH/ P1c5V9FkRmWNg/d1vai/kckVP5wE+X8jMJuNHKRyZHOf82ipp9KaPi/o0BVnUe0Tj64F r0aq9ncxgIQYcMRvCEWA1yV3qPlZCqZB6qQJQkaYp7vPcOFDyuhH4CaGyrXbaXmkG8kc cB0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p22si3219796ejf.278.2019.10.10.06.30.10; Thu, 10 Oct 2019 06:30:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387992AbfJJN3x convert rfc822-to-8bit (ORCPT + 99 others); Thu, 10 Oct 2019 09:29:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:48462 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727489AbfJJN3w (ORCPT ); Thu, 10 Oct 2019 09:29:52 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 17B43AC40; Thu, 10 Oct 2019 13:29:50 +0000 (UTC) Date: Thu, 10 Oct 2019 15:29:49 +0200 From: Thomas Bogendoerfer To: Jakub Kicinski Cc: Jonathan Corbet , Ralf Baechle , Paul Burton , James Hogan , Lee Jones , "David S. Miller" , Srinivas Kandagatla , Alessandro Zummo , Alexandre Belloni , Greg Kroah-Hartman , Jiri Slaby , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH v8 3/5] mfd: ioc3: Add driver for SGI IOC3 chip Message-Id: <20191010152949.f5049c2728beffa38f07c924@suse.de> In-Reply-To: <20191009201714.19296e3f@cakuba.netronome.com> References: <20191009101713.12238-1-tbogendoerfer@suse.de> <20191009101713.12238-4-tbogendoerfer@suse.de> <20191009201714.19296e3f@cakuba.netronome.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Oct 2019 20:17:14 -0700 Jakub Kicinski wrote: > On Wed, 9 Oct 2019 12:17:10 +0200, Thomas Bogendoerfer wrote: > [...] > > +static int ioc3_cad_duo_setup(struct ioc3_priv_data *ipd) > > +{ > > + int ret; > > + > > + ret = ioc3_irq_domain_setup(ipd, ipd->pdev->irq); > > + if (ret) > > + return ret; > > + > > + ret = ioc3_eth_setup(ipd, true); > > + if (ret) > > + return ret; > > + > > + return ioc3_kbd_setup(ipd); > > +} > > None of these setup calls have a "cleanup" or un-setup call. Is this > really okay? I know nothing about MFD, but does mfd_add_devices() not > require a remove for example? Doesn't the IRQ handling need cleanup? good catch, I'll add that. > > + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); > > + if (ret) { > > + dev_warn(&pdev->dev, > > + "Failed to set 64-bit DMA mask, trying 32-bit\n"); > > + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > > + if (ret) { > > + dev_err(&pdev->dev, "Can't set DMA mask, aborting\n"); > > + return ret; > > So failing here we don't care about disabling the pci deivce.. fixed in the next version. > > + > > + /* > > + * Map all IOC3 registers. These are shared between subdevices > > + * so the main IOC3 module manages them. > > + */ > > + regs = pci_ioremap_bar(pdev, 0); > > This doesn't seem unmapped on error paths, nor remove? will fix. Thank you for the review. Thomas. -- SUSE Software Solutions Germany GmbH HRB 247165 (AG M?nchen) Gesch?ftsf?hrer: Felix Imend?rffer