Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1248080imu; Wed, 28 Nov 2018 06:52:16 -0800 (PST) X-Google-Smtp-Source: AJdET5fljPZs1o0+fFAZtEFf6jB4D6VotcIA+3qXnYHa8XxKMyxC0p8d32W+ZkvwJgC1r674T7Ky X-Received: by 2002:a62:2bd4:: with SMTP id r203-v6mr37867922pfr.105.1543416736033; Wed, 28 Nov 2018 06:52:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543416736; cv=none; d=google.com; s=arc-20160816; b=UETzMKL/N8TmmkK87XBpW1nWwAmBc9bYGSpy9JORwQNcEbZ6VPDGovBBGXtpSA1Eqs IMh7TSPgqY0lXYyqo05V2lJ+DbGmL8V3zeSZOkGdVsHbO0aP6t0XqHT1GeCIakY0OVwS 4lNiHNzAQz2N2zwfL3ZT4RrbYONr6qzdWXP5XlDCJoJI77fPVVLBIMQsyifCJnkGZzdC gyKqlE5vbWTqq8NTnF/3hFDS5dIDP1apIFVy0qS1Ve8vOGj1L9g2kyRKS6TBZseSAzIh 2TI9ZhKVXThIKtrMAdNHo9AX+VI4Z92qsPK101LZIasisBYPnKoPYJvAopSHB7MDG940 Lneg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ajHurSNRwtNrFtV6PIPueDAKLX7oClZwfNaHBmZLEm8=; b=FA31tdmPiPO7gbsiWMQMMan0jxucGdE5lwpXDv2H9acwvTW3fubV5JN5rMy/eojddO cPX0y92njqIfOPh14fsxRK0YhSTjxZCJTMQOvaqqxh7Rv4UDP2ghrI9+WvCfZcHdoVjE On+i/sXi59bQWbTs9YdW6yOzYHPmebYPe7UokfnW3uqef6Dpoy+oI1jHDxdSmBVnXltK M/hBWV22B4+jR+6qoeW8KisBGFcwc3BjwkzAO2s/YxTlqMMpLrXVheYH7C7sOARDsi1G cMynuEpfFxQJ3TP3gcC6FQY9LibmefUzVas5jzYVQl1VB7JqNx9RyyIBRgO0O71EBGnw hUnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dWVXdaF4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f189si7922297pfg.123.2018.11.28.06.51.56; Wed, 28 Nov 2018 06:52:16 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dWVXdaF4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728508AbeK2BxR (ORCPT + 99 others); Wed, 28 Nov 2018 20:53:17 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42802 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728181AbeK2BxQ (ORCPT ); Wed, 28 Nov 2018 20:53:16 -0500 Received: by mail-lj1-f194.google.com with SMTP id l15-v6so23684836lja.9 for ; Wed, 28 Nov 2018 06:51:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ajHurSNRwtNrFtV6PIPueDAKLX7oClZwfNaHBmZLEm8=; b=dWVXdaF4xoPiK4bRpMfxF1z7310rWKfT/o5rL2uML0A2a/4wGq62Blo/FuRl6YKKlG cHazFpwCukY/AuDxZ65sHJl09cOH/6yiYLSL/AWKhQjLQ10CCEVwrs32mWY/gylExWDy K8d063yrWPj/s4CAqM+bHZnah5tBJlTrHXaNTG/z8h0uNBD90NnEIuSl+iiAFdhGupUs r5e9NS8d3atHIx9BMbTIqiUE1FByUnaHSwtTqEguFzBvY4L5SNaD8zn9pEgf3KNWyDnI /j1ptPGheKIcWfxbyUL1hmgM53UiqxrM7pQ3rrdhxKFFbsMkG4XH4y49Fw2cVa07C/Nh eQkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ajHurSNRwtNrFtV6PIPueDAKLX7oClZwfNaHBmZLEm8=; b=cv8OBJr+FLaDt22S1Kd3qkN48yqCpz+DWcG2KZZ5LGccZX3uGxGMbuGbH3rUje3gj0 0Qu5+/3yJSvnQRc4T7Ao3ZaMVcTS+lQQagHbVciw/hGy5kNwhtRbB6UDY/hCclTiy2HD JL4PEbK700t6K1bXkNCtwxhWdo8UzrQip5xsg3NainZFHyPqpfCnaUfYjJk6GKQUnEJU pnPlPv/TwuDdF92zKlAq/sGzLAnWwboZDHKszkMjnmvAjZPZDNq5jDDhta5qi6txjzge 1Z2aJ/mGeMw2zVDxue6OTOW6vIqvYk7s45cMEgk1dwIYrhocpT4HoUY527roiH1punk9 TVLA== X-Gm-Message-State: AGRZ1gLwb07lWk/NuJTey/WN8OepfKALX0u6ZEjTYp0rVBXLax5dZYZ/ c4RjxGzaFhdAdazpw3QKMwOUrCbpGHrn+QU4ErI= X-Received: by 2002:a2e:a289:: with SMTP id k9-v6mr22830722lja.24.1543416680181; Wed, 28 Nov 2018 06:51:20 -0800 (PST) MIME-Version: 1.0 References: <1542258430-19885-1-git-send-email-huijin.park@samsung.com> <20181115102921.5117af90@xps13> In-Reply-To: <20181115102921.5117af90@xps13> From: Huijin Park Date: Wed, 28 Nov 2018 23:51:06 +0900 Message-ID: Subject: Re: [PATCH v2] mtd: change len type from signed to unsigned type To: miquel.raynal@bootlin.com Cc: huijin.park@samsung.com, boris.brezillon@bootlin.com, =?UTF-8?B?TWFyZWsgVmHFoXV0?= , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miqu=C3=A8l, On Thu, Nov 15, 2018 at 6:29 PM Miquel Raynal w= rote: > > 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? > It doesn't need backporting. Because this patch is for enforcing code correctness. > > > > 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=C3=A8l Thanks, Huijin