Skip to content

Commit 8d4cd9c

Browse files
PoojaShamiligregkh
authored andcommitted
staging: mt29f_spinand: Replacing pr_info with dev_info after the call to devm_kzalloc
The function devm_kzalloc has a first argument of type struct device *. This is the type of argument required by printing functions such as dev_info, dev_err, etc. Thus, functions like pr_info should not normally be used after a call to devm_kzalloc. Thus, all pr_info occurances are replaced with dev_info function calls. This was done using Coccinelle, the patch being: @@ expression E1,E2; expression list args; @@ E1 = devm_kzalloc(E2, ...); <... - pr_info( + dev_info(E2, args); ...> Signed-off-by: G Pooja Shamili <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f75baf8 commit 8d4cd9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/staging/mt29f_spinand/mt29f_spinand.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,8 @@ static int spinand_probe(struct spi_device *spi_nand)
893893
#else
894894
chip->ecc.mode = NAND_ECC_SOFT;
895895
if (spinand_disable_ecc(spi_nand) < 0)
896-
pr_info("%s: disable ecc failed!\n", __func__);
896+
dev_info(&spi_nand->dev, "%s: disable ecc failed!\n",
897+
__func__);
897898
#endif
898899

899900
nand_set_flash_node(chip, spi_nand->dev.of_node);

0 commit comments

Comments
 (0)