Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7798414imu; Thu, 15 Nov 2018 01:31:41 -0800 (PST) X-Google-Smtp-Source: AJdET5erQHDPHqMPVV82iHdHJXCusz2DspPyjRDwPxgrzrDCUPxMBSM/4ihqi/3UDK1JZjl/3DaB X-Received: by 2002:a65:530c:: with SMTP id m12mr4990928pgq.224.1542274301846; Thu, 15 Nov 2018 01:31:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542274301; cv=none; d=google.com; s=arc-20160816; b=YicN6KyQ4zlNnyOEwjRUaXUtkf3jXfX26UR7DTdfnNPmTtHjFheD09HyOEEcsM4Sdu GwM9fFtLxzlEAItmb1bu+mfXkURrqWVDcp5sya8JOp2Jpoo03Uls/qUJHVOmihjIq8tv e1vcmnwsT5Ak3QTFsTem8nW/AQQzGU/fV0XECtpnRBvku25iZUOYvsbI76i72AMe2xTM GCM5E3uyHFTEw06yITxrCmmc0D/uxCdQSBoMBsD3LV1BbaPRkyvbsNfNdUZwZ15F+j9M D5Tlh+e3AyOrElJbU3aJ4MIxCuh39eePkLBXwdUCx76p7HSbSIDo2ivtcnUZeBYg5kuQ 7oxA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=5cWYsmj47CR06vKoggJ/4GFWUxaRT+BKr1URDfOXCdI=; b=Z1bJkg80Qtz5zrqadIBhX6AXswYn1VO3DCX9B1j2TWJap3jalem23zDetRAIqIfW55 3n1p/9eBrYZg4T1l7vYLLHf5BXGHdmXrj8idGIIHIQdh9z/mJNxHYLPNLEhiJbMZk0PH C7xsbVE3mwtNVLeaiOJF82VeKaD07sKA6rwwkOmuu9C5cI8InMPXo/ZSsZt2rZKbP/On IoC2CEB+9Iq3tKzo97sL9OyLlv7jwS2SJkSnfIunaoPKxPZC8cRVm+Lpoz0WzLa4VtGI 2PZvjKeU8/btTgcBCFm/OuCTjlCZj06iMiHbGC4HrlSd+zElqZzejlD9UiPvt1h7q6uF GnIg== 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 p6-v6si25406186plk.429.2018.11.15.01.31.27; Thu, 15 Nov 2018 01:31:41 -0800 (PST) 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 S2387611AbeKOTge convert rfc822-to-8bit (ORCPT + 99 others); Thu, 15 Nov 2018 14:36:34 -0500 Received: from mail.bootlin.com ([62.4.15.54]:60298 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727265AbeKOTge (ORCPT ); Thu, 15 Nov 2018 14:36:34 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 9639020D98; Thu, 15 Nov 2018 10:29:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 Received: from xps13 (aaubervilliers-681-1-13-146.w90-88.abo.wanadoo.fr [90.88.134.146]) by mail.bootlin.com (Postfix) with ESMTPSA id 5A99D20510; Thu, 15 Nov 2018 10:29:22 +0100 (CET) Date: Thu, 15 Nov 2018 10:29:21 +0100 From: Miquel Raynal To: Huijin Park Cc: Boris Brezillon , Marek Vasut , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, bbanghj.park@gmail.com Subject: Re: [PATCH v2] mtd: change len type from signed to unsigned type Message-ID: <20181115102921.5117af90@xps13> In-Reply-To: <1542258430-19885-1-git-send-email-huijin.park@samsung.com> References: <1542258430-19885-1-git-send-email-huijin.park@samsung.com> Organization: Bootlin X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Huijin, Huijin Park wrote on Thu, 15 Nov 2018 00:07:10 -0500: > From: "huijin.park" > > This patch casts the "len" parameter to an unsigned int. > The callers of erase_write() pass the "len" parameter as unsigned int. Indeed. Perhaps it is worth backporting this patch to a stable releases? > > Signed-off-by: huijin.park > --- > drivers/mtd/mtdblock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c > index a5b1933..b2d5ed1 100644 > --- a/drivers/mtd/mtdblock.c > +++ b/drivers/mtd/mtdblock.c > @@ -56,7 +56,7 @@ struct mtdblk_dev { > */ > > static int erase_write (struct mtd_info *mtd, unsigned long pos, > - int len, const char *buf) > + unsigned int len, const char *buf) > { > struct erase_info erase; > size_t retlen; Reviewed-by: Miquel Raynal Thanks, Miquèl