From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759316AbcCVOTD (ORCPT ); Tue, 22 Mar 2016 10:19:03 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:60670 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758735AbcCVOSz (ORCPT ); Tue, 22 Mar 2016 10:18:55 -0400 From: Arnd Bergmann To: James Bottomley Cc: Vinayak Holikatti , "Martin K. Petersen" , Yaniv Gardi , Stephen Boyd , Hannes Reinecke , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: ufs: select CONFIG_NLS Date: Tue, 22 Mar 2016 15:18:27 +0100 Message-ID: <6292485.RzKll8UR2a@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1458646999.2408.3.camel@linux.vnet.ibm.com> References: <1458217819-2802119-1-git-send-email-arnd@arndb.de> <1458646999.2408.3.camel@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:u2WVfb1soNkWevGxjLCq8qBuKPM2W/IoQoi7VuAk6UrWAzpkdoM Tk7+Yz2i1H8a64iQSwSQc6r8fCGOUq/zz3wCwRgtCQw+BEuUVQeFnJ6uDujPhbaRuujviWG UiH0jXiOo8Ew8g8t3UexYXbLJsx9oBGN5Bo9ToPF8OHXeMqn68VuOgF/7u/9N015kevS8pH VYZSVpCO1Hxi8lZTn6XnA== X-UI-Out-Filterresults: notjunk:1;V01:K0:UVHqw9NIgnA=:fRCIeQWd9j2IhalDibhWga KCHggaZ/hl6qWq29qh1jUeyFQOyIroIg95c3d416fbfrlsm1mQ4kw0I1RhKCGVHkYG7N0Tt+y CJRPSxS+d6vBn9UE8R0A5WNhBsMr/plgN71WHFCoelRslr+YjueSTxHYW36gmpB+mpvILMTIK YYIxAzjWeQHW32awUycHXzg3Kcvqib6VhPLz5kiiaR2Prtc9ofxCjF96uxwv8/L608Rsf1i5w N1KldieqVPlgAYy2iJmBgnMaaRIsfjL9vO8EiEQyu1qDzWT0E4+VRD/AVtFiVVQ1gdGSPYSG2 cJmueZHTdhtevBFN7OmEVkbWMCwH6+U5UvdEIw9sWSRspQYPKDHalGIkjILHkrNCzGyoHGD22 UhWz5zgBsTlfsoZYjGihHMaEEv2bZ8cFNmPBqiIohbI2W14qn6JIi3EYdMDiIV47VbbNK9rW2 OZ/3dGEWZEv7CM1pt+R76KafHdCmfd2rb+bdyvlRZZB6i1gjZFOzdeF3oRhxtTGh20g6S9XZx OeF0JyfCKnm1DdKTGNdPI5K+BglQ1r0TjLliVPUrliqxLgEpi6tXmQq37/r1rSpg7QXN+90vs KE8IcGwmj7eDslLbphpw0lgZ9RyGXmhf8ybNBUI9cGfYxXqGJjUU6QCuintRy6aNbRSykDO6K +WeGspXEGMwqTbkjrRHxOamQN7nNdTwkFqF0ZtWnspSLkmEaq6v15xnfQ30d4T+qxiWZwSbv4 uzkwcvdSSLAZdbfH Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 22 March 2016 07:43:19 James Bottomley wrote: > > diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig > > index 5f4530744e0a..097894a1fab5 100644 > > --- a/drivers/scsi/ufs/Kconfig > > +++ b/drivers/scsi/ufs/Kconfig > > @@ -37,6 +37,7 @@ config SCSI_UFSHCD > > depends on SCSI && SCSI_DMA > > select PM_DEVFREQ > > select DEVFREQ_GOV_SIMPLE_ONDEMAND > > + select NLS > > This looks like a bad solution: CONFIG_NLS is nothing more than a menu > selector for the NLS subsystem. It's a bit of both: CONFIG_NLS by itself controls the compilation of the fs/nls/nls_base.c file, which has the definition of the utf16s_to_utf8s function called by this driver. The same file also contains the NLS subsystem with the register_nls/unregister_nls/unload_nls/load_nls APIs that are used by the other files. > The problem is that selecting it will > allow a kernel to be build with NLS and without NLS_DEFAULT which is > going to cause all sorts of interesting problems on boot. I think you > really mean depends on NLS here. I agree that 'depends on NLS' makes more sense here, however I was just following what all other users of the API are doing. Mixing 'select' and 'depends on' can easily lead to circular dependencies, and I was trying to avoid that. A cleaner solution is probably to split out the utf16 access functions from the NLS subsystem, and have all these files that currently 'select NLS' pick that other interface (or both, if necessary) instead: drivers/acpi/device_sysfs.c drivers/hid/hid-cp2112.c drivers/hv/hv_fcopy.c drivers/hv/hv_kvp.c drivers/net/fjes/fjes_main.c drivers/net/hyperv/rndis_filter.c drivers/pci/pci-label.c drivers/scsi/ufs/ufshcd.c drivers/usb/core/message.c drivers/usb/gadget/configfs.c drivers/usb/gadget/u_os_desc.h drivers/usb/gadget/usbstring.c fs/cifs/cifs_unicode.c fs/fat/dir.c fs/fat/namei_vfat.c fs/isofs/joliet.c Not sure if that's worth the work though. Arnd