Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1198446ybl; Thu, 12 Dec 2019 11:09:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxSeR1odw9QKHBx7NB2Vrj7Ks5mSREfGcsBcu1QmNRly1Mc2zU0Z6MPRaGLuWyYBbeuZddq X-Received: by 2002:a9d:7984:: with SMTP id h4mr10025214otm.297.1576177793543; Thu, 12 Dec 2019 11:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576177793; cv=none; d=google.com; s=arc-20160816; b=j3uB6TNtmQ+Gt21bpBbZcQCbEhzc2lXXmZe1gA6uk77PBW0T1HSu3ZPx1LJJj8JZbg AnMDuaytWfE2dh1sSkXMjzEfDc14sexydYauXJA+V96bB3n9t4zcPgtUeUiSLXYCsIFS W53FEpns4RFIrlcgaiT2ipdcwQ0Va/l6elhfjTD2IJATks94jtgA1uE3lc1rbc8RzUSU ncM2UoAAWesn0cBa/FYM3+gsUK50gSejWQmfbaBTeGs0kU1OPuntGe7ofmGAvup0dJaT cMRtMOADIpkyWWo18SlwUZomjLX3J3p++MyOrEsmuI4nXibh510cv4r8CDLUtiNSHVR5 S33A== 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=IxK9FtGpYJeOUfvnF7MggY9vmvu7+uyxyDOUYBGOZPw=; b=C0qTOPAlpSL61GpQz2eesYE2uoScuXlqq7j5a/ezslwNFftSwRWTqEpDdkd486aGbM /jcIIv9EgrW90o1gC2nExmhEIsxopmo2rwbyOApH1GVpjQGCgnBB8gkESl00o5rqfs5D AxuupOIqiTYX+umaMYyw2xzw8cDjN5JFOY4aIFkOG7WQHVokq+wlGPQA55CdPipAy4tC Z9zDhdW8jnFRIhhsSgbssAaKLAy0t6L2Jgg65Hqqga8lseoRZC7pg3ifITThDFrnfZtH 1e4IIN5AVCNzsCZX55jBpux2IJOJTnkjFIVxi0dVh71ws5gxmzDrdGS/EXyj8onyi20U 5+Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XShq7tcK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si3741796otq.95.2019.12.12.11.09.38; Thu, 12 Dec 2019 11:09:53 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XShq7tcK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730387AbfLLTJF (ORCPT + 99 others); Thu, 12 Dec 2019 14:09:05 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35982 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730096AbfLLTJF (ORCPT ); Thu, 12 Dec 2019 14:09:05 -0500 Received: by mail-wm1-f67.google.com with SMTP id p17so3826747wma.1; Thu, 12 Dec 2019 11:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IxK9FtGpYJeOUfvnF7MggY9vmvu7+uyxyDOUYBGOZPw=; b=XShq7tcKoeE+Txh1DEN5WhLp0eR/w69ZPSSfE+iXxHgHs0gOju6ZXq+p1U1RcRKBWV Pf+WEL7yhcSNaso+niPZhq2I8ig9HcwcmRZj7C4V/UAuLNCRpAZKF9uNqdj4kI6+qitF wssJMmQKMq541gCc68PXUiZilDMwnSycahaOS/M8D87+Jx+RGR+vA4bDuWm2rJNcMcaI XYnurMLbUaQz1lQ1tReQLskTknW118Rbuf61l+6gaoVBCXcTiXVGR8QggDfpmKcnGAiY ScpzgnYUw8E4wE6BVOB7oojAGJ256kAey11+LG3HL4J6s1/0DZfZmQKGk6BLrKGcA65Q lHAw== 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=IxK9FtGpYJeOUfvnF7MggY9vmvu7+uyxyDOUYBGOZPw=; b=dTox4/e4DGPRi1pJN8BrU3elvLkqFT9/RiBO8nKIcmR5zHY57tRFtI9raea+9Vng9J i2cOklihcLc+TA9jtpx2+LUG4uuw288NWqJhlL7igcSlEoK1N3VzIVG8jKukSOBViTLO jJgEJSi/kZUF9miJIwIHy95VVYHJHPrX0ZzcbtacLcq1edaxiny83IrH9dp9gT4ZzEc/ Pdgjz3phHDdv0hzmH7E32cL2mjXxvXLusjAdDHCZMq4jrbQLSI0uQeqbx6JG91to7Egj FnB0/QQPEK8VfvN1bkozNwtdgdulXeajj0YQZIqhBSdB8GYiC2G/8JEsfunRw2qbn4LK JX6g== X-Gm-Message-State: APjAAAU9rs6mev720pdAvkzWLaT8Ncd89LIPOAQRk+++gy6N5yLxoaQS MkmlY+Ov1PVMjRwh7Pj2eF4= X-Received: by 2002:a1c:2705:: with SMTP id n5mr8858556wmn.68.1576177742710; Thu, 12 Dec 2019 11:09:02 -0800 (PST) Received: from arch-thunder.localdomain (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id o66sm3322584wmo.20.2019.12.12.11.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 11:09:01 -0800 (PST) Date: Thu, 12 Dec 2019 19:08:58 +0000 From: Rui Miguel Silva To: Dan Carpenter Cc: Chuhong Yuan , devel@driverdev.osuosl.org, Philipp Zabel , Greg Kroah-Hartman , Sascha Hauer , linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , Steve Longerbeam , Mauro Carvalho Chehab , Shawn Guo , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: Re: [PATCH] media: imx7-mipi-csis: Add the missed v4l2_async_notifier_cleanup in remove Message-ID: <20191212190858.nslwdcjpbjnrfvq2@arch-thunder.localdomain> References: <20191209085828.16183-1-hslester96@gmail.com> <20191212115134.GA1895@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191212115134.GA1895@kadam> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dan, Thanks for the inputs. On Thu, Dec 12, 2019 at 02:51:34PM +0300, Dan Carpenter wrote: > On Mon, Dec 09, 2019 at 04:58:28PM +0800, Chuhong Yuan wrote: > > All drivers in imx call v4l2_async_notifier_cleanup() after > > unregistering the notifier except this driver. This should be a > > miss and we need to add the call to fix it. > > > > Signed-off-by: Chuhong Yuan --- > > drivers/staging/media/imx/imx7-mipi-csis.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c > > b/drivers/staging/media/imx/imx7-mipi-csis.c index > > 99166afca071..2bfa85bb84e7 100644 --- > > a/drivers/staging/media/imx/imx7-mipi-csis.c +++ > > b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -1105,6 +1105,7 @@ > > static int mipi_csis_remove(struct platform_device *pdev) > > mipi_csis_debugfs_exit(state); > > v4l2_async_unregister_subdev(&state->mipi_sd); > > v4l2_async_notifier_unregister(&state->subdev_notifier); + > > v4l2_async_notifier_cleanup(&state->subdev_notifier); > > > > In this case the "state->subdev_notifier" was never initialized or > used so both v4l2_async_notifier_unregister() and > v4l2_async_notifier_cleanup() are no-ops. I have applied this patch on top of Steve's series [0], since by the timeline I was expecting to be applied before this one, that series adds a bound notifier, even though, it is not named the same, eheh. That trigged me to think that this cleanup was correct since a notifier was initialized in probe. But as you say, it is a no-ops in the end. @Steve, that said, it looks that in [0], you will need to add some unregister and cleanup for the notifiers that you are adding in several places. A patch to fix this will follow. ------ Cheers, Rui [0]: https://patchwork.kernel.org/project/linux-media/list/?series=207517 > > We should just delete "subdev_notifier". > > regards, dan carpenter > > _______________________________________________ devel mailing list > devel@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel