Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933118AbbLGQTq (ORCPT ); Mon, 7 Dec 2015 11:19:46 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:50143 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932931AbbLGQTn (ORCPT ); Mon, 7 Dec 2015 11:19:43 -0500 From: Arnd Bergmann To: Tomi Valkeinen Cc: Jean-Christophe Plagniol-Villard , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] fbdev: auo_k190x: avoid unused function warnings Date: Mon, 07 Dec 2015 17:16:43 +0100 Message-ID: <1678174.Yl1Wo71dkn@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <5665AF5C.4060801@ti.com> References: <3917686.rD8ezhD468@wuerfel> <5665AF5C.4060801@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:lIzr95A4jxc8ZLYqT/NXkD0XW0xlfkUI/1BWIFvoJSMPc6r6WUc AkgXsnkb8U0dxphZ+X133Gzoy+1wMMIIYcnocqUCyZx03Roh7b/pOuzdA/5ohLNwWWJ/V3T xVxJ2ZYc2nei6jldaglpjW/UPVetiqcV2JhZvT4bgrCkKLTrryojPa98YBvsSshk52k0yV0 QXhhF5K6sh9U3ephy1ZCQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:3+3owlK6XP4=:zIZfVaKx+VPn0apc441QfZ EfOHkGCLcY/nnnSxnxDukO4YNYusiGWoOA/ANdh/bf8NjgfaM6Cp5LjNOy9K3zRQQ4LgfNMNY 8PY4fcB/dXUmGyMjs9E7wGM/e5U/Bwqz702z5BBOsrJnIz3qaXNZz30M8iSawcExG9guZX12I /107j9lZLd/VtA7mIkbALEr+V/5oQMLkyDgTlmzUYXGjPRmECu+zoEhygKxUvnkL3lWaJakGK /ukXyKkA6C9BXB26d9iKf9fZhBzyZSUgE61vGzicNTnXoEWF0AKp+E54Yj6yJxVONRcgAtr+b usVGS0klxwtxyEjKYqWhHqsy8W5FXww59GMYVLHL1x5Y36iKBgfI8dAFXVAUVskgIdWhGn12L oEGwYFuq2+Wl5a8wcvGpiKBNTwRZVV1iem0ROP12bqcNMdjOqaqdI1rqTySptKW0pfoTVKiUe WlpnpLK+hn+Z9ckcMLAc8T0z3lxTUYraaZnp9NS8J8kY5oI8CyZRZy7ipSyXjzbKb497TX2sP dnoEtGWvhc4lz+lMqy5TOXP747sRJBJpIWbg0ucYD5HtFwvlyPVieCAbkpkCUYrOprrTe5/3h mn+IDDS/l0Ud7BKEli4F5pXsQgN8YmhL6HaDTwD3rASiaY5kDSQjUIx2x87/QykKqdSnydOeO /shwwVnT2QmNET8XusZO1nwUbgRpoWUL7NdTxMcQDf4b8iamjZ3RGuiOZUXQRmve64qSsAnTl MpAeD3N9u1TFnBpd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1285 Lines: 30 On Monday 07 December 2015 18:10:04 Tomi Valkeinen wrote: > On 20/11/15 23:47, Arnd Bergmann wrote: > > The auo_k190x framebuffer driver encloses the power-management > > functions in #ifdef CONFIG_PM, but the auok190x_suspend/resume > > functions are only really used when CONFIG_PM_SLEEP is also > > set, as a frequent gcc warning shows: > > > > drivers/video/fbdev/auo_k190x.c:859:12: warning: 'auok190x_suspend' defined but not used > > drivers/video/fbdev/auo_k190x.c:899:12: warning: 'auok190x_resume' defined but not used > > > > This changes the driver to remove the #ifdef and instead mark > > the functions as __maybe_unused, which is a nicer anyway, as it > > provides build testing for all the code in all configurations > > and is harder to get wrong. > > Applied for 4.5. > > Btw, do you know if the linker will optimize the __maybe_unused funcs > away if they are not used? I presume so. > The compiler does it correctly when built with -O1 or higher (we don't support -O0), and the linker is not involved here. Arnd -- 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/