From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QW5kcmVhcyBCaWXDn21hbm4=?= Date: Wed, 31 Oct 2012 10:42:57 +0100 Subject: [U-Boot] [PATCH] fs/fs.c: fix fs_set_blk_dev() for manual relocation In-Reply-To: <50901F3E.2020208@wwwdotorg.org> References: <20121030164739.GA15024@bill-the-cat> <1351621763-26635-1-git-send-email-andreas.devel@googlemail.com> <50901F3E.2020208@wwwdotorg.org> Message-ID: <5090F2A1.4070509@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Stephen Warren, On 30.10.2012 19:41, Stephen Warren wrote: > On 10/30/2012 12:29 PM, Andreas Bie?mann wrote: >> Commit 045fa1e1142552799ad3203e9e0bc22a11e866ea introduce an array with >> filesystem accessors. On arches which need manual reloc this is broken cause the >> function pointers still pointing to the privious location, fix it. > > We found the same code to copy:-) we did ;) >> diff --git a/fs/fs.c b/fs/fs.c > >> int fs_set_blk_dev(const char *ifname, const char *dev_part_str, int fstype) > >> +#ifdef CONFIG_NEEDS_MANUAL_RELOC >> + static int relocated = 0; > > checkpatch bitches about the "= 0" there. I assume BSS initialization > isn't also broken when CONFIG_NEEDS_MANUAL_RELOC is enabled? For AVR32 BSS initialization is working correctly, I do not know how the other arches behave, but I think it is Ok to remove the '0' here. Also the check for fstypes[i].probe != NULL in my patch seems to be not necessary. So I would favor using your patch then. Best regards Andreas Bie?mann