From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933848AbbLOXST (ORCPT ); Tue, 15 Dec 2015 18:18:19 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:52684 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932428AbbLOXSR convert rfc822-to-8bit (ORCPT ); Tue, 15 Dec 2015 18:18:17 -0500 From: Arnd Bergmann To: Lijun Pan Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, Lijun.Pan2000@gmail.com Subject: Re: [PATCH RESEND v3] fsl-ifc: add missing include on ARM64 Date: Wed, 16 Dec 2015 00:18:10 +0100 Message-ID: <3280521.lmIxOlm3Me@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1449863702-3020-1-git-send-email-Lijun.Pan@freescale.com> References: <1449863702-3020-1-git-send-email-Lijun.Pan@freescale.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" X-Provags-ID: V03:K0:QfqTqD+NXqRVSkt9MMtY6v4ZE8CQCDnYPxlJMb5tmQ+gfLhH+GK g4d2RezdSiQzwe3bTe9Qqpy3xQDjLJUoyI5eGZDx7MYQkPzq5KPndmnGD3jaNpAvO9QiQSG yIqew5GESn0twTouZGD+oKWu1NusnzqStXnmadYEkVbpMn7EyZqoQRfAl9QZg/HhTAvyC4g +TXwM7x4ctUDU9BkVuSsA== X-UI-Out-Filterresults: notjunk:1;V01:K0:8XPriuwRs9E=:qhQabPmOSE3V4v2AFvL3zS 4tdyMCC8V94y6Re4zEgPu5fBijb8/dtPbjNlR0y5a0uvuH0T5ANBAS1aj2j1AmW4Kq7XqZKsP lu1P61R407Kb4ZKb9/alFM3jPqSD9AriGvQcSFgwFoB1+PqAcUoNH5KryLjQLTQLM/qjvntg1 Yg8Xr/oZHtxn6hmIh9CMZFkG/LOg5j/9bn76CiLG3vdhkX5PN9MKt8i8m8ooqgV+z6u8A+B2p xmpuJrDyXG8rh1JPVd2fYPBxyEdbVhukY55VwLdpJjypicADZ2F5zJwRX++lygY/wuogxUOe/ tKEwF8mv04bnywW+vrPZbo8LUvvhw+k8WXM7MFtzkLHxMvKavIb5/UX5nVSI/DAxy3jWp+wQp hzOBN7sg3d0myD132NoReUvOgNu0t7DNksDIq7dkhWJyaK0c+bEKQGhKsJdCY4DLjWgEIl4+S vw6m1x4hq/sLW0q5cBTdltxX1q513d+WEdjp07MqyD0HI2WQRImaQ8zku/Gek+xc6BkH/7NYb z9wm/5gMEQJGiV4vul6fkdRC+1PIHFj9pYKS6KkiLbeOnNwSO+am8ctGAzi5GUZbp+Oohx/dA TgM3+Kjg13H1cGrMnoFKdNg62XgzMkhVwXgHOZZWO3ihn/QHrwKMzv56QtUENFsKhWEDaeXJW VXeeqJqeury/4SQf/gZf5DW/6D6wjYxlbxDMyV9xzogxldG/oSMQirStbrVNPtIGXcOgLsyhH WoIj5NZHe5XKjD81 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 11 December 2015 13:55:02 Lijun Pan wrote: > Need to include sched.h to fix the following compilation error > if FSL_IFC is enabled on ARM64 machine. > > In file included from include/linux/mmzone.h:9:0, > from include/linux/gfp.h:5, > from include/linux/kmod.h:22, > from include/linux/module.h:13, > from drivers/memory/fsl_ifc.c:22: > drivers/memory/fsl_ifc.c: In function ‘check_nand_stat’: > include/linux/wait.h:165:35: error: ‘TASK_NORMAL’ undeclared (first use in this function) > #define wake_up(x) __wake_up(x, TASK_NORMAL, 1, NULL) > ^ > drivers/memory/fsl_ifc.c:136:3: note: in expansion of macro ‘wake_up’ > wake_up(&ctrl->nand_wait); > ^ > include/linux/wait.h:165:35: note: each undeclared identifier is reported only once for each function it appears in > #define wake_up(x) __wake_up(x, TASK_NORMAL, 1, NULL) > ^ > drivers/memory/fsl_ifc.c:136:3: note: in expansion of macro ‘wake_up’ > wake_up(&ctrl->nand_wait); > ^ > > Analysis is as follows: > I put some instrumental code and get the > following .h files inclusion sequence: > > In file included from ./arch/arm64/include/asm/compat.h:25:0, > from ./arch/arm64/include/asm/stat.h:23, > from include/linux/stat.h:5, > from include/linux/module.h:10, > from drivers/memory/fsl_ifc.c:23: > include/linux/sched.h:113:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’ > struct sched_attr { > ^ > > CONFIG_COMPAT=y is enabled while 39 and 48 bit VA is selected. > When 42 bit VA is selected, it does not enable CONFIG_COMPAT=y > > In ./arch/arm64/include/asm/stat.h:23, it has > "#ifdef CONFIG_COMPAT" > "#include " > "..." > "#endif" > > Since ./arch/arm64/include/asm/stat.h does not > include ./arch/arm64/include/asm/compat.h, > then it will not include include/linux/sched.h > Hence we have to manually add "#include " > in drivers/memory/fsl_ifc.c > > Signed-off-by: Lijun Pan > I've applied this to the fixes branch of arm-soc now. Thanks, Arnd