Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp912358ybp; Wed, 9 Oct 2019 06:13:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2LUy45arAT6nkgeEdxpM+Yhk3IKzIPhDe5j/wa+H1g0d1b7TazMqoPwyU8JpX65bSQY3d X-Received: by 2002:a17:907:20c7:: with SMTP id qq7mr2763911ejb.286.1570626797500; Wed, 09 Oct 2019 06:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570626797; cv=none; d=google.com; s=arc-20160816; b=hZ1gSbX1Ic3+6y/8BNAs8QRZrVQT5u6WZAXWDn5EG9HF9G4rNQWsRyz0YPkLXfPXLB oK2YD4wTd+vVNJ9ToHNQdkorwW4vZjQlyaSITOUSQpA9cNvaiOmRhfpM+PgEToOKto9n BnFS2zaYSl7UCy9Wcch2pqfx7Lz+1HBM899VTqBbvRlI+rOxmr3YOJFYExzX3BhDolSF RJGhl7OOEYLJ4KxKcfqjV8+qNhhjT0eBbQ0y5MlazWGx2RB20CCQ4G0K/Q2MJstC6Qg3 E46JnWc7CR9WyxEdh9QskP3ASfLmvUvWmGoJ9pBefjVpm5lZWxMIVp31RjzO7u4BM5ez bwvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/OwESGQ7kBeoI3Sk0Dg4uzZAYHuVF/Rt1NFWd9imXkA=; b=wa2S1uOnZz1AQzbe884OSsvcNQA3/02PJd5dC+dtL4779l8YYKmwxaiqrEEANliz3e twhKIrTzlUNPJh+zgJL5liXeKEwBbFhuhcegSQ90970/nCUwjige1y9GyIdQNkRY2nix nf0ADaleCrQsQ086H6qUTU/e3i/QxcId9wWVy/PDAvfkajpcKpX5MJzPSszK213HBc8m 3OhVQBkDFcWlbDVyRHSiK6hHcv950pIJ+K7ZjpQmBEO0i2/JMUCo59voWnouyfQBBW5n i+OEXukPx6jO3orLAFFhO0OczX5JP4nawEtiUaiwDkOlU8uCJsp2A75g3jEm9S9R1Pw9 kdhg== 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 j35si1387818eda.144.2019.10.09.06.12.53; Wed, 09 Oct 2019 06:13:17 -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 S1731254AbfJINMj (ORCPT + 99 others); Wed, 9 Oct 2019 09:12:39 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:34429 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731049AbfJINMj (ORCPT ); Wed, 9 Oct 2019 09:12:39 -0400 X-Originating-IP: 2.224.242.101 Received: from uno.localdomain (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id B38171BF20F; Wed, 9 Oct 2019 13:12:34 +0000 (UTC) Date: Wed, 9 Oct 2019 15:14:20 +0200 From: Jacopo Mondi To: Mauro Carvalho Chehab Cc: Stephen Boyd , linux-kernel@vger.kernel.org, Arnd Bergmann , Geert Uytterhoeven , Rob Herring , Frank Rowand , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH 02/10] media: renesas-ceu: Use of_device_get_match_data() Message-ID: <20191009131420.g4wdxa5t2ljiab2l@uno.localdomain> References: <20191004214334.149976-1-swboyd@chromium.org> <20191004214334.149976-3-swboyd@chromium.org> <20191009095440.6e834ecf@coco.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yyqmrurhzcbwilu3" Content-Disposition: inline In-Reply-To: <20191009095440.6e834ecf@coco.lan> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --yyqmrurhzcbwilu3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Sorry, totally missed it On Wed, Oct 09, 2019 at 09:54:40AM -0300, Mauro Carvalho Chehab wrote: > Em Fri, 4 Oct 2019 14:43:26 -0700 > Stephen Boyd escreveu: > > > This driver can use the replacement API instead of calling > > of_match_device() and then dereferencing the pointer that is returned. > > This nicely avoids referencing the match table when it is undefined with > > configurations where CONFIG_OF=n. > > > > Cc: Arnd Bergmann > > Cc: Geert Uytterhoeven > > Cc: Jacopo Mondi > > Cc: Mauro Carvalho Chehab > > Cc: Rob Herring > > Cc: Frank Rowand > > Cc: > > Cc: > > Signed-off-by: Stephen Boyd > > --- > > > > Please ack or pick for immediate merge so the last patch can be merged. > > Feel free to merge it via your tree: > > Acked-by: Mauro Carvalho Chehab > The CEU driver does probably not need this as the dereferencing of the pointer returned by of_match_device() is guarded by IS_ENABLED(CONFIG_OF), but surely this does not hurt and it's nicer to read. With Mauro's ack mine is probably not needed, but: Acked-by: Jacopo Mondi Thanks j > > > > > drivers/media/platform/renesas-ceu.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/media/platform/renesas-ceu.c b/drivers/media/platform/renesas-ceu.c > > index 197b3991330d..60518bbc2cd5 100644 > > --- a/drivers/media/platform/renesas-ceu.c > > +++ b/drivers/media/platform/renesas-ceu.c > > @@ -1679,7 +1679,7 @@ static int ceu_probe(struct platform_device *pdev) > > v4l2_async_notifier_init(&ceudev->notifier); > > > > if (IS_ENABLED(CONFIG_OF) && dev->of_node) { > > - ceu_data = of_match_device(ceu_of_match, dev)->data; > > + ceu_data = of_device_get_match_data(dev); > > num_subdevs = ceu_parse_dt(ceudev); > > } else if (dev->platform_data) { > > /* Assume SH4 if booting with platform data. */ > > > > Thanks, > Mauro --yyqmrurhzcbwilu3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEtcQ9SICaIIqPWDjAcjQGjxahVjwFAl2d3SwACgkQcjQGjxah VjygUhAAhXBeSvuYWzjdo23jPGMvoLueN77MU0RKZYyiVTxGeOygwNSJIqYYQCoD 4J/QfP05RmeX++f0mAwX0Pcizyki7nwWBkT6+6EfLYQKWgariDZlbeI6dThQxK+Z ErdTfceYG/9XPPlfKbdVbJuzg9boZ6FBc1+KQ96ceP05FeFwX/LrF7ythI/KOfkL OBDu1vCgrDUCX1EdUWyHRyXvrMKK1CJ4EVpYJzWBuElUtTjMNAkYg8jGb65uYzWn ko3nDjSWA22pUMXULfJ2UbL+U9zH0OMRwErNF2Vxnd5+xk8ikxLopBEg2iNJhKVT BMQs0DGbsZgt9A1hEWGG1z8Ucvai9FKdW158CVPcHdey+JUlcR/Rc8IBvtoYMwrW cr/Aeyws3qQXty3R0+XeVD3ROhOyAm1IN3yqBMdaBpy3uOiBXY3EF23ytEcA0tYz STOg445+0m7Zwj2rt35abAp0KVfBcz3KMoxYKjQwTVWM1LAiV58nangbBWYspm/x L5PspcBXjfhMIr4HclYh5KsXqt2ELmFKt7Yzn0zcQ7hwyt7EhiCpl56viQLUttka jIx3+LbPEC+oo1GZAfVR2oBdvLuYxvT2eH6RWP4G4sWjfaAPviL9W7c+4B+DQpc5 DBk9GLxIlYI+Oip/M/dwhFj9lFiP+AovjRjGq5l9HshDrPbBDlU= =1szO -----END PGP SIGNATURE----- --yyqmrurhzcbwilu3--