From patchwork Wed Sep 12 06:55:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 146507 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4469768ljw; Tue, 11 Sep 2018 23:55:25 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda3Vik5bh80PPC1754Uho3P16eWAOL/0fdiwiuMfjX6581CxLNHe5C+uWH6X+EJE1JZmsQ6 X-Received: by 2002:a50:9a64:: with SMTP id o91-v6mr1068951edb.123.1536735325096; Tue, 11 Sep 2018 23:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536735325; cv=none; d=google.com; s=arc-20160816; b=F7h+pYOByopoxDqQHU/lGHDvuNNkVgoVewAaFxWZdvJEDNtTrLr04Vp9hfCSQZLA0U JyoT3FK8hpvX2xW86g94imtHH4PgOjizEfrUxyFtIw2BopKd4ihi5N9B1ol+1CxcXvfL nYmmxm/vIi8+aL3zkJBLRE0Es9huflAFihX81rf7ooZraexZV/3gzcYU8WgXQljhabfi WMIuYuk75l2XkKdt3neH3uPdcFRpZq0m1osX4dUHm0Ikf7xTjOMK4Tj6soNMZjFeT+jR bzbrqS5xAfNfUKlmAFUgp5V+YH1FCKN/21+qtdWVH3CEz+VsxhK2viXhc0ZgLG2AusYL wO7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature; bh=83Q/ND+SWSmG8iVcOQbCjQkxJ/ghO+Ej/kYsTlUvhUE=; b=PhdJi39C1zqtvnUKp8KrLJDweI09NN6gynuUoNG9BM/idbQpwzCt08vZpD9Oq02rwp 3Y3cjhAWI8YiX1yrDS0NMDiwSCCcnFDMhMCjDw2Ae1L0Gbx9gGa4z1AzfZQob8Woo1Fd VDv4lea2gMuW6/77xST9NwMlnE1ZUEP+NjRF8+PB//H4mV3pTKsM5G1u4S8deZZG8oRn VKzbD0MhRaEXYKh96c6TsHM6j2AXIj5Xq66L847ugYyDgpP5cUJC/oJ6c5ZIGTu4nokn 6KfwXZX1LMaV1RPlUtLZuvW7oTsSZ4p3T6GPUtzog1GXSwNMaTUZQujQgJqpxWTnrjBb upFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="BSA0B/KC"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id m1-v6si483293eds.184.2018.09.11.23.55.24; Tue, 11 Sep 2018 23:55:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="BSA0B/KC"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 1A7E8C21FC6; Wed, 12 Sep 2018 06:55:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1B239C21EF0; Wed, 12 Sep 2018 06:55:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4E2B9C21EF0; Wed, 12 Sep 2018 06:55:15 +0000 (UTC) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by lists.denx.de (Postfix) with ESMTPS id 9EB7FC21ED5 for ; Wed, 12 Sep 2018 06:55:14 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id j8-v6so492844pll.12 for ; Tue, 11 Sep 2018 23:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j68+4aXzlEaRuEp6eo6xngCOWSYpu0GtQzmVEwggTnk=; b=BSA0B/KCU66aQL7NJS8QARewExo077EwwZIrLp1/pjedvgpQ0nPkLdS+7aFUQixf53 AP2VVTuLV9bYdVhIpHykqJM1u1fnWq+7Tu1xfh/NZsZ9hzyZxu5oJ8h2Gusmge7oGgBT iX/iEChJ73PoQnTwCKdGU07ejoXerQc74mPzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j68+4aXzlEaRuEp6eo6xngCOWSYpu0GtQzmVEwggTnk=; b=P+VbULbSC68Y2QIsu/RRpduP0eoffgwVE3ngzldbcVAYxAOz/snCIOubh04KeG4729 K6TOZbYhV578OTEjXnOSiY1Y3+Un44mAcP5cSvO0Q8IYNLAuVTFgltVYUdB7IL3cBZTk NTEBTi1EMKkME4NC4t5UwLEcG+QHBhre4MpH7OtOexWzoihJ29JKSNTve/k17I4IGhfI 8Oz5Pdly2jdhk5Vw1EDJSVpZ7YUAjjPhIR5nsRWW5P9GfC4YgwZtWdDC29vvf+eSNT7D 4Rz0OAJkYzwM2u02DYhN2LQ6sg0TTR/NyfrN5AAQAJEo2KaoHZ4dRrZAqSoNHX7WBXCZ AZIg== X-Gm-Message-State: APzg51CRXEQmdnwzyaslioVYlNzuhaFDXACNgxU8sk8f1M+WWmTzuEdb 5dLnfmVkz227DOmlOKcnKCGIOQ== X-Received: by 2002:a17:902:8481:: with SMTP id c1-v6mr492664plo.177.1536735313002; Tue, 11 Sep 2018 23:55:13 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id i185-v6sm317205pfg.89.2018.09.11.23.55.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Sep 2018 23:55:12 -0700 (PDT) From: "Akashi, Takahiro" To: trini@konsulko.com Date: Wed, 12 Sep 2018 15:55:41 +0900 Message-Id: <20180912065541.6251-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180911065922.19141-2-takahiro.akashi@linaro.org> References: <20180911065922.19141-2-takahiro.akashi@linaro.org> Cc: u-boot@lists.denx.de, xypron.glpk@gmx.de, agraf@suse.de Subject: [U-Boot] [PATCH v3.1 01/26] fs: fat: guard the content of include/fat.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: AKASHI Takahiro The whole content of include/fat.h should be guarded with CONFIG_FS_FAT. This is necessary specifically because fs/fs.c unconditionally includes fat.h, which refers to a config symbol, CONFIG_FS_FAT_MAX_CLUSTSIZE. So if CONFIG_FS_FAT, and thus CONFIG_FS_FAT_MAX_CLUSTSIZE, is not defined, fs/fs.c will fail to compile. Signed-off-by: AKASHI Takahiro --- include/fat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/fat.h b/include/fat.h index 09e142368585..8bc280e872ba 100644 --- a/include/fat.h +++ b/include/fat.h @@ -9,6 +9,9 @@ #ifndef _FAT_H_ #define _FAT_H_ +#include +#ifdef CONFIG_FS_FAT + #include #include @@ -202,4 +205,5 @@ int fat_opendir(const char *filename, struct fs_dir_stream **dirsp); int fat_readdir(struct fs_dir_stream *dirs, struct fs_dirent **dentp); void fat_closedir(struct fs_dir_stream *dirs); void fat_close(void); +#endif /* CONFIG_FS_FAT */ #endif /* _FAT_H_ */