Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20C4EC433F5 for ; Sun, 14 Nov 2021 03:22:41 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 802E561029 for ; Sun, 14 Nov 2021 03:22:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 802E561029 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DBF88834A1; Sun, 14 Nov 2021 04:22:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="QGagMGkE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3B5B78345E; Sun, 14 Nov 2021 04:22:24 +0100 (CET) Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4509D83467 for ; Sun, 14 Nov 2021 04:22:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x232.google.com with SMTP id 7so16490918oip.12 for ; Sat, 13 Nov 2021 19:22:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WIk2IXyC7EdC1+eISLDpStnAC/NDEx00AbWtVTELbR0=; b=QGagMGkEWiQEMD5HZAyDAE7oHPUNCM5m9pkr++LFcI+Yn4wbzFB+RwbdV+aK+rDIJn /UTtuIhPSJvksH5445K9Wqs1YpkLtSFYwL4Ux3DQtq4kz28MhaoKy+kpNafOwStiDDox Clh3fEVCyydJ+rsc8oS2qLGcbIkQa5zFyljo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WIk2IXyC7EdC1+eISLDpStnAC/NDEx00AbWtVTELbR0=; b=swsJLM+REvoCZvloOZX580wSIYVcMArA2hM6+XFOi/ZVQeSewBVj9P39HR1YWzJVO5 HxM+Ljg3r3avwOUVLabbGuzqHVT4yrLxRx4fQ0E3CGmc+5HDUjfBvYLnfKiWG8ZwIR8e ao30CqAenb+pnj85Rt4+IQv3upIvDGFi86E6NXEwlca4bkJVEEDUuUYLJLGu3q9nn/jC akLBJ84L0RdWX2xKhSr2HV32vJCTOdlGPcWTYL1sEryM7wouZMTZ1lQAP1J7RdjAb3HN XODALs/HMhpdLiZqpApCXXeSXmgOznalBVvApFlZDKCLA6GoGhrTfPuKHRSYc1QQ8+Om gC0Q== X-Gm-Message-State: AOAM530KBrctq1PzlGXo/8XHl4LUnS0+Ggtv1Pl6+/iMI48QD6UTcqed u4y5EvDFVNE+gJht2pKsbAfrGHSOgNGWBg== X-Google-Smtp-Source: ABdhPJwsZLAO3Vmtl0Uc2aAVYJTKjhkH/MrEbM2GRdlpHCs4mnH/k8SwUeATzdtdF8kh8NMC3dS62Q== X-Received: by 2002:a05:6808:2014:: with SMTP id q20mr19978002oiw.9.1636860134717; Sat, 13 Nov 2021 19:22:14 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id o2sm2147004otl.34.2021.11.13.19.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Nov 2021 19:22:14 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Heinrich Schuchardt , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Mario Six , Patrick Delaunay , Priyanka Jain , Stefan Roese Subject: [PATCH 02/10] sandbox: Drop CONFIG_HOST_MAX_DEVICES Date: Sat, 13 Nov 2021 20:21:53 -0700 Message-Id: <20211114032201.493122-3-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc1.387.gb447b232ab-goog In-Reply-To: <20211114032201.493122-1-sjg@chromium.org> References: <20211114032201.493122-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This can go in the related header file. Drop the CONFIG option. Signed-off-by: Simon Glass --- cmd/host.c | 2 +- drivers/block/sandbox.c | 6 +++--- include/configs/sandbox.h | 2 -- include/sandboxblockdev.h | 3 +++ scripts/config_whitelist.txt | 1 - 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/host.c b/cmd/host.c index 2e998abbcdc..f0d989ac0f9 100644 --- a/cmd/host.c +++ b/cmd/host.c @@ -78,7 +78,7 @@ static int do_host_info(struct cmd_tbl *cmdtp, int flag, int argc, if (argc < 1 || argc > 2) return CMD_RET_USAGE; int min_dev = 0; - int max_dev = CONFIG_HOST_MAX_DEVICES - 1; + int max_dev = SANDBOX_HOST_MAX_DEVICES - 1; if (argc >= 2) { char *ep; char *dev_str = argv[1]; diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c index 1c2c3b4f886..53925ce9b69 100644 --- a/drivers/block/sandbox.c +++ b/drivers/block/sandbox.c @@ -19,11 +19,11 @@ DECLARE_GLOBAL_DATA_PTR; #ifndef CONFIG_BLK -static struct host_block_dev host_devices[CONFIG_HOST_MAX_DEVICES]; +static struct host_block_dev host_devices[SANDBOX_HOST_MAX_DEVICES]; static struct host_block_dev *find_host_device(int dev) { - if (dev >= 0 && dev < CONFIG_HOST_MAX_DEVICES) + if (dev >= 0 && dev < SANDBOX_HOST_MAX_DEVICES) return &host_devices[dev]; return NULL; @@ -259,7 +259,7 @@ U_BOOT_DRIVER(sandbox_host_blk) = { U_BOOT_LEGACY_BLK(sandbox_host) = { .if_typename = "host", .if_type = IF_TYPE_HOST, - .max_devs = CONFIG_HOST_MAX_DEVICES, + .max_devs = SANDBOX_HOST_MAX_DEVICES, .get_dev = host_get_dev_err, }; #endif diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index d614b704715..ea6080869a8 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -14,8 +14,6 @@ #define CONFIG_SYS_TIMER_RATE 1000000 #endif -#define CONFIG_HOST_MAX_DEVICES 4 - #define CONFIG_MALLOC_F_ADDR 0x0010000 #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ diff --git a/include/sandboxblockdev.h b/include/sandboxblockdev.h index 4006e942a02..4ca9554e38a 100644 --- a/include/sandboxblockdev.h +++ b/include/sandboxblockdev.h @@ -6,6 +6,9 @@ #ifndef __SANDBOX_BLOCK_DEV__ #define __SANDBOX_BLOCK_DEV__ +/* Maximum number of host devices - see drivers/block/sandbox.c */ +#define SANDBOX_HOST_MAX_DEVICES 4 + struct host_block_dev { #ifndef CONFIG_BLK struct blk_desc blk_dev; diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index b9c1c61e13d..10f7a6d4c08 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -440,7 +440,6 @@ CONFIG_HIDE_LOGO_VERSION CONFIG_HIKEY_GPIO CONFIG_HITACHI_SX14 CONFIG_HOSTNAME -CONFIG_HOST_MAX_DEVICES CONFIG_HPS_ALTERAGRP_DBGATCLK CONFIG_HPS_ALTERAGRP_MAINCLK CONFIG_HPS_ALTERAGRP_MPUCLK -- 2.34.0.rc1.387.gb447b232ab-goog