From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Fri, 3 Feb 2012 06:39:06 -0500 Subject: [U-Boot] [PATCH 01/28] net: Remove volatile from all of net except the eth driver interface In-Reply-To: References: <1327020811-1538-1-git-send-email-joe.hershberger@ni.com> Message-ID: <201202030639.07747.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 24 January 2012 01:27:53 Joe Hershberger wrote: > On Tue, Jan 24, 2012 at 12:09 AM, Simon Glass wrote: > > On Fri, Jan 20, 2012 at 12:15 PM, Joe Hershberger wrote: > >> On Fri, Jan 20, 2012 at 10:22 AM, Simon Glass wrote: > >>> On Thu, Jan 19, 2012 at 4:53 PM, Joe Hershberger wrote: > >>>> @@ -1454,9 +1454,9 @@ NetReceive(volatile uchar *inpkt, int len) > >>>> > >>>> - NetRxPacket = inpkt; > >>>> + NetRxPacket = (uchar *)inpkt; > >> > >> All the assignments that need a non-volatile pointer now use > >> NetRxPacket instead of inpkt, since it is already assigned and and the > >> same type minus volatile. > > > > Yes, I am only sensitive to this because it is a global and there is > > enough use of globals in the net code already. > > I chose to not add a local variable to hold the non-volatile pointer > since there was already a global. Since u-boot is single threaded, > this should not be a problem and could be easily changed later when > the Ethernet driver interface is cleaned up. funcs given a ptr should operate on that ptr. relying on global variables is a step backwards imo. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: