Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755221AbbKXWJ7 (ORCPT ); Tue, 24 Nov 2015 17:09:59 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:56186 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753828AbbKXWJz (ORCPT ); Tue, 24 Nov 2015 17:09:55 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: David Woodhouse , Brian Norris , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: cfi: don't warn about broken geometry for !CONFIG_MTD Date: Tue, 24 Nov 2015 23:09:02 +0100 Message-ID: <7025557.qur2fOT79A@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <4492128.vrqmf1niG3@wuerfel> References: <3747078.dk5V5gxuXa@wuerfel> <4492128.vrqmf1niG3@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:xZGHRpEFJ9OQZH2ppHnOiIZoT4dakwRVIErQTum4VT3AOW+HliD zmKrZVOPSWLZBF0+1xxJZrIadgWg7e0tWTR+8rplcic0JuRXm/yj/MXyRlCBkFP2fyJrspl MyG3aB7bRql24Dg1AjR2NDplny9IkVxnXtyyYe/s0VOOam5HRt5nWSunLXqquXH8mc0/h07 YAfVLiDZqmrX5KqLJMAQA== X-UI-Out-Filterresults: notjunk:1;V01:K0:GMoBIzcIhL8=:djBwq153eNCtxe9aAU9ypl 5lysWy6tBCOm0c67hMDA+qHGHX3+jJ+1+AcuOkcYJRKPQZitJ3nGriv2feDhmRNqd/S8i78tj N6x0DO6S6kJboq/1XiPKQa+QHr+MT2miRNaXWZN2Yae/CUvPa03tYq6H/N+2FF7hWIUZKBJV4 wqtG5itFydN+kwpQ3lAhF8S/piO7uW54Y7z3yKVH4l12at5DIH9DedAFIBUE4Zu3gmZMDGkU6 XeuFpYnhlPwQBSLPOaimL+L5CzGGZl0O6j0sUY82tOKaflIDVjziXmW6lRNyFStNVkEVIDSVr 6ZOYzq7GYfR1l9qJSh3+tzixMzYXvDi0F29Qgw2i5VC08A5ldXCIopaJkyfyhEjRIXBgBddSA ho9zkOYbC8P1Xbh9jX9C5zi0Q7ZsY7pAW1bof2fx5ttG1WoBETO83AtHtJVjvq9USHdV4FCM9 yvLfDqT/myCi7fYceHfNr4CrsFxp69mlLJ+5hQfnf1J9/1L5ZwkB9rBBdNnWYq+JcdMWtbJrU WxpRy+vFMM47Yk+WlX0Cc4X2t25599kevnmezsae2sYhNFXYRn848Wwp09hwDMyGHQB4LOdkA czkvMKAl066wIeML63CXjNhZLTuyX32kMa+4A2Qz/mFhAdnWUEqrntUueQxAg1RaEvNc8qBHa 0smAtch9qtBmWk9aZjXE6SVZAZKRjvkg+NY/4k4jLm8jK1mQg+FpUjvWe3N2skqWukI/XkE5o tYYrGfn2PzhdTyRZ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1578 Lines: 43 The linux/mtd/map.h header file is included by a couple of platform specific files that are built even when CONFIG_MTD is disabled, and we always get warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" in that case. This adds an #ifdef around the pointless warning, as everything is really fine when we don't build the drivers anyway. Signed-off-by: Arnd Bergmann --- > I'm actually still getting the warnings for any file that includes > while CONFIG_MTD is disabled. I have a fix now that I'm testing overnight > and plan to post tomorrow, then we can decide whether it should be part of > the same patch, or we should have two separate patches. The patch fixes the remaining warnings I see on ARM randconfigs in this file, and I think it makes sense to keep it as a separate patch, as these are really distinct problems even thought the symptom is the same. Please apply both. diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 366cf77953b5..58f3ba709ade 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h @@ -142,7 +142,9 @@ #endif #ifndef map_bankwidth +#ifdef CONFIG_MTD #warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" +#endif static inline int map_bankwidth(void *map) { BUG(); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/