From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2219C352A3 for ; Thu, 6 Feb 2020 21:47:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6BDD21927 for ; Thu, 6 Feb 2020 21:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581025652; bh=sC0Omir/ZJR/xzvpdSpxlmgXx1Tv7YvI2oHPK7CsWTg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=l+v3Hh49vgqcxl0WeBM8K0LsTQXdPDIvYsnSjBpTZKdUoJy09q23rM5XjQV2p7wmk 4YkLkShsIWfySGRXoL4RZXzsFCXcWyeylhQ1mqTcv7s9aguAQyRaS2Ahy2O+SlVvw/ AhAofI6yWhn0PxrViAfBJxg6qnHFB+10xKLorq3s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727456AbgBFVrc (ORCPT ); Thu, 6 Feb 2020 16:47:32 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40552 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbgBFVrc (ORCPT ); Thu, 6 Feb 2020 16:47:32 -0500 Received: by mail-pf1-f194.google.com with SMTP id q8so128604pfh.7; Thu, 06 Feb 2020 13:47:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0++ty3KNqexXxUIh6o0w0NG3K1wrpafmFLgGyyqsx4w=; b=lCinl6OjAC1BsGy7Qc4HJiIKPaYyHIPkIDnBupbWgqlHYfqM8piZM7qOEWnL1GQE+y eJhq0y0zSN27JZA+iUYBu5TetOMK5dWhSE1SsqQ0y2G2ajhtYDoAsYTjQwa16Jt0FSda cm0JQVpsVzKW5p5aMnBfp77xakF2Ut6Z/W+RjRFmzzT2ylLres21qcil4e7VpKdpmaRp pXwG0VPizFP5UJG/v7RTZoVbdeX4rnJZxVi/wpgiT6xHtROZks4PNPQriq9dlzOpyZCV 3YlVM0OFwe0H4FLmE33RqXUPupemCJSLk+ikzEfpnqLEf6uQ3GhYefwIWhztH1GLVz1N IJWQ== X-Gm-Message-State: APjAAAW5o3aeT+PbZDLdsyNwVXiFTg9aR7js8cO26zteaOyBVLdvKVDA Bx3tJuL/wCPcIGk5mWuNCNJlRkJwCw== X-Google-Smtp-Source: APXvYqxfJcovvxDOLT5By1ZcTbnBE5pz9dMGw5xHjf1hSoadJsP1jEbSfQ6mrwOeoburg7PHFcTRJA== X-Received: by 2002:a63:306:: with SMTP id 6mr5937668pgd.337.1581025651303; Thu, 06 Feb 2020 13:47:31 -0800 (PST) Received: from rob-hp-laptop (63-158-47-182.dia.static.qwest.net. [63.158.47.182]) by smtp.gmail.com with ESMTPSA id v8sm331103pfn.172.2020.02.06.13.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 13:47:30 -0800 (PST) Received: (nullmailer pid 3350 invoked by uid 1000); Thu, 06 Feb 2020 21:47:29 -0000 Date: Thu, 6 Feb 2020 14:47:29 -0700 From: Rob Herring To: Andy Shevchenko Cc: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Frank Rowand , devicetree@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH v2] gpio: Avoid kernel.h inclusion where it's possible Message-ID: <20200206214729.GA30344@bogus> References: <20200205134336.20197-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200205134336.20197-1-andriy.shevchenko@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Wed, Feb 05, 2020 at 03:43:36PM +0200, Andy Shevchenko wrote: > Inclusion of kernel.h increases the mess with the header dependencies. > Avoid kernel.h inclusion where it's possible. > > Besides that, clean up a bit other inclusions inside GPIO subsystem headers. > It includes: > - removal pin control bits (forward declaration and header) from linux/gpio.h > - removal of.h from asm-generic/gpio.h > - use of explicit headers in gpio/consumer.h > - add FIXME note with regard to gpio.h inclusion in of_gpio,h > > Signed-off-by: Andy Shevchenko > --- > v2: Elaborate changes in the commit message (Bartosz) > include/asm-generic/gpio.h | 4 ++-- > include/linux/gpio.h | 2 -- > include/linux/gpio/consumer.h | 5 ++++- > include/linux/of_gpio.h | 9 ++++++--- > 4 files changed, 12 insertions(+), 8 deletions(-) > > diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h > index 19eadac415c4..aea9aee1f3e9 100644 > --- a/include/asm-generic/gpio.h > +++ b/include/asm-generic/gpio.h > @@ -2,10 +2,8 @@ > #ifndef _ASM_GENERIC_GPIO_H > #define _ASM_GENERIC_GPIO_H > > -#include > #include > #include > -#include > > #ifdef CONFIG_GPIOLIB > > @@ -140,6 +138,8 @@ static inline void gpio_unexport(unsigned gpio) > > #else /* !CONFIG_GPIOLIB */ > > +#include > + I don't really think moving the includes inside #ifdef's is an improvment. But I'll leave it to Linus. Rob