From patchwork Thu Mar 20 09:48:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 3864801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A87E39F370 for ; Thu, 20 Mar 2014 09:51:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CAD60201D3 for ; Thu, 20 Mar 2014 09:51:02 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E3D9820125 for ; Thu, 20 Mar 2014 09:51:01 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQZbB-0002zv-Es; Thu, 20 Mar 2014 09:49:18 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQZak-0001FB-Nh; Thu, 20 Mar 2014 09:48:50 +0000 Received: from mail-pd0-x232.google.com ([2607:f8b0:400e:c02::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQZah-0001DT-8n; Thu, 20 Mar 2014 09:48:48 +0000 Received: by mail-pd0-f178.google.com with SMTP id x10so682825pdj.37 for ; Thu, 20 Mar 2014 02:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Qs3XXbipEuyKC8UrsErOK2UnMKWsxqdZVfOlcIdtt54=; b=mdxCP1peuWi09kJvQ7LCZGqp02vY7l61qHXy6R5hQp3pI5B7B8kS7AYbhgMVerMxu8 ayworISBUiUp9MxHiNtx+UgdLD8RHOGhunCQrQMowxmuF6xebPzzqt7zKx/9znjMsQGd fASZukr7CFIpDx5KawZkboRkvIUYDcnkWr7FvnCpeuGkVt9gC+O7D0HUM3FDRE/lX1rD o2t5WXtYTTmfW1bRk8w3MdMUY4oHlrYnucCQyLyEPOnjdfuWDlv3d7JuV/ogHIwB50fm 4nX2gBjP3VoQSnSaGJxxmTvxevYyabc48mmRjcnf9CXGhrGDRyuG/evdgiZnwepiLhK1 8J3Q== X-Received: by 10.68.240.36 with SMTP id vx4mr24096608pbc.140.1395308905677; Thu, 20 Mar 2014 02:48:25 -0700 (PDT) Received: from norris-Latitude-E6410 ([98.154.223.43]) by mx.google.com with ESMTPSA id yx3sm2828557pbb.6.2014.03.20.02.48.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 20 Mar 2014 02:48:24 -0700 (PDT) Date: Thu, 20 Mar 2014 02:48:20 -0700 From: Brian Norris To: Lee Jones Subject: Re: [PATCH v6 00/36] mtd: st_spi_fsm: Add new driver Message-ID: <20140320094820.GJ31517@norris-Latitude-E6410> References: <1395307268-12721-1-git-send-email-lee.jones@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1395307268-12721-1-git-send-email-lee.jones@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140320_054847_400345_EF2985F1 X-CRM114-Status: GOOD ( 14.16 ) X-Spam-Score: -2.0 (--) Cc: dwmw2@infradead.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Angus.Clark@st.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Mar 20, 2014 at 09:20:32AM +0000, Lee Jones wrote: > This should be the final version (again) :) > > Version 6: > Serviced 3 nits picked up by Brian during final review. I'm really sorry to do this again, but can you *please* read *all* of my comments? You're missing at least the following diff! I'm fine with an incremental patch on top of this series. diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index aefd48db7ade..6369636e980a 100644 --- a/drivers/mtd/devices/st_spi_fsm.c +++ b/drivers/mtd/devices/st_spi_fsm.c @@ -3,7 +3,7 @@ * * Author: Angus Clark * - * Copyright (C) 2010-2014 STicroelectronics Limited + * Copyright (C) 2010-2014 STMicroelectronics Limited * * JEDEC probe based on drivers/mtd/devices/m25p80.c * @@ -1730,14 +1730,6 @@ static int stfsm_mtd_write(struct mtd_info *mtd, loff_t to, size_t len, dev_dbg(fsm->dev, "%s to 0x%08x, len %zd\n", __func__, (u32)to, len); - *retlen = 0; - - if (!len) - return 0; - - if (to + len > mtd->size) - return -EINVAL; - /* Offset within page */ page_offs = to % FLASH_PAGESIZE;