From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
Michael Walle <mwalle@kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Takahiro Kuwano <Takahiro.Kuwano@infineon.com>,
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
Date: Tue, 12 Mar 2024 17:16:23 +0500 [thread overview]
Message-ID: <d690b7d7-2568-4a47-a653-eb25671fb138@collabora.com> (raw)
In-Reply-To: <mafs0r0gf8x6c.fsf@kernel.org>
On 3/12/24 5:14 PM, Pratyush Yadav wrote:
> 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/
Thanks Pratyush!
>
>>
>> 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 <usama.anjum@collabora.com>
>>> ---
>>> 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;
>
--
BR,
Muhammad Usama Anjum
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2024-03-12 12:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 9:01 [PATCH v2] mtd: spi-nor: core: correct type of i Muhammad Usama Anjum
2024-03-04 9:11 ` Tudor Ambarus
2024-03-04 9:16 ` Michael Walle
2024-03-04 10:11 ` Dan Carpenter
2024-03-04 10:32 ` AngeloGioacchino Del Regno
2024-03-05 1:10 ` Takahiro Kuwano
2024-03-11 17:11 ` Muhammad Usama Anjum
2024-03-12 12:14 ` Pratyush Yadav
2024-03-12 12:16 ` Muhammad Usama Anjum [this message]
2024-03-13 22:23 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d690b7d7-2568-4a47-a653-eb25671fb138@collabora.com \
--to=usama.anjum@collabora.com \
--cc=Takahiro.Kuwano@infineon.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=mwalle@kernel.org \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=tudor.ambarus@linaro.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox