From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 17 Dec 2015 00:52:23 +0100 Subject: [U-Boot] [PATCH v2 1/5] lib: Add wait_for_bit In-Reply-To: <5671F48A.90606@gmail.com> References: <1450303122-17884-1-git-send-email-mateusz.kulikowski@gmail.com> <201512162311.45697.marex@denx.de> <5671F48A.90606@gmail.com> Message-ID: <201512170052.23759.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, December 17, 2015 at 12:32:26 AM, Mateusz Kulikowski wrote: > Hi Marek, Hi, > On 16.12.2015 23:11, Marek Vasut wrote: > > On Wednesday, December 16, 2015 at 10:58:38 PM, Mateusz Kulikowski wrote: > [...] > > >> +#include > >> +#include > >> +#include > >> + > >> +int wait_for_bit(const char *prefix, const u32 *reg, const u32 mask, > >> + const bool set, const unsigned int timeout, > >> + const bool breakable) > >> +{ > > > > I wonder, what would happen if you stuffed this function into the header > > file altogether ? I think this would allow the compiler to do > > interprocedure optimalization on whichever file this would be included > > into. I wonder if that would have any impact on the resulting code size. > > Of course I can make it static inline. > > I was suggested not to care about possible leftovers that are > not garbage-collected by linker so didn't changed that on V2. > > It's (max) few bytes that may be consumed by section alignment. I was just curious about how much difference this would make. Best regards, Marek Vasut