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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 09B0CC352A1 for ; Wed, 7 Dec 2022 09:04:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2D40A856FA; Wed, 7 Dec 2022 09:56:40 +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="nG9sq1hn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 11640856C2; Wed, 7 Dec 2022 09:56:38 +0100 (CET) Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (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 B81AA856C2 for ; Wed, 7 Dec 2022 09:56:32 +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-pl1-x62b.google.com with SMTP id y4so16435164plb.2 for ; Wed, 07 Dec 2022 00:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ocsfgGmZOF2LTFfUqQFpQ6HQUgxHkAw7b8W7V1PuPtc=; b=nG9sq1hnsWgXD9zPHfEcWp2GffqMq9/nj1SG5sK9ZNG/vprZN53Swq5ulCUI+ivwy7 jMLj5hBO8DLYapiPxL5G6wJ4Cb8I0FeHYANYPmv4l44VrUGxYl2z8zAmhaUCb53ZEyZA h9HsgA39U/KEcTWANV9+vNw9v+nOTsTwWel3s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ocsfgGmZOF2LTFfUqQFpQ6HQUgxHkAw7b8W7V1PuPtc=; b=A9kfm0qsya90yTzsO7FFXd3tv5ke4AG4jny5bWdLmcDey9usbJji3eOKellsERk/1n em9lbfFamvZGepjEnICuWA6Zxl7uVznCGehh5KXuyGUr0Y1hgK6GGlEpegDCrowKUCBA asUWOEaSNyl0tmDohr7zPtM5tgSeEe2+pJrZbUL2ykUnrasHqi5oegY2gajq0ER3ZzM3 pbslxp8hNg4/YB9Fd5Bc81KpWx7Rg3yGwb0NQpGDIPm2JcHESzQpCqGHupk5TwbpetCE dDzghlPIPjQFtTb9nBp6nZzl+famlEe1SglJbXSPgaBsMz3ue10WW5jaicu3DQSVpUBN kr5Q== X-Gm-Message-State: ANoB5pmQ9MFwqd4eEuHdRlDe6a0B/FfslPkPnvhD1+z7OswIYzwxrHMz puHvSNst6GhvBMu+JRc72Ut4xiz9ty6J0GWH X-Google-Smtp-Source: AA0mqf6ZAvnhBjqA9onpz1300+avY21BFc7VAiIds1ePGzz43MOuTG2hQMe1RPOWgj5mKqmwXC1ZJg== X-Received: by 2002:a17:902:e983:b0:189:651c:efb4 with SMTP id f3-20020a170902e98300b00189651cefb4mr59449797plb.89.1670403392040; Wed, 07 Dec 2022 00:56:32 -0800 (PST) Received: from localhost.localdomain ([27.110.126.54]) by smtp.gmail.com with ESMTPSA id l16-20020a170903121000b0018157b415dbsm14145514plh.63.2022.12.07.00.56.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 00:56:31 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: U-Boot Custodians , Simon Glass , Joe Hershberger , Ramon Fried Subject: [PATCH 45/71] bootstd: Rename bootdev checkers Date: Wed, 7 Dec 2022 21:51:11 +1300 Message-Id: <20221207085137.445249-46-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.rc0.267.gcb52ba06e7-goog In-Reply-To: <20221207085137.445249-1-sjg@chromium.org> References: <20221207085137.445249-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean These functions return 0 if the check passes, so the names are somewhat confusing. Rename them. Signed-off-by: Simon Glass --- boot/bootflow.c | 6 +++--- boot/bootmeth_distro.c | 2 +- boot/bootmeth_efi.c | 2 +- boot/bootmeth_efi_mgr.c | 2 +- boot/bootmeth_pxe.c | 2 +- boot/bootmeth_script.c | 2 +- include/bootflow.h | 12 ++++++------ net/eth_bootdev.c | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/boot/bootflow.c b/boot/bootflow.c index f9ad4099244..8c01a4efdc9 100644 --- a/boot/bootflow.c +++ b/boot/bootflow.c @@ -426,7 +426,7 @@ int bootflow_run_boot(struct bootflow_iter *iter, struct bootflow *bflow) return ret; } -int bootflow_iter_uses_blk_dev(const struct bootflow_iter *iter) +int bootflow_iter_check_blk(const struct bootflow_iter *iter) { const struct udevice *media = dev_get_parent(iter->dev); enum uclass_id id = device_get_uclass_id(media); @@ -438,7 +438,7 @@ int bootflow_iter_uses_blk_dev(const struct bootflow_iter *iter) return -ENOTSUPP; } -int bootflow_iter_uses_network(const struct bootflow_iter *iter) +int bootflow_iter_check_net(const struct bootflow_iter *iter) { const struct udevice *media = dev_get_parent(iter->dev); enum uclass_id id = device_get_uclass_id(media); @@ -450,7 +450,7 @@ int bootflow_iter_uses_network(const struct bootflow_iter *iter) return -ENOTSUPP; } -int bootflow_iter_uses_system(const struct bootflow_iter *iter) +int bootflow_iter_check_system(const struct bootflow_iter *iter) { const struct udevice *media = dev_get_parent(iter->dev); enum uclass_id id = device_get_uclass_id(media); diff --git a/boot/bootmeth_distro.c b/boot/bootmeth_distro.c index 5c6c687f0a6..4f8f9cfe5e9 100644 --- a/boot/bootmeth_distro.c +++ b/boot/bootmeth_distro.c @@ -59,7 +59,7 @@ static int distro_check(struct udevice *dev, struct bootflow_iter *iter) int ret; /* This only works on block devices */ - ret = bootflow_iter_uses_blk_dev(iter); + ret = bootflow_iter_check_blk(iter); if (ret) return log_msg_ret("blk", ret); diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index d5438eb67b9..f7bb153d9de 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -104,7 +104,7 @@ static int distro_efi_check(struct udevice *dev, struct bootflow_iter *iter) int ret; /* This only works on block devices */ - ret = bootflow_iter_uses_blk_dev(iter); + ret = bootflow_iter_check_blk(iter); if (ret) return log_msg_ret("blk", ret); diff --git a/boot/bootmeth_efi_mgr.c b/boot/bootmeth_efi_mgr.c index 2f327c1f8ce..e9d973429f7 100644 --- a/boot/bootmeth_efi_mgr.c +++ b/boot/bootmeth_efi_mgr.c @@ -36,7 +36,7 @@ static int efi_mgr_check(struct udevice *dev, struct bootflow_iter *iter) int ret; /* Must be an bootstd device */ - ret = bootflow_iter_uses_system(iter); + ret = bootflow_iter_check_system(iter); if (ret) return log_msg_ret("net", ret); diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c index e6992168c06..13e2ff486dc 100644 --- a/boot/bootmeth_pxe.c +++ b/boot/bootmeth_pxe.c @@ -44,7 +44,7 @@ static int distro_pxe_check(struct udevice *dev, struct bootflow_iter *iter) int ret; /* This only works on network devices */ - ret = bootflow_iter_uses_network(iter); + ret = bootflow_iter_check_net(iter); if (ret) return log_msg_ret("net", ret); diff --git a/boot/bootmeth_script.c b/boot/bootmeth_script.c index d1c3f940037..e438580d9e1 100644 --- a/boot/bootmeth_script.c +++ b/boot/bootmeth_script.c @@ -28,7 +28,7 @@ static int script_check(struct udevice *dev, struct bootflow_iter *iter) int ret; /* This only works on block devices */ - ret = bootflow_iter_uses_blk_dev(iter); + ret = bootflow_iter_check_blk(iter); if (ret) return log_msg_ret("blk", ret); diff --git a/include/bootflow.h b/include/bootflow.h index 7d50ca2a45d..905410974c8 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -303,32 +303,32 @@ const char *bootflow_state_get_name(enum bootflow_state_t state); void bootflow_remove(struct bootflow *bflow); /** - * bootflow_iter_uses_blk_dev() - Check that a bootflow uses a block device + * bootflow_iter_check_blk() - Check that a bootflow uses a block device * * This checks the bootdev in the bootflow to make sure it uses a block device * * Return: 0 if OK, -ENOTSUPP if some other device is used (e.g. ethernet) */ -int bootflow_iter_uses_blk_dev(const struct bootflow_iter *iter); +int bootflow_iter_check_blk(const struct bootflow_iter *iter); /** - * bootflow_iter_uses_network() - Check that a bootflow uses a network device + * bootflow_iter_check_net() - Check that a bootflow uses a network device * * This checks the bootdev in the bootflow to make sure it uses a network * device * * Return: 0 if OK, -ENOTSUPP if some other device is used (e.g. MMC) */ -int bootflow_iter_uses_network(const struct bootflow_iter *iter); +int bootflow_iter_check_net(const struct bootflow_iter *iter); /** - * bootflow_iter_uses_system() - Check that a bootflow uses the bootstd device + * bootflow_iter_check_system() - Check that a bootflow uses the bootstd device * * This checks the bootdev in the bootflow to make sure it uses the bootstd * device * * Return: 0 if OK, -ENOTSUPP if some other device is used (e.g. MMC) */ -int bootflow_iter_uses_system(const struct bootflow_iter *iter); +int bootflow_iter_check_system(const struct bootflow_iter *iter); #endif diff --git a/net/eth_bootdev.c b/net/eth_bootdev.c index fdf48f00131..bcbb35a74cd 100644 --- a/net/eth_bootdev.c +++ b/net/eth_bootdev.c @@ -27,7 +27,7 @@ static int eth_get_bootflow(struct udevice *dev, struct bootflow_iter *iter, int ret; /* Must be an Ethernet device */ - ret = bootflow_iter_uses_network(iter); + ret = bootflow_iter_check_net(iter); if (ret) return log_msg_ret("net", ret); -- 2.39.0.rc0.267.gcb52ba06e7-goog