From patchwork Thu May 3 13:12:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 908036 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=konsulko.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40cFtd08Fxz9s35 for ; Thu, 3 May 2018 23:12:40 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 940ABC21ECF; Thu, 3 May 2018 13:12:36 +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_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 AB2E8C21D8E; Thu, 3 May 2018 13:12:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E9E6EC21C57; Thu, 3 May 2018 13:12:32 +0000 (UTC) Received: from mail-yb0-f195.google.com (mail-yb0-f195.google.com [209.85.213.195]) by lists.denx.de (Postfix) with ESMTPS id BDD1CC21D8A for ; Thu, 3 May 2018 13:12:31 +0000 (UTC) Received: by mail-yb0-f195.google.com with SMTP id w14-v6so6470031ybm.5 for ; Thu, 03 May 2018 06:12:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=NNYyfkO267xpsuy8+QHLyP/mDn9TwfvvgyFGcuHimUk=; b=IRtCt7S2sEe6ksFmbqgdG8Kz0kymltHbOipR3mxyfOjSi6rgtdvMDr9u6MOOwivgM5 GQLn9DUEP6/PowULom+blemKfunAAH1yyb1BYQ8Cs1yIKoS3PMnoH27kRG9Oz9QA4xta 7b6YEfBvhtMhMd1o2u1qcGJhbIqTB8fW1FFpLeNQjSzmQ1gsEO/456qdeEIhhJ1RQSRx NeNhDwNXU7y2eJ29l/DDldarCa//vLOlEneOIymoVhTI3nrFPiV+L78Lov3ukVv9+mcZ t6ef5tR+X/85DQoiVT0vgRQA1e67+ycsXU610aEb6CRJW/HDj6HYpWianrY8SAVA5oVB 4A6g== X-Gm-Message-State: ALQs6tDFA1/oyk2YUQ6PJ9mRPHT6pwW4GKH0w2s3bI627Mx0Mgz9iJLS YJzi53AgfPVXNqO/mqq4FhsS X-Google-Smtp-Source: AB8JxZojC4pnpZKxh+gupPtXrrBKLnlxYf6AVfPdBwku+zGFoIFmG+92BkUD3VtGSUCpn5Un/9JKOA== X-Received: by 2002:a25:ab8a:: with SMTP id v10-v6mr14895054ybi.388.1525353149834; Thu, 03 May 2018 06:12:29 -0700 (PDT) Received: from bill-the-cat.ec.rr.com (cpe-65-184-142-68.ec.res.rr.com. [65.184.142.68]) by smtp.gmail.com with ESMTPSA id k203-v6sm3815073ywb.34.2018.05.03.06.12.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 May 2018 06:12:29 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Thu, 3 May 2018 09:12:25 -0400 Message-Id: <1525353146-21994-1-git-send-email-trini@konsulko.com> X-Mailer: git-send-email 2.7.4 Subject: [U-Boot] [PATCHv2 1/2] stdio_dev.h: Drop the video section as it is unused 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" With tighter build flags the fact that this header referenced uchar/ushort without including what typedefs it causes an error. Rather than add another include here, drop the section in question as it is unused. Reported-by: Peter Robinson Tested-by: Peter Robinson Signed-off-by: Tom Rini --- Changes in v2: - Reword slightly, add Tested-by --- include/stdio_dev.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/include/stdio_dev.h b/include/stdio_dev.h index 3164fa2a5579..1ea8bff47bab 100644 --- a/include/stdio_dev.h +++ b/include/stdio_dev.h @@ -49,24 +49,6 @@ struct stdio_dev { }; /* - * VIDEO EXTENSIONS - */ -#define VIDEO_FORMAT_RGB_INDEXED 0x0000 -#define VIDEO_FORMAT_RGB_DIRECTCOLOR 0x0001 -#define VIDEO_FORMAT_YUYV_4_4_4 0x0010 -#define VIDEO_FORMAT_YUYV_4_2_2 0x0011 - -typedef struct { - void *address; /* Address of framebuffer */ - ushort width; /* Horizontal resolution */ - ushort height; /* Vertical resolution */ - uchar format; /* Format */ - uchar colors; /* Colors number or color depth */ - void (*setcolreg) (int, int, int, int); - void (*getcolreg) (int, void *); -} video_ext_t; - -/* * VARIABLES */ extern struct stdio_dev *stdio_devices[]; From patchwork Thu May 3 13:12:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 908037 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=konsulko.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40cFvD2tQYz9s7S for ; Thu, 3 May 2018 23:13:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id DCBCBC21E6C; Thu, 3 May 2018 13:12:53 +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_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 A170BC21E56; Thu, 3 May 2018 13:12:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F418CC21D8A; Thu, 3 May 2018 13:12:32 +0000 (UTC) Received: from mail-yb0-f195.google.com (mail-yb0-f195.google.com [209.85.213.195]) by lists.denx.de (Postfix) with ESMTPS id E50A4C21DD4 for ; Thu, 3 May 2018 13:12:31 +0000 (UTC) Received: by mail-yb0-f195.google.com with SMTP id b14-v6so6474928ybk.1 for ; Thu, 03 May 2018 06:12:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Ul5o4NyQa9dYmyA5Q2S2G6c5ZBnWRGWbMizFFV9pa6g=; b=V7wmr6OfANxZqT86OPJnnfnWavShVMRrpVottGZ9I2VHIjJUuaqK4ar8EAdcDljRGy HH9G7s9+Y8zvaqqGmnW5cauc1auBtXwffzr5+DQzLdFUHS/oSOa0mfgDjEaEQNTe0ZGv Dl8srJSo89m1ACD2YXfA281FUCzKeZR0Mf1HroB1YV+r94PZIFs8gA7rF20fj9c8lfIv nJCituF+Vy4F7P5fXxtQaw7OgTTG/FKzHHeXd70EEfeOgDEZ/nFyuQy/eV7HFKC9bCD6 MrSflEQ1R5Jsg7d4nN+9psIzzENyPnN8joNBK3JV7BAFShTQt1XB0VatpT1XJ+WDtuji uDVw== X-Gm-Message-State: ALQs6tCncVlLsfdMG8t8kc+Mhev3buMuZnj/zOMtjpfQWbJNOTWOk/zF AuwK6LHaiLXoKjcXW8HC07px X-Google-Smtp-Source: AB8JxZqYhWxQi4Lq0VPoTTTaLA+LYE1kWUT0jx+QWQhpSUaDTnPN/7yBtLvjQrD/KcaBmQZREy8ydw== X-Received: by 2002:a25:5708:: with SMTP id l8-v6mr14914385ybb.384.1525353150573; Thu, 03 May 2018 06:12:30 -0700 (PDT) Received: from bill-the-cat.ec.rr.com (cpe-65-184-142-68.ec.res.rr.com. [65.184.142.68]) by smtp.gmail.com with ESMTPSA id k203-v6sm3815073ywb.34.2018.05.03.06.12.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 May 2018 06:12:30 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Thu, 3 May 2018 09:12:26 -0400 Message-Id: <1525353146-21994-2-git-send-email-trini@konsulko.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525353146-21994-1-git-send-email-trini@konsulko.com> References: <1525353146-21994-1-git-send-email-trini@konsulko.com> Subject: [U-Boot] [PATCHv2 2/2] stdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directly 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" With tighter build flags the fact that doesn't have a reference back to MAX_NAMES causes an error. Include here and then in common/console.c use MAX_NAMES rather than 3 when working with stdio_names. Reported-by: Peter Robinson Signed-off-by: Tom Rini Tested-by: Peter Robinson --- Changes in v2: - New patch --- common/console.c | 4 ++-- include/stdio_dev.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/console.c b/common/console.c index 0e0295514b21..f1a5e95c8f39 100644 --- a/common/console.c +++ b/common/console.c @@ -847,7 +847,7 @@ done: #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE /* set the environment variables (will overwrite previous env settings) */ - for (i = 0; i < 3; i++) { + for (i = 0; i < MAX_NAMES; i++) { env_set(stdio_names[i], stdio_devices[i]->name); } #endif /* CONFIG_SYS_CONSOLE_ENV_OVERWRITE */ @@ -926,7 +926,7 @@ int console_init_r(void) #endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ /* Setting environment variables */ - for (i = 0; i < 3; i++) { + for (i = 0; i < MAX_NAMES; i++) { env_set(stdio_names[i], stdio_devices[i]->name); } diff --git a/include/stdio_dev.h b/include/stdio_dev.h index 1ea8bff47bab..c2a88b4fc416 100644 --- a/include/stdio_dev.h +++ b/include/stdio_dev.h @@ -8,6 +8,7 @@ #ifndef _STDIO_DEV_H_ #define _STDIO_DEV_H_ +#include #include /*