Received: by 10.213.65.68 with SMTP id h4csp1068850imn; Thu, 22 Mar 2018 14:37:18 -0700 (PDT) X-Google-Smtp-Source: AG47ELsJksWWMautUx/GECeos/E8FuZXGZXxkLjbf1ySwMq17aaOWrkjhvuO04Yghl0lI1WicqWl X-Received: by 10.99.113.25 with SMTP id m25mr19347172pgc.164.1521754638765; Thu, 22 Mar 2018 14:37:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521754638; cv=none; d=google.com; s=arc-20160816; b=rshh+Eob2jQ8xKDCxGG/G1kEoIMFM1IRhqmdnNuCawWSS5aPRvnPcm1rPzgsKZEoy0 E/jo6Ij5IeHMTDqFh7t+VtfT7VJc7p6FCHzDiu4ktkMDzjc5R/dql+XzBuwnRZ4AlhqA vttCSP7tTsTN4LTuFzs0y4YK251mFZUj6djhgJ/CsADtbEAM2BBAEQZ0YJFtdf3gdILV 6EUPDVFoKte3K4b7EoHLkkxT2istsQSHjGmq71Zcekh5QWYi/BaD8wOXi6B8jAH5j9AG 4AohXHPB6iEGxA3zT6/pUU4DRL7vHJaRt8nW7oKpQhdvK0F028XZsRHDxcActcWtIwtf T5ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=FT/feOibHEJuD1UJClpialfzUc3QXBJ8QMpxwACyyXQ=; b=mfqYqfsZ+R5xrDlNrEcqlWYvGu2t54M86kTp4v9pdUdjWbgLNz3oqVQ9BZvgk/QV6a 1kqp40KaalV16G1u7BDhWGIh8H0bKLyGN7/uFBDyoNRiJ4K/liGK99YYiCtTL30wkdP1 YHl32ZVXB+zTlfmiTKlm0AaOAyGNniWXfYruciK/cmCHakepxx5/OXddblh6kTuhcObo 18aYPrTreKhpLVUwLcHdNC+PNjxKYOmYKYR0Uy6s03IZQl9EE346HnVdEZLFdnAkzFi/ tgjZj6KxBwI+5ivIvQMXMH1+wjoxblhxD4mWWw5oziAxobEdySLuoorqzoMGrVHeo6NJ 1pAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11-v6si6807486pls.58.2018.03.22.14.37.03; Thu, 22 Mar 2018 14:37:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751981AbeCVVfB (ORCPT + 99 others); Thu, 22 Mar 2018 17:35:01 -0400 Received: from smtprelay0120.hostedemail.com ([216.40.44.120]:35093 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751548AbeCVVfA (ORCPT ); Thu, 22 Mar 2018 17:35:00 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 256A4837F243; Thu, 22 Mar 2018 21:34:59 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:152:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3872:4225:4250:4321:5007:6119:7903:8660:10004:10400:10848:11026:11232:11473:11658:11914:12296:12740:12895:13069:13148:13230:13311:13357:13894:14181:14659:14721:21080:21433:21627:30046:30054:30090:30091,0,RBL:172.56.30.185:@perches.com:.lbl8.mailshell.net-62.8.0.190 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:19,LUA_SUMMARY:none X-HE-Tag: hate49_484e8e5893a34 X-Filterd-Recvd-Size: 2050 Received: from XPS-9350 (unknown [172.56.30.185]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Thu, 22 Mar 2018 21:34:56 +0000 (UTC) Message-ID: <1521754493.7999.49.camel@perches.com> Subject: Re: [PATCH 2/2] fpga: lattice machxo2: Add Lattice MachXO2 support From: Joe Perches 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 Date: Thu, 22 Mar 2018 14:34:53 -0700 In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.