From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751682AbcFZBNf (ORCPT ); Sat, 25 Jun 2016 21:13:35 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:41826 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbcFZBNd (ORCPT ); Sat, 25 Jun 2016 21:13:33 -0400 Date: Sun, 26 Jun 2016 02:13:15 +0100 From: Mark Brown To: Michal Suchanek Cc: Greg Kroah-Hartman , Ingo Molnar , Andrew Morton , Kees Cook , Thomas Gleixner , Dan Williams , Tejun Heo , "Paul E. McKenney" , Davidlohr Bueso , Andrey Ryabinin , Nikolay Aleksandrov , Dmitry Vyukov , Adrien Schildknecht , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Message-ID: <20160626011315.GE28202@sirena.org.uk> References: <8b66102e44829c5dc445c17f7bfad1050840b9f0.1466696079.git.hramrach@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lBPdJKrYqo3eKYSb" Content-Disposition: inline In-Reply-To: <8b66102e44829c5dc445c17f7bfad1050840b9f0.1466696079.git.hramrach@gmail.com> X-Cookie: Beware of Bigfoot! User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 1/3] spi: spidev: fix the check for spidev in dt X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --lBPdJKrYqo3eKYSb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 23, 2016 at 05:41:19PM -0000, Michal Suchanek wrote: > The check is supposed to warn about spidev specified directly in > devicetree as compatible. This just does not work. I have a devicetree > with no compatible whatsoever and hacked my kernel so I can manually > bind spidev. This still triggers. Well, a DT device won't instantiate without a compatible string... could you please explain exactly what makes you say this won't work? > Also I have no idea how this could have build with ! CONFIG_OF since the > id table which the code checks is not compiled then. of_match_device() compiles out when !OF. > +static const struct of_device_id spidev_check[] = { > + { .compatible = "spidev" }, > + {} > +}; The indentation here is completely non-standard. > - if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev)) { > + if (spi->dev.of_node && of_match_device(spidev_check, &spi->dev)) { I think what you intend to say in the commit message is that you want to change from a whitelist to a blacklist since that is what the code says, but like I say we also need an explanation of the logic behind such a change. --lBPdJKrYqo3eKYSb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXbywqAAoJECTWi3JdVIfQWdsH/AlbCfIJrqO1BtTQWXQd08jS KsXx6D+OvuzjrSzYDpSTb2fngMoCzEzfyuNmE6uIh2N61JuwXIygEUti6lkbI2aG HuYkrf4G157xefc1NPtXCs7JJI9eC0nXDV/wXrz/78jOrUpJsPj81KDXWZpQtvCi UtYLDquFDFvwjjurbyx8JPORVjGh1zdvtNRodgjshxMK2G+FpbSoRK62iY64gaqM xcC7zuvX2l5GvGWJoSncGOHPe0ykV51Ai7HvF4IhRxNev1JTHkSwp0l06n0KKDGQ SO9wvWOjJjkekAOonul4MO13u19gi91hDEuXGG1iwF8o4PwQQb3Abi9YPKgQHus= =AUG4 -----END PGP SIGNATURE----- --lBPdJKrYqo3eKYSb--