From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH 2/2] fpga: lattice machxo2: Add Lattice MachXO2 support Date: Thu, 22 Mar 2018 14:34:53 -0700 Message-ID: <1521754493.7999.49.camel@perches.com> References: <1521653726-24625-1-git-send-email-p.pisati@gmail.com> <1521653726-24625-3-git-send-email-p.pisati@gmail.com> <1521655492.7999.13.camel@perches.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Alan Tull Cc: Paolo Pisati , Moritz Fischer , Rob Herring , Mark Rutland , linux-fpga@vger.kernel.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-kernel List-Id: devicetree@vger.kernel.org On Thu, 2018-03-22 at 16:32 -0500, Alan Tull wrote: > On Wed, Mar 21, 2018 at 1:04 PM, Joe Perches wrote: > > On Wed, 2018-03-21 at 18:35 +0100, Paolo Pisati wrote: > > > This patch adds support to the FPGA manager for programming > > > MachXO2 device’s internal flash memory, via slave SPI. > > > > style trivia: > > > > > diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c > > > > [] > > > +static int get_status(struct spi_device *spi, unsigned long *status) > > > +{ > > > + struct spi_message msg; > > > + struct spi_transfer rx, tx; > > > + u8 cmd[] = LSC_READ_STATUS; > > > > static const u8 cmd[] > > here and everywhere else as all the tx_buf assignments > > of cmd are to const void * > > Why *static* const u8 cmd[]? So various compilers don't reload it on each call.