Message ID | 1395313907-25318-3-git-send-email-lee.jones@linaro.org |
---|---|
State | Accepted |
Commit | 0419a203f865603654953f407cf062309330f37e |
Headers | show
Return-Path: <patchwork-forward+bncBDA7X7F2WUEBBEU2VOMQKGQEQNDNLFI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B2FD220143 for <linaro@patches.linaro.org>; Thu, 20 Mar 2014 11:12:18 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id hw13sf1518427qab.5 for <linaro@patches.linaro.org>; Thu, 20 Mar 2014 04:12:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=1W/vU3bxQHYZoP3KF7M0XW3miDI6riu5REBR8nXv2uc=; b=lebL+UTHWbXk31TbHr0mTC4w6H4/IS764SMxX1N6M9hCb3ScOZUOGrBDqHRzq8Bmv3 NV99vSukwvGncNOgS3f/qcAl9XjrGE/SuKVBL8d5iQqjUB/F6fQgbDiUyo71dfMRNo5c Z0K0rqCu2xfNzC/CGSYUNB5TQCWUF/mmKICNUbA9R95hjuFMTJxa15VeKtqkF5HJGEoB Sjy+hGOC4DV4tU3iamYItubSlmyfIsXOmd89uD1qAqCaZx1FXv1rUd1Vq226jglxLLUO MAViDlV1Y3trQ9CE5bL555SKr5mjjMOzMQbREo2Da6OWnefgKT1KCZlLZTgwotDsEQrc UFWQ== X-Gm-Message-State: ALoCoQma9XtdYGuOUejgV2tbCpco995wKcQztfoNwi9J4m2DbNoA7YnuRzDMVqVdJWYoSvmdOntR X-Received: by 10.236.121.4 with SMTP id q4mr9626324yhh.34.1395313938435; Thu, 20 Mar 2014 04:12:18 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.109.9 with SMTP id k9ls186338qgf.78.gmail; Thu, 20 Mar 2014 04:12:18 -0700 (PDT) X-Received: by 10.220.104.210 with SMTP id q18mr24313397vco.9.1395313938349; Thu, 20 Mar 2014 04:12:18 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id ww7si340538vec.156.2014.03.20.04.12.18 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 04:12:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id sa20so708721veb.8 for <patchwork-forward@linaro.org>; Thu, 20 Mar 2014 04:12:18 -0700 (PDT) X-Received: by 10.221.37.200 with SMTP id tf8mr21304vcb.54.1395313938203; Thu, 20 Mar 2014 04:12:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp379089vck; Thu, 20 Mar 2014 04:12:17 -0700 (PDT) X-Received: by 10.68.202.8 with SMTP id ke8mr47121787pbc.86.1395313936868; Thu, 20 Mar 2014 04:12:16 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wp10si1233811pbc.103.2014.03.20.04.12.16; Thu, 20 Mar 2014 04:12:16 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757700AbaCTLMI (ORCPT <rfc822;linus.walleij@linaro.org> + 26 others); Thu, 20 Mar 2014 07:12:08 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:62931 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757544AbaCTLMG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Mar 2014 07:12:06 -0400 Received: by mail-wi0-f177.google.com with SMTP id cc10so600594wib.16 for <linux-kernel@vger.kernel.org>; Thu, 20 Mar 2014 04:12:05 -0700 (PDT) X-Received: by 10.180.101.40 with SMTP id fd8mr23568486wib.1.1395313925005; Thu, 20 Mar 2014 04:12:05 -0700 (PDT) Received: from lee--X1.home (host109-148-116-196.range109-148.btcentralplus.com. [109.148.116.196]) by mx.google.com with ESMTPSA id jd2sm5535554wic.9.2014.03.20.04.12.03 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 04:12:04 -0700 (PDT) From: Lee Jones <lee.jones@linaro.org> To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, computersforpeace@gmail.com Cc: lee.jones@linaro.org, kernel@stlinux.com, linux-mtd@lists.infradead.org, dwmw2@infradead.org, angus.clark@st.com Subject: [PATCH 2/5] mtd: st_spi_fsm: Avoid duplicating MTD core code Date: Thu, 20 Mar 2014 11:11:44 +0000 Message-Id: <1395313907-25318-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395313907-25318-1-git-send-email-lee.jones@linaro.org> References: <1395313907-25318-1-git-send-email-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index dcc1dc3..27f9ec9 100644 --- a/drivers/mtd/devices/st_spi_fsm.c +++ b/drivers/mtd/devices/st_spi_fsm.c @@ -1728,14 +1728,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;
Reported-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/mtd/devices/st_spi_fsm.c | 8 -------- 1 file changed, 8 deletions(-)