From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751175AbdIBEto (ORCPT ); Sat, 2 Sep 2017 00:49:44 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:33073 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750935AbdIBEtn (ORCPT ); Sat, 2 Sep 2017 00:49:43 -0400 X-Google-Smtp-Source: ADKCNb52M4gsEDIOzDEQMcod4F8ghdhW5RxOy/lp/5Ht05SM/TcAdCEbRXIlSp3Ytb9yM/0HQdWNag== To: open list , linux-gpio@vger.ekernel.org, Linus Walleij From: Florian Fainelli Subject: Warnings from include/linux/gpio/consumer.h with CONFIG_GPIOLIB=n Cc: Sergei Shtylyov , Andrew Lunn Message-ID: <82f82952-dedd-ce4f-e339-c69dac241a8a@gmail.com> Date: Fri, 1 Sep 2017 21:49:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, I think Sergei or someone else was mentioning that before a while ago, but when CONFIG_GPIOLIB=n most gpiod_* inline stubs have WARN_ON() that will scare people. What do you recommend doing for code that might be built with or without CONFIG_GPIOLIB, should we just encapsulate the part that deals with GPIOs under an #if IS_ENABLED(CONFIG_GPIOLIB) or something? The particular piece of code that I just saw this with is drivers/net/phy/mdio_bus.c. Thanks! -- Florian