From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752433AbbJEJHl (ORCPT ); Mon, 5 Oct 2015 05:07:41 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:56001 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752313AbbJEJHh (ORCPT ); Mon, 5 Oct 2015 05:07:37 -0400 From: Arnd Bergmann To: Alim Akhtar Cc: kbuild test robot , kbuild-all@01.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, JBottomley@odin.com, vinholikatti@gmail.com, amit.daniel@samsung.com, essuuj@gmail.com, devicetree@vger.kernel.org, Rob Herring Subject: Re: [PATCH v3 13/13] scsi: ufs: Add exynos ufs platform data Date: Mon, 05 Oct 2015 11:06:59 +0200 Message-ID: <14885029.SsJgQkuPcG@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <56123165.2060500@samsung.com> References: <201510011845.GN7Kisc4%fengguang.wu@intel.com> <1790578.NZeHVGuJeN@wuerfel> <56123165.2060500@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:5ypJxYyC/rWCU+jqDRxsJLei6zbOZdkW/Y6oH6LcHE2i3GIVesr sS1UAlxXspezEZeu5wiTNH0inFIZD9WN/Ly76dtHEHsX5JpvDqhu7K795VnVnp2H9vTMPS7 YFgzsI2E6ftoClfGWYpPVBNIRNv8iyET1yN+MYtEVIlgFOg4mspy9gudH/2fmDciC7OZz1f vuo7PIe34tjpxErBY1oug== X-UI-Out-Filterresults: notjunk:1;V01:K0:57oHn0Ct2FQ=:EC1PbwTqopupCbJxM5aRS+ DP4Ol+Rgc2Nh861A/M+X772Jkb9cSWqjmT0v4GTL5l/REnjMUsRDna/trcTekOJlY8IDEnrB4 5LMlSJtnNCJmzrQtLRvgpPVLgoKq3JHHQMPUtFEFlooL6trMr64wUTG47/wH86AK+mr+VZcq6 ab42USHN+B4zmAcFjQeJmd28sIUHi3YsTTH0lKN7SXVmDxUGClqby8pbuExDTPkIInnJbtf6O 7q6xEMZ6hHbGUys23B6RfuwafIkJXgT5nGPbq1/5NE4qRTQ2UGhjOiuPGK9G3G+bfYteba0AO pIQGfWDrlAEwcBA9Ut8wPSPbu6Rl8g1VtA+Fd1ccx3QTySitc8xK0l/nDNiY4MV7YjcHQv/Wa qqT8HsxouL88IC8x8ij4HrODdBG4aUMCTrZ5ECO9XPuigqrgvYT/P35l0XqkCKx0eo95arqIa u/db7uPMZ0l/0SfsXPVUv0AAQZpKLto1m48xFfLJnvbBhqxTPJHpGdIwKqDHbKAp8THDH7Tho JXYWJK4D5AR807Y98uoboszBAMRVngQhFsfGHG2Krh+3PsovEVUNNUix6oHzb/nYE3okl3rW5 nc4firYLpjg08Bgd/LtQ0xZW7dAbEuCqrKfTpyeT69sKyyVplFFXM6YPQDL7QyFHyU0DdpZOx PInZpmDammAU2/eku3YIb4mxzm4VOALMoQe3fsxaBWUD3kbhxZ6on7vsfLA5HDQ40g9rMNGh1 QkSBd5DWArkyTf83 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 05 October 2015 13:44:29 Alim Akhtar wrote: > CCing Rob Herring, > > Hi Arnd, > > On 10/01/2015 04:59 PM, Arnd Bergmann wrote: > > On Thursday 01 October 2015 18:46:34 kbuild test robot wrote: > >> [auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore] > >> > >> config: x86_64-allmodconfig (attached as .config) > >> reproduce: > >> git checkout 6e153e3bf7c68b019e987c5a0ffadebd9c7d4fbb > >> # save the attached .config to linux build tree > >> make ARCH=x86_64 > >> > >> All error/warnings (new ones prefixed by >>): > >> > >>>> ERROR: "ufs_hba_exynos_ops" [drivers/scsi/ufs/ufshcd-pltfrm.ko] undefined! > >> > >> > > > > Ah, this seems to be a case of layering violation. It would be best to > > restructure the code so that the exynos driver registers a platform_driver > > by itself for the respective DT compatible string, and then calls > > into the common code from its probe function, rather than having the > > generic driver know about the specific backends. > > > > That approach will also make the generic driver more scalable as we > > add further chip-specific variations, and matches what we do in other > > drivers. > > > > Looks like some discussions on ufs variant driver probe method happened > here [1] few months back. > [1]-> https://lkml.org/lkml/2015/6/3/180 Hmm, too bad we didn't catch it then, it's much more work to fix now. > And since ufshcd-pltfrm is already a platform_driver, so I just add a > platform data for the variant driver. > I should have add a IS_ENABLED for it to avoid the compilation error for > other ARCH. I still think we should do this properly here. From looking at the qcom driver, it seems to me that the integration there was done in a way that could not work at all: $ git grep -w ufs_hba_qcom_vops drivers/scsi/ufs/ufs-qcom.c: * struct ufs_hba_qcom_vops - UFS QCOM specific variant operations drivers/scsi/ufs/ufs-qcom.c:static const struct ufs_hba_variant_ops ufs_hba_qcom_vops = { drivers/scsi/ufs/ufs-qcom.c:EXPORT_SYMBOL(ufs_hba_qcom_vops); In short, nothing references the ufs_hba_qcom_vops symbol, so the driver is never used, and if it did, it would not work for ufs being built-in beause the symbol is marked 'static'. Please do the samsung front-end as I suggested and send a patch to convert the qcom front-end the same way. No need to test that one as the current approach doesn't work. Arnd