Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1014980lql; Tue, 12 Mar 2024 05:14:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWN8U2f06Kegw6wW5DPUANBhfvWIQKq88ZEA9iOQUkPbqBT4L6lhC8Y4hRurXC6EjRK4JHm1r7iss1Nx+eThOYF7JQ/hCZwIBHO5NB2CA== X-Google-Smtp-Source: AGHT+IFG75x+AaBofborXOFOpkqT6ETF3iLLk1myEQPY1Yv1Oork1GAUbWfwQenKnOk/0U48SYbj X-Received: by 2002:a05:6870:c0cf:b0:220:c604:8df with SMTP id e15-20020a056870c0cf00b00220c60408dfmr11106845oad.37.1710245656675; Tue, 12 Mar 2024 05:14:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710245656; cv=pass; d=google.com; s=arc-20160816; b=vr0ZdnD2lq+xICA2Cqk+XAVpaUyWU6/jMHo9obK0fhV+NWMjOeiFZU7KUZiZ79XCTw 2lLEAqDhhaut/JHgUGEKCvj9Dc10aAcuHl+QKdChmwW+HbLk+wdWHqvOibutbiG/Bgi7 mCtFtc4a+l7plP6z2YEXFUmSnBv2ickV6xntbawVrkv6zjMSpBrGoJLb9Ux2U98bkLAp /PGFPttqq8Tn5i+932SFFbV7NXgoOyDZdVm0F3hlT4vgQmY2AhpcVfRsWjU9oF/SLY39 ggcpMQol290n9/UUFIF85V1MdiekEeNtGS8rfNVGpmF9JTD3tYSu4mwIdBf27RGmxYaG BlTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:date:references:in-reply-to:subject:cc:to :from:dkim-signature; bh=7DrujCvqvhbD++O6n80TvLSvjNyXv5FzoTXNFnef6x8=; fh=2Qns87LPLXhNMCyazpGTvduzu4poj9/zsrDGyleo2d8=; b=N90cQAfVTbyOAd8Czphcmp228x+WXZP0Z5zmZah+Ze9PdA83HBem7g3imqAEw5PHTy vAVt8wVBnCJF+cR2X04cfCYC/xk/BNRgIOC/vARr3sOaubXVdHN5C8fnWW2hWRJBV9wz EIridOPGskq47+vTzdul66m/jJG6WCuRd8pDbwZbvpSm0kTf99T/hUIFnrgz60WWjsTt gk5O8+mcgtP07rQWUMmDA4g1C/AiDDy9KN6wIQ8vMalh8c7+TERuK3rPRmSgApnY3g4K 234zuVZr2tFrnmTFUzLDLmoArtCMQ+OGfxDUEbtKikOcaFytTivg3lvVpwdSRSRRUfZf S8VQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YMtMcM1H; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v12-20020a05620a0a8c00b007882a37c426si7053047qkg.716.2024.03.12.05.14.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 05:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YMtMcM1H; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6A1521C217DC for ; Tue, 12 Mar 2024 12:14:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42A3D7A12B; Tue, 12 Mar 2024 12:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YMtMcM1H" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61F2C79DBB; Tue, 12 Mar 2024 12:14:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710245647; cv=none; b=JQeXRpcZuSpii68h7Mt8wsobh3ucvYkEDRKGjYGRlU33BmK0FGqweJcMEDYRLeNX/p5Yd9DmWlmqnee2/b+ugXy02b+WnpwCPh+nUik9j4leGTERLHU9lYYI5lnycALrSedIZKOGocJcKYsT6fnfkIn49tJKRfQi5D6IXGwHgNU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710245647; c=relaxed/simple; bh=RIledjCrWSCL/IPypQh0lHmpGxAEht7ZxoU3/0wNE40=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=gUcx51A72eTC4o4OK5Ic1BT/zXLvFdBRer3NxfxqxHKARNNxGc9wZkksG1jKI8r15cy/BZ6KSgo+e0RPIOhe1+aLvzQWuDZuS8ilZzcwzbqRar3TMhRp6ixu7GTu2wp3CV9SW6HbwE3rPosTcR1EAjgLkKyoiM+XKskAfndyhJg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YMtMcM1H; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 498B1C43399; Tue, 12 Mar 2024 12:14:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710245647; bh=RIledjCrWSCL/IPypQh0lHmpGxAEht7ZxoU3/0wNE40=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YMtMcM1HD9JepAKEyuQuswytFBV5pq115pEWz+RZw+dGwUTHO+H4E8uCtlCmZLu3K yeOtnQJas5uaLZ5D4TxqkVTt8JDac3yA4qXENMSAKlo1jxQnELvmHvHhkI7osYGwze YtiXGANJtJ+sCP1L4YujohQOGY44MzijVk8bgsW/4iKM8MrU41wWsXsGr3yQcI5Hlv ddPv1rRmJn5LS76fTTGBSTVsIoyDae2Ohagyot/OLHO4LaUc2iLaAYU7ypAGttwB2e r/F1J1p7aMpA21mP3h8ofprS7UQ3ZLuF7U3n1xXqT7sW50x6UCInYUuiyGxhWwRwTS AQFPaCOFGml7A== From: Pratyush Yadav To: Muhammad Usama Anjum Cc: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Takahiro Kuwano , kernel@collabora.com, kernel-janitors@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mtd: spi-nor: core: correct type of i In-Reply-To: <865fc24b-ae27-4084-893b-c5c389480a09@collabora.com> (Muhammad Usama Anjum's message of "Mon, 11 Mar 2024 22:11:33 +0500") References: <20240304090103.818092-1-usama.anjum@collabora.com> <865fc24b-ae27-4084-893b-c5c389480a09@collabora.com> Date: Tue, 12 Mar 2024 13:14:03 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Hi, On Mon, Mar 11 2024, Muhammad Usama Anjum wrote: > Soft reminder Miquel should pick up the patch when sending out his pull request [0]. [0] https://lore.kernel.org/linux-mtd/20240307180919.4cb7a4cb@xps-13/ > > On 3/4/24 2:01 PM, Muhammad Usama Anjum wrote: >> The i should be signed to find out the end of the loop. Otherwise, >> i >= 0 is always true and loop becomes infinite. Make its type to be >> int. >> >> Fixes: 6a9eda34418f ("mtd: spi-nor: core: set mtd->eraseregions for non-uniform erase map") >> Signed-off-by: Muhammad Usama Anjum >> --- >> Changes since v1: >> - Make i int instead of u8 >> --- >> drivers/mtd/spi-nor/core.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c >> index 65b32ea59afc6..3e1f1913536bf 100644 >> --- a/drivers/mtd/spi-nor/core.c >> +++ b/drivers/mtd/spi-nor/core.c >> @@ -3373,7 +3373,7 @@ static u32 >> spi_nor_get_region_erasesize(const struct spi_nor_erase_region *region, >> const struct spi_nor_erase_type *erase_type) >> { >> - u8 i; >> + int i; >> >> if (region->overlaid) >> return region->size; -- Regards, Pratyush Yadav