From patchwork Fri Jun 11 17:13:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316291 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=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 72E25C48BD1 for ; Fri, 11 Jun 2021 17:12:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 559A8613E9 for ; Fri, 11 Jun 2021 17:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231431AbhFKRON (ORCPT ); Fri, 11 Jun 2021 13:14:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:60554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhFKRON (ORCPT ); Fri, 11 Jun 2021 13:14:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C878E6124C; Fri, 11 Jun 2021 17:12:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431535; bh=9NSaJ82TbEOvGft3/X4heYLYiZbUwXl75lhxIszw4Vw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dgphvJyuGXnskXmwJJen+2+U6PYd2fKh2FhWl7h1qp95+Wsq3lYxcRpDIeQyMgvCv 9/l3JaQyYIRgLcXnEXICELR3lGRZitRsDxZAKVVHG08dQFGNdR9qj6olg1UCign5I/ H8skjPK/fFciHtwaWSCEH3s/fe3csxGZtnM3ZTW5rn/a+Wi8k4CmWV5PP4duKZwTQO uk0GSE4Tk0CQPwZsTrhP+/3+yoqD2kkZaZGYv65HHnt6rQFuy4wPPXf8v4mzhC2C0c h6Ccc2cVeKTNHsoBb6PbA0RtwFKntSLlhU6gJPbGPzrQ0Kt8yzwgNJNppG82l5cLz/ LzPFDGgYsoVxg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Dan Robertson , Hans de Goede , Mike Looijmans , Linus Walleij , Andy Shevchenko Subject: [PATCH 03/12] iio:accel:bosch drivers: Cleanup includes Date: Fri, 11 Jun 2021 18:13:45 +0100 Message-Id: <20210611171355.202903-4-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of the include-what-you-use tool. Remove unused headers and add some that are directly used in the files. There are no hard rules on when to use direct includes and when to rely on a chain of headers. Here I'm trying to make those decisions approximately the same across IIO. Signed-off-by: Jonathan Cameron Cc: Dan Robertson Cc: Hans de Goede Cc: Mike Looijmans Cc: Linus Walleij Cc: Andy Shevchenko --- drivers/iio/accel/bma180.c | 4 ++-- drivers/iio/accel/bma220_spi.c | 2 +- drivers/iio/accel/bma400_core.c | 1 - drivers/iio/accel/bma400_spi.c | 1 - drivers/iio/accel/bmc150-accel-core.c | 1 + drivers/iio/accel/bmc150-accel-spi.c | 1 - drivers/iio/accel/bmi088-accel-core.c | 3 --- drivers/iio/accel/bmi088-accel-spi.c | 3 ++- 8 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 0e0d9317c084..2042cf86b199 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -14,14 +14,14 @@ */ #include +#include #include #include #include #include +#include #include #include -#include -#include #include #include #include diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c index 0622c7936499..c447463d0844 100644 --- a/drivers/iio/accel/bma220_spi.c +++ b/drivers/iio/accel/bma220_spi.c @@ -9,11 +9,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/drivers/iio/accel/bma400_core.c b/drivers/iio/accel/bma400_core.c index 21520e022a21..8595dd666c44 100644 --- a/drivers/iio/accel/bma400_core.c +++ b/drivers/iio/accel/bma400_core.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/iio/accel/bma400_spi.c b/drivers/iio/accel/bma400_spi.c index 7c2825904e08..0ae3d1a203b4 100644 --- a/drivers/iio/accel/bma400_spi.c +++ b/drivers/iio/accel/bma400_spi.c @@ -6,7 +6,6 @@ * */ #include -#include #include #include #include diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c index 46ab7675186c..06e396b66e02 100644 --- a/drivers/iio/accel/bmc150-accel-core.c +++ b/drivers/iio/accel/bmc150-accel-core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/iio/accel/bmc150-accel-spi.c b/drivers/iio/accel/bmc150-accel-spi.c index 74a8aee4f612..0786c9a0dcbb 100644 --- a/drivers/iio/accel/bmc150-accel-spi.c +++ b/drivers/iio/accel/bmc150-accel-spi.c @@ -4,7 +4,6 @@ * Copyright © 2015 Pengutronix, Markus Pargmann */ -#include #include #include #include diff --git a/drivers/iio/accel/bmi088-accel-core.c b/drivers/iio/accel/bmi088-accel-core.c index a06dae5c971d..d50db25cce64 100644 --- a/drivers/iio/accel/bmi088-accel-core.c +++ b/drivers/iio/accel/bmi088-accel-core.c @@ -8,13 +8,10 @@ #include #include -#include -#include #include #include #include #include -#include #include #include "bmi088-accel.h" diff --git a/drivers/iio/accel/bmi088-accel-spi.c b/drivers/iio/accel/bmi088-accel-spi.c index dd1e3f6cf211..ae999c08e038 100644 --- a/drivers/iio/accel/bmi088-accel-spi.c +++ b/drivers/iio/accel/bmi088-accel-spi.c @@ -6,9 +6,10 @@ * Copyright (c) 2018-2020, Topic Embedded Products */ +#include #include +#include #include -#include #include #include "bmi088-accel.h"