Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mtd/fixes-for-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull mtd fixes from Miquel Raynal:
"Four minor fixes for NAND controller drivers (cleanup path, double
actions, and W=1 warning) as well as a cast to avoid overflows in an
mtd device driver"

* tag 'mtd/fixes-for-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
mtd: rawnand: omap2: Fix build warnings with W=1
mtd: rawnand: arasan: Fix missing de-registration of NAND
mtd: rawnand: arasan: Fix double assertion of chip-select
mtd: diskonchip: Cast an operand to prevent potential overflow
mtd: rawnand: fix double free in atmel_pmecc_create_user()

+27 -6
+9 -2
drivers/mtd/nand/raw/arasan-nand-controller.c
··· 1409 1409 * case, the "not" chosen CS is assigned to nfc->spare_cs and selected 1410 1410 * whenever a GPIO CS must be asserted. 1411 1411 */ 1412 - if (nfc->cs_array && nfc->ncs > 2) { 1413 - if (!nfc->cs_array[0] && !nfc->cs_array[1]) { 1412 + if (nfc->cs_array) { 1413 + if (nfc->ncs > 2 && !nfc->cs_array[0] && !nfc->cs_array[1]) { 1414 1414 dev_err(nfc->dev, 1415 1415 "Assign a single native CS when using GPIOs\n"); 1416 1416 return -EINVAL; ··· 1478 1478 1479 1479 static void anfc_remove(struct platform_device *pdev) 1480 1480 { 1481 + int i; 1481 1482 struct arasan_nfc *nfc = platform_get_drvdata(pdev); 1483 + 1484 + for (i = 0; i < nfc->ncs; i++) { 1485 + if (nfc->cs_array[i]) { 1486 + gpiod_put(nfc->cs_array[i]); 1487 + } 1488 + } 1482 1489 1483 1490 anfc_chips_cleanup(nfc); 1484 1491 }
+1 -3
drivers/mtd/nand/raw/atmel/pmecc.c
··· 380 380 user->delta = user->dmu + req->ecc.strength + 1; 381 381 382 382 gf_tables = atmel_pmecc_get_gf_tables(req); 383 - if (IS_ERR(gf_tables)) { 384 - kfree(user); 383 + if (IS_ERR(gf_tables)) 385 384 return ERR_CAST(gf_tables); 386 - } 387 385 388 386 user->gf_tables = gf_tables; 389 387
+1 -1
drivers/mtd/nand/raw/diskonchip.c
··· 1098 1098 (i == 0) && (ip->firstUnit > 0)) { 1099 1099 parts[0].name = " DiskOnChip IPL / Media Header partition"; 1100 1100 parts[0].offset = 0; 1101 - parts[0].size = mtd->erasesize * ip->firstUnit; 1101 + parts[0].size = (uint64_t)mtd->erasesize * ip->firstUnit; 1102 1102 numparts = 1; 1103 1103 } 1104 1104
+16
drivers/mtd/nand/raw/omap2.c
··· 254 254 255 255 /** 256 256 * omap_nand_data_in_pref - NAND data in using prefetch engine 257 + * @chip: NAND chip 258 + * @buf: output buffer where NAND data is placed into 259 + * @len: length of transfer 260 + * @force_8bit: force 8-bit transfers 257 261 */ 258 262 static void omap_nand_data_in_pref(struct nand_chip *chip, void *buf, 259 263 unsigned int len, bool force_8bit) ··· 301 297 302 298 /** 303 299 * omap_nand_data_out_pref - NAND data out using Write Posting engine 300 + * @chip: NAND chip 301 + * @buf: input buffer that is sent to NAND 302 + * @len: length of transfer 303 + * @force_8bit: force 8-bit transfers 304 304 */ 305 305 static void omap_nand_data_out_pref(struct nand_chip *chip, 306 306 const void *buf, unsigned int len, ··· 448 440 449 441 /** 450 442 * omap_nand_data_in_dma_pref - NAND data in using DMA and Prefetch 443 + * @chip: NAND chip 444 + * @buf: output buffer where NAND data is placed into 445 + * @len: length of transfer 446 + * @force_8bit: force 8-bit transfers 451 447 */ 452 448 static void omap_nand_data_in_dma_pref(struct nand_chip *chip, void *buf, 453 449 unsigned int len, bool force_8bit) ··· 472 460 473 461 /** 474 462 * omap_nand_data_out_dma_pref - NAND data out using DMA and write posting 463 + * @chip: NAND chip 464 + * @buf: input buffer that is sent to NAND 465 + * @len: length of transfer 466 + * @force_8bit: force 8-bit transfers 475 467 */ 476 468 static void omap_nand_data_out_dma_pref(struct nand_chip *chip, 477 469 const void *buf, unsigned int len,