From patchwork Tue Nov 10 20:26:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1397796 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=jSc1TiqO; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CVzt40jkDz9sRR for ; Wed, 11 Nov 2020 07:26:52 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 490F4824FD; Tue, 10 Nov 2020 21:26:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk 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=prevas.dk header.i=@prevas.dk header.b="jSc1TiqO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 372068250F; Tue, 10 Nov 2020 21:26:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0726.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe02::726]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3E40B822D2 for ; Tue, 10 Nov 2020 21:26:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQbVdfK1DwFCO8Zfs5v+ToJx9v2QRD9dpCWggUdXtHLNHwCrVn+oQgC7CG7DB/2vz9eI4BhSpyRaHSSTGwz5z8vRfH4NLeicjGLRkYoB5Eg0TsSjcrxo4Hv0lU0Q2MTzF33Dka26yuaOzhagbh70XnhevW2L3t4Oaf5ZSAdgK17PSNPL6L9naRh4dlL5u96JorhimJz3OwB930SuG7AF3N/aN/HedcRPIAbX8VNhB++napk8jXT8ACR53NEQJAbLxFpdN0/DMwTD49xjeyCES+O4arnLGaoME3JlVyU4SkQj/rGk2jt0bI/g4ryHgjtiJe9q8nRCmTKCwLb88XwAOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hE/WiFwjl3ibBWD1Cc+VoR0TaxUYir6wurlm/3747ts=; b=KTap5NulPFfjgzQBQ9aIgILzMeMrwFlO04BycnQKxGNA/EZ9dqqtmBPoPvWZDs/L15RzhqGItyKGa7h7tv/igHUbHqh7z7YwK+YDR08g/vhGqkqeknHx2tpqqFPFxXOqAz/C6IPMLOEiqXdwVnkSS15IYij7VUMwk61214zyxfAwH9EFi97iM3yaYpwRiJGYtPp1xBQXJBscqqYj/qngYEBsPS1EpeagrcXoqULI76QMvhLIP/1jTWOzB5XrxfalLeC3YbmZbu4t71mhZ/KxjR/fqRJvCmD65VAZ6vWV7D7vNHA52GR1SF7fWnd6Vy/k/CSAJ+mA2ocBKdESSmmssA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hE/WiFwjl3ibBWD1Cc+VoR0TaxUYir6wurlm/3747ts=; b=jSc1TiqOZEKnA+3blOD4nazA782+iIG8Wrcp9NAf2Ja4iqdrKmjIHa4Q7Fon62uK+jPJPyvNaxb7clKtfqPLEYGnZHWajTbZgYP4d9rL1MBT+tT9lR/EAzKXfaJYrAUXzAGDLbsgq6IYEmgIthRU/l9bIf+MBZ2DOTSHGs3Upjg= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=prevas.dk; Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) by AM0PR10MB3299.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:188::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.30; Tue, 10 Nov 2020 20:26:13 +0000 Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::9dc3:9785:dc4e:ad62]) by AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::9dc3:9785:dc4e:ad62%6]) with mapi id 15.20.3499.032; Tue, 10 Nov 2020 20:26:13 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Simon Glass , Joe Hershberger , Wolfgang Denk , Patrick Delaunay , Tom Rini , Rasmus Villemoes Subject: [PATCH 3/5] env: make env_set_default_vars() return void Date: Tue, 10 Nov 2020 21:26:01 +0100 Message-Id: <20201110202603.20944-4-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201110202603.20944-1-rasmus.villemoes@prevas.dk> References: <20201110202603.20944-1-rasmus.villemoes@prevas.dk> X-Originating-IP: [5.186.115.188] X-ClientProxiedBy: AM6PR0202CA0067.eurprd02.prod.outlook.com (2603:10a6:20b:3a::44) To AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prevas-ravi.prevas.se (5.186.115.188) by AM6PR0202CA0067.eurprd02.prod.outlook.com (2603:10a6:20b:3a::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21 via Frontend Transport; Tue, 10 Nov 2020 20:26:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 94c9d648-4d29-46c4-ea76-08d885b6de1d X-MS-TrafficTypeDiagnostic: AM0PR10MB3299: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Dy64ts9UKWT1iWg6VgQ61vxIq2P+xe4XK4A2uKCSfkEWVQHmc72/riYRXdT99WM7MSmm6aEp/US7D3jckBnFp+oFrJB1oSR/26bTib6lXcAs8QcGIxh3qTWVduguy1kMO0HMA8maBHYl+Djm9Nb1z7aEojJN7z2ejsau8vIBBzSeLukmRhizuPhvE+b5BDb0+0vNyu2Ki1x/kwU45mREhGkCYH0inHw/Ay6CrLkjaf+Gipn/pq2/Q/8dohs5q2MELaKmb7w9Evv7mKcoCoHfV0oUNKidwUkk2uWwbkPfjnlGTzH5JMNFbCOhhzY5di+A X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(396003)(39830400003)(136003)(376002)(366004)(346002)(6486002)(5660300002)(52116002)(2906002)(316002)(107886003)(8936002)(6506007)(8676002)(66556008)(66476007)(66946007)(83380400001)(956004)(86362001)(8976002)(6916009)(44832011)(478600001)(16526019)(6512007)(186003)(54906003)(4326008)(1076003)(6666004)(36756003)(2616005)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: glgTFQhh4tmKH6gcaiXcTd4JQJtLS2+QygCdZxKQjZhVVsZzKTf3UUTbGkfCzpz513InBaGhYjYigXKT3qqHmUti0xIlsMr3ymoXdyP1gD3F9gElMWb33kyyuUe/JUGVxKBDwEiJst4DhXT/MnDGn++Zyu6GmYS4+bXVC5ttsSS1SIy37ejuv3XR+qHEGkZ5BhcO+ln9+4XHA9/NBsY+ObqmbVeOotI4DpLMpFFUo3lYL3MekQ4lvK3VPGhOiGfiAY/snLcOXOU3mb5rC3K6+TROomU260aECFZ/ujuoX2RXFCITFZhbGqzE+Cz3ZlzBg0P/+4dlsB0o93oz+u1itgAKXX1OGB3l1nKmeh4sNv2x+kiQ1SqnOBSHSblxe4rLwCFnoNxtAuYzXiQ4B/IpHWE2Td91fahMYmJd8YRqaQJWjxB7RCc82oWKr5XX+KdDMCUGe0sxgl3MXyZvrPQ10m95wUe7ruDoSinVoZCsNYnDGtOrJnVoLnibeTe/3VZLhD0icSSfNLGrEQxZADQCdPN3zSelUBHVVWAe9WKlgAPWPCWscxunOe0sdjYo1gWMDlWMWJEQaYJxlw4Kq/ibG8p3G5zuuI+BjEVxz5xde4Eay4gxfKPl/imFmyRkChM6c18E7jD4viq+GqkadHb7Nw== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 94c9d648-4d29-46c4-ea76-08d885b6de1d X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2020 20:26:13.1329 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: k6trBCsGL/4JaGmOwUlhHrjjR7LbN1zjUrGO7q1EkiKXmThZOIPvwLo9qDIDSr0hCpXuzHEK+5t/JxUPx79NC6a4yay3xgKVQPWuI1SnOxQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR10MB3299 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Unlike most other functions declared in env.h, the return value of this one also isn't documented. It only has a single caller, which ignores the return value. And the companion, env_set_default(), already has void as return type. Signed-off-by: Rasmus Villemoes --- env/common.c | 4 ++-- include/env.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/env/common.c b/env/common.c index 6c32a9b479..7363da849b 100644 --- a/env/common.c +++ b/env/common.c @@ -94,14 +94,14 @@ void env_set_default(const char *s, int flags) /* [re]set individual variables to their value in the default environment */ -int env_set_default_vars(int nvars, char * const vars[], int flags) +void env_set_default_vars(int nvars, char * const vars[], int flags) { /* * Special use-case: import from default environment * (and use \0 as a separator) */ flags |= H_NOCLEAR | H_DEFAULT; - return himport_r(&env_htab, (const char *)default_environment, + himport_r(&env_htab, (const char *)default_environment, sizeof(default_environment), '\0', flags, 0, nvars, vars); } diff --git a/include/env.h b/include/env.h index c15339a93f..5bff6c4d72 100644 --- a/include/env.h +++ b/include/env.h @@ -256,7 +256,7 @@ void env_fix_drivers(void); * @vars: List of variables to set/reset * @flags: Flags controlling matching (H_... - see search.h) */ -int env_set_default_vars(int nvars, char *const vars[], int flags); +void env_set_default_vars(int nvars, char *const vars[], int flags); /** * env_load() - Load the environment from storage