From: Joakim Tjernlund Date: Thu, 4 Jan 2018 14:43:02 +0000 Subject: [U-Boot] [PATCH v2 0/9] reduce the size of the mmc core In-Reply-To: <1515075830-18783-1-git-send-email-jjhiblot@ti.com> References: <1515075830-18783-1-git-send-email-jjhiblot@ti.com> Message-ID: <1515076980.32342.12.camel@infinera.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2018-01-04 at 15:23 +0100, Jean-Jacques Hiblot wrote: > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. > > > This series applies on u-boot/next > > It aims at reducing the size taken by the mmc core in the SPL. > Recent changes (for which I'm to blame) have bloated the mmc core and have > broken platforms that were already tight on code space. This is achieved mostly > by compiling out parts of the initialization process that are not required when > the SD/MMC write operations are not used. I have not looked at the code so maybe this off ... You can save a lot of space/code if you avoid static/global variables. Instead of #define MYSTR "some cool feature" static char *mystr = MYSTR; do fun() { char *mystr = MYSTR; ... } Avoid static/global vars at all cost! Jocke