Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: parsers: qcom: drop setting of partition's mask_flags
@ 2026-10-06 20:00 Gabor Juhos
  2026-10-12 18:27 ` Miquel Raynal
  0 siblings, 1 reply; 3+ messages in thread
From: Gabor Juhos @ 2026-10-06 20:00 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: linux-arm-msm, linux-mtd, linux-kernel, Gabor Juhos

The 'attr' member of struct 'smem_flash_pentry' is 8 bits wide,
so it is only usable to mask the lower 8 bits in the MTD flags.
However the MTD layer does not define any maskable flags in
these bits at all. Additionally, the meaning of the bits in the
'attr' field is not documented, so it is not even possible to map
those to the defined MTD flags.

Due to the reasons above, remove the 'mask_flags' assignment code
since it has no effect anyway.

Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
 drivers/mtd/parsers/qcomsmempart.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/parsers/qcomsmempart.c b/drivers/mtd/parsers/qcomsmempart.c
index d4fdc46a0073..cd562514f88d 100644
--- a/drivers/mtd/parsers/qcomsmempart.c
+++ b/drivers/mtd/parsers/qcomsmempart.c
@@ -144,7 +144,6 @@ static int parse_qcomsmem_part(struct mtd_info *mtd,
 
 		parts[j].name = name;
 		parts[j].offset = le32_to_cpu(pentry->offset) * mtd->erasesize;
-		parts[j].mask_flags = pentry->attr;
 		parts[j].size = le32_to_cpu(pentry->length) * mtd->erasesize;
 		pr_debug("%d: %s offs=0x%08x size=0x%08x attr:0x%08x\n",
 			 i, pentry->name, le32_to_cpu(pentry->offset),

---
base-commit: 55c5b6d5f59f59a8c98a7effc3195226cc20175c
change-id: 20261006-qcom-smempart-ignore-mask_flags-870cc5a294d0

Best regards,
-- 
Gabor Juhos <j4g8y7@gmail.com>


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: parsers: qcom: drop setting of partition's mask_flags
  2026-10-06 20:00 [PATCH] mtd: parsers: qcom: drop setting of partition's mask_flags Gabor Juhos
@ 2026-10-12 18:27 ` Miquel Raynal
  2026-10-13  9:45   ` Gabor Juhos
  0 siblings, 1 reply; 3+ messages in thread
From: Miquel Raynal @ 2026-10-12 18:27 UTC (permalink / raw)
  To: Gabor Juhos
  Cc: Richard Weinberger, Vignesh Raghavendra, linux-arm-msm, linux-mtd,
	linux-kernel

Hi Gabor,

On 06/10/2026 at 22:00:41 +02, Gabor Juhos <j4g8y7@gmail.com> wrote:

> The 'attr' member of struct 'smem_flash_pentry' is 8 bits wide,
> so it is only usable to mask the lower 8 bits in the MTD flags.
> However the MTD layer does not define any maskable flags in
> these bits at all. Additionally, the meaning of the bits in the
> 'attr' field is not documented, so it is not even possible to map
> those to the defined MTD flags.
>
> Due to the reasons above, remove the 'mask_flags' assignment code
> since it has no effect anyway.
>
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>

Sorry but it no longer applies after Weigang He's:
[PATCH] mtd: parsers: qcom: fix offset/size overflow on large partitions

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: parsers: qcom: drop setting of partition's mask_flags
  2026-10-12 18:27 ` Miquel Raynal
@ 2026-10-13  9:45   ` Gabor Juhos
  0 siblings, 0 replies; 3+ messages in thread
From: Gabor Juhos @ 2026-10-13  9:45 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, linux-arm-msm, linux-mtd,
	linux-kernel

Hi Miquèl,

2026. 10. 12. 20:27 keltezéssel, Miquel Raynal írta:
> Hi Gabor,
> 
> On 06/10/2026 at 22:00:41 +02, Gabor Juhos <j4g8y7@gmail.com> wrote:
> 
>> The 'attr' member of struct 'smem_flash_pentry' is 8 bits wide,
>> so it is only usable to mask the lower 8 bits in the MTD flags.
>> However the MTD layer does not define any maskable flags in
>> these bits at all. Additionally, the meaning of the bits in the
>> 'attr' field is not documented, so it is not even possible to map
>> those to the defined MTD flags.
>>
>> Due to the reasons above, remove the 'mask_flags' assignment code
>> since it has no effect anyway.
>>
>> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> 
> Sorry but it no longer applies after Weigang He's:
> [PATCH] mtd: parsers: qcom: fix offset/size overflow on large partitions

Sorry, my fault. The patch was based on nand/next.
I will send a v2 based on tip of mtd/next.

Regards,
Gabor

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-13  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 20:00 [PATCH] mtd: parsers: qcom: drop setting of partition's mask_flags Gabor Juhos
2026-10-12 18:27 ` Miquel Raynal
2026-10-13  9:45   ` Gabor Juhos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox