From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 828D4C433F5 for ; Sun, 16 Jan 2022 21:58:58 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JcTSx0TjWz3bVG for ; Mon, 17 Jan 2022 08:58:57 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=fmxgnOFp; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lunn.ch (client-ip=185.16.172.187; helo=vps0.lunn.ch; envelope-from=andrew@lunn.ch; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=fmxgnOFp; dkim-atps=neutral Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JcTSF0ykfz2xDY for ; Mon, 17 Jan 2022 08:58:21 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=Y62WBf7WncHPVF1rPc3S4E5knHjrE+JJV2IuxkQAh3U=; b=fmxgnOFptHQcJCqzjXWVmbFkm9 VO8Lo4wAfNHSboCGaSwhYHYTx29Y24Kn/kw5WUZtK0DSSLWxwGufDNVsbrqkJnHTj4CggAeMRx7jr TUlEkB0mudzVRSGnykFM10wFkj7THfBq3UPX86tuG1HAuogm/HSeMweyC6BiDPPOOMqo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1n9DTN-001Yup-Iv; Sun, 16 Jan 2022 22:54:01 +0100 Date: Sun, 16 Jan 2022 22:54:01 +0100 From: Andrew Lunn To: Tobias Waldekranz Subject: Re: [PATCH net 4/4] net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module Message-ID: References: <20220116211529.25604-1-tobias@waldekranz.com> <20220116211529.25604-5-tobias@waldekranz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220116211529.25604-5-tobias@waldekranz.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, madalin.bucur@nxp.com, robh+dt@kernel.org, paulus@samba.org, kuba@kernel.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, davem@davemloft.net Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sun, Jan 16, 2022 at 10:15:29PM +0100, Tobias Waldekranz wrote: > As reported by sparse: In the remove path, the driver would attempt to > unmap its own priv pointer - instead of the io memory that it mapped > in probe. Hi Tobias The change itself is O.K. Reviewed-by: Andrew Lunn But you could also change to devm_ so the core will handle the unmap, it is very unlikely to unmap the wrong thing. Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24640C433EF for ; Sun, 16 Jan 2022 21:54:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233816AbiAPVyO (ORCPT ); Sun, 16 Jan 2022 16:54:14 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:39508 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233774AbiAPVyN (ORCPT ); Sun, 16 Jan 2022 16:54:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=Y62WBf7WncHPVF1rPc3S4E5knHjrE+JJV2IuxkQAh3U=; b=fmxgnOFptHQcJCqzjXWVmbFkm9 VO8Lo4wAfNHSboCGaSwhYHYTx29Y24Kn/kw5WUZtK0DSSLWxwGufDNVsbrqkJnHTj4CggAeMRx7jr TUlEkB0mudzVRSGnykFM10wFkj7THfBq3UPX86tuG1HAuogm/HSeMweyC6BiDPPOOMqo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1n9DTN-001Yup-Iv; Sun, 16 Jan 2022 22:54:01 +0100 Date: Sun, 16 Jan 2022 22:54:01 +0100 From: Andrew Lunn To: Tobias Waldekranz Cc: davem@davemloft.net, kuba@kernel.org, madalin.bucur@nxp.com, robh+dt@kernel.org, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH net 4/4] net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module Message-ID: References: <20220116211529.25604-1-tobias@waldekranz.com> <20220116211529.25604-5-tobias@waldekranz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220116211529.25604-5-tobias@waldekranz.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Sun, Jan 16, 2022 at 10:15:29PM +0100, Tobias Waldekranz wrote: > As reported by sparse: In the remove path, the driver would attempt to > unmap its own priv pointer - instead of the io memory that it mapped > in probe. Hi Tobias The change itself is O.K. Reviewed-by: Andrew Lunn But you could also change to devm_ so the core will handle the unmap, it is very unlikely to unmap the wrong thing. Andrew