From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wy0-f177.google.com ([74.125.82.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R5iv2-0002d2-IK for linux-mtd@lists.infradead.org; Mon, 19 Sep 2011 18:50:17 +0000 Received: by wyh11 with SMTP id 11so7098871wyh.22 for ; Mon, 19 Sep 2011 11:50:15 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1314820839-7107-1-git-send-email-computersforpeace@gmail.com> <1314820839-7107-4-git-send-email-computersforpeace@gmail.com> Date: Mon, 19 Sep 2011 11:50:14 -0700 Message-ID: Subject: Re: [PATCH 03/10] nandwrite: consolidate buffer usage From: Brian Norris To: Mike Frysinger Content-Type: text/plain; charset=ISO-8859-1 Cc: b35362@freescale.com, linux-mtd@lists.infradead.org, Artem Bityutskiy List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, Sep 17, 2011 at 7:53 PM, Mike Frysinger wrote: > if the useless memcpy is removed by way of future patches, then this is fine It's not completely removed. Please see patch 07. I'll summarize: the memcpy is moved out of the main code path so that if ioctl(MEMWRITE) is supported in your kernel, you have no extra memcpy's. However, I didn't optimize the original code, which uses the standard write+ioctl(MEMWRITEOOB[64]); it still has the useless memcpy that we are discussing. I'm not sure if/how your solution can work embedded at that level of libmtd. Perhaps some functions I moved around need to be restructured a bit. Brian