From: Al Viro <viro@ZenIV.linux.org.uk>
To: Heiko Schocher <hs@denx.de>
Cc: linux-kernel@vger.kernel.org,
Brian Norris <computersforpeace@gmail.com>,
Richard Weinberger <richard@nod.at>,
linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH] UBI: rename free variable
Date: Fri, 9 Oct 2015 06:39:31 +0100 [thread overview]
Message-ID: <20151009053931.GA22011@ZenIV.linux.org.uk> (raw)
In-Reply-To: <56174518.3050906@denx.de>
On Fri, Oct 09, 2015 at 06:39:52AM +0200, Heiko Schocher wrote:
> Hello Al,
> Sorry, I should have added this info immediately into the patch ...
>
> We have in U-Boot a compat.h file, in which we collect all things
> we need to make linux code running under U-Boot, and there we map
> kfree() to free(), see:
>
> http://git.denx.de/?p=u-boot.git;a=blob;f=include/linux/compat.h;h=fbebf910addd994d265d21c4fbaa0a2f48f4ccb1;hb=996ec1dcc58a34b53891acde0ec5df9141b5fcc2#l58
>
> So, if we use a var name "free", this will conflict ... and I get
> for example when compiling the UBI code:
>
> CC drivers/mtd/ubi/fastmap.o
> drivers/mtd/ubi/fastmap.c: In function 'scan_pool':
> drivers/mtd/ubi/fastmap.c:475:3: error: called object 'free' is not a function
>
> So with this patch, we have less differences to kernel files ...
Umm... wouldn't it be easier to replace that mix of #define and static inline
with uniform use of static inline, rather than playing whack-a-mole like
that?
next prev parent reply other threads:[~2015-10-09 5:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 3:29 [PATCH] UBI: rename free variable Heiko Schocher
2015-10-09 4:13 ` Al Viro
2015-10-09 4:39 ` Heiko Schocher
2015-10-09 5:39 ` Al Viro [this message]
2015-10-09 6:29 ` Heiko Schocher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151009053931.GA22011@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=hs@denx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).