Message ID | 1462748122-30918-3-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Commit | 862887d8836643e316cd019b93b1732971c8aaf8 |
Delegated to: | Tom Warren |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3r318r1vkBz9t45 for <incoming@patchwork.ozlabs.org>; Mon, 9 May 2016 08:56:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=bycP1xj6; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1EEDDA75FB; Mon, 9 May 2016 00:56:25 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8XtZP_sTT2on; Mon, 9 May 2016 00:56:24 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5810AA75FF; Mon, 9 May 2016 00:56:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A7270A74D6 for <u-boot@lists.denx.de>; Mon, 9 May 2016 00:55:40 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iRgktdu0MV6E for <u-boot@lists.denx.de>; Mon, 9 May 2016 00:55:40 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.177]) by theia.denx.de (Postfix) with ESMTPS id 86FF6A7498 for <u-boot@lists.denx.de>; Mon, 9 May 2016 00:55:35 +0200 (CEST) Received: by mail-io0-f177.google.com with SMTP id u185so183822894iod.3 for <u-boot@lists.denx.de>; Sun, 08 May 2016 15:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=+OPJzC2ReVVtypJGC6AYJCsEc6EtZJwOyL4AGH7oi6o=; b=bycP1xj6DlEbpZ1ssoEs47pi4J8BhMLHSqFGtXKImZx6EGkS2TBagT45aGDI+Rvf9B olu09LQilTxhCYnrakYeriYQxipzL5lJDzCjAMxfCpHjsZroCY11PoYZrcrl2bkulA3K zAsxAdzhIhG3Pyji/54ytFYA5cUysUU8fsDW5vlEpu7gcQ2tj2ALD8uVjcKrcW29Gw9i dxWgCAqL75MX4e6mTr1uSyz17jixGNyk2rFQyi1ertdAdgPtFb3Ht7aalDHC8XZJ/NMV Hfnc/FkBDjy5n/Ogtv62d8XjmlY6zTtD9yE7LZN3ofE0AsMmW4ktQ+xt34kBYiILLWd+ 1Q+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=+OPJzC2ReVVtypJGC6AYJCsEc6EtZJwOyL4AGH7oi6o=; b=N9+CifbBFaJCIWYRIIW8ynDkMUv2q4qxG/2S86p2WAwfFbA/+qeTJQa5YpHzfVjBxu PQcwW0hIO5PiXKGhwhN1Px4ItB+/ulhYu+6Mo0xnKHPcJN7l/WDyOY9aL32ow0Qamajk Xa7Wfh5tv+WT5ApoRxh43w/xh4E7a+i+lK2AnSkoouEiX0je6BCdoJWA+/KMTYG97GwS vNSPY5RI0+ajjTwZRzL0Rg2vy0pZQcoMjxvGlR4sn2yTiPCIMlj2phAi4f9NqUp56fjG g2cuWJdFXdGnIRhnIWfCy9Jkl9uzE7CTqfIrkq5P1odHoUA8l2XVo+O4r2pSlziTcGY1 cgIg== X-Gm-Message-State: AOPr4FU17U9Y7tuOFbb+eKGWTU3uBTQGjMTPXBg0A7rASGjmyTTqBy8ifuskwsrB9R+1iFML X-Received: by 10.107.17.19 with SMTP id z19mr40061471ioi.43.1462748134175; Sun, 08 May 2016 15:55:34 -0700 (PDT) Received: from kaki.bld.corp.google.com ([100.100.202.57]) by smtp.gmail.com with ESMTPSA id 11sm12332778ioe.25.2016.05.08.15.55.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 May 2016 15:55:33 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id B6F9B220A70; Sun, 8 May 2016 16:55:32 -0600 (MDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Date: Sun, 8 May 2016 16:55:18 -0600 Message-Id: <1462748122-30918-3-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1462748122-30918-1-git-send-email-sjg@chromium.org> References: <1462748122-30918-1-git-send-email-sjg@chromium.org> Cc: Stephen Warren <swarren@nvidia.com>, Tom Warren <twarren@nvidia.com> Subject: [U-Boot] [PATCH v2 2/6] errno: Allow errno_str() to be used without CONFIG_ERRNO_STR X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <http://lists.denx.de/mailman/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <http://lists.denx.de/mailman/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
diff --git a/include/errno.h b/include/errno.h index 3942681..15ece2f 100644 --- a/include/errno.h +++ b/include/errno.h @@ -15,5 +15,10 @@ extern int errno; #ifdef CONFIG_ERRNO_STR const char *errno_str(int errno); +#else +static inline const char *errno_str(int errno) +{ + return 0; +} #endif #endif /* _ERRNO_H */
The pmic framework uses errno_str() and this requires board that use it to enable CONFIG_ERRNO_STR to avoid a build error. Update the header to provide a NULL error message when CONFIG_ERRNO_STR is not defined, and fix the build error. This will show as "(null)" when U-Boot prints it. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v2: - Add new patch to allow errno_str() to be used without CONFIG_ERRNO_STR include/errno.h | 5 +++++ 1 file changed, 5 insertions(+)