All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/staging/goldfish/goldfish_nand.c: Fixed Coding style Warnings.
@ 2017-03-15  3:53 mshan
  2017-03-15  8:37 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: mshan @ 2017-03-15  3:53 UTC (permalink / raw)
  To: gregkh, mohsinshan1k, devel, linux-kernel

Embedded function names are less appropriate to use when
refactoring, can cause function renaming.  Prefer the use
of "%s", __func__ to embedded function names

Signed-off-by: mshan <mohsinshan1k@gmail.com>
---
 drivers/staging/goldfish/goldfish_nand.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c
index 76d60ee..8f92ff4 100644
--- a/drivers/staging/goldfish/goldfish_nand.c
+++ b/drivers/staging/goldfish/goldfish_nand.c
@@ -114,8 +114,8 @@ static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr)
 	len = len / mtd->writesize * (mtd->writesize + mtd->oobsize);
 
 	if (goldfish_nand_cmd(mtd, NAND_CMD_ERASE, ofs, len, NULL) != len) {
-		pr_err("goldfish_nand_erase: erase failed, start %llx, len %x, dev_size %llx, erase_size %x\n",
-		       ofs, len, mtd->size, mtd->erasesize);
+		pr_err("%s: erase failed, start %llx, len %x, dev_size %llx, erase_size %x\n",
+		       __func__, ofs, len, mtd->size, mtd->erasesize);
 		return -EIO;
 	}
 
@@ -125,8 +125,8 @@ static int goldfish_nand_erase(struct mtd_info *mtd, struct erase_info *instr)
 	return 0;
 
 invalid_arg:
-	pr_err("goldfish_nand_erase: invalid erase, start %llx, len %x, dev_size %llx, erase_size %x\n",
-	       ofs, len, mtd->size, mtd->erasesize);
+	pr_err("%s: invalid erase, start %llx, len %x, dev_size %llx, erase_size %x\n",
+	       __func__, ofs, len, mtd->size, mtd->erasesize);
 	return -EINVAL;
 }
 
@@ -254,8 +254,8 @@ static int goldfish_nand_block_isbad(struct mtd_info *mtd, loff_t ofs)
 	return goldfish_nand_cmd(mtd, NAND_CMD_BLOCK_BAD_GET, ofs, 0, NULL);
 
 invalid_arg:
-	pr_err("goldfish_nand_block_isbad: invalid arg, ofs %llx, dev_size %llx, write_size %x\n",
-	       ofs, mtd->size, mtd->writesize);
+	pr_err("%s: invalid arg, ofs %llx, dev_size %llx, write_size %x\n",
+	       __func__, ofs, mtd->size, mtd->writesize);
 	return -EINVAL;
 }
 
@@ -277,8 +277,8 @@ static int goldfish_nand_block_markbad(struct mtd_info *mtd, loff_t ofs)
 	return 0;
 
 invalid_arg:
-	pr_err("goldfish_nand_block_markbad: invalid arg, ofs %llx, dev_size %llx, write_size %x\n",
-	       ofs, mtd->size, mtd->writesize);
+	pr_err("%s: invalid arg, ofs %llx, dev_size %llx, write_size %x\n",
+	       __func__, ofs, mtd->size, mtd->writesize);
 	return -EINVAL;
 }
 
-- 
2.7.4

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

* Re: [PATCH] drivers/staging/goldfish/goldfish_nand.c: Fixed Coding style Warnings.
  2017-03-15  3:53 [PATCH] drivers/staging/goldfish/goldfish_nand.c: Fixed Coding style Warnings mshan
@ 2017-03-15  8:37 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2017-03-15  8:37 UTC (permalink / raw)
  To: mshan; +Cc: gregkh, mohsinshan1k, devel, linux-kernel

Fix the subject.  The subsystem prefix is wrong and it's too vague.
Change it to:

[PATCH] Staging: goldfish: use __func__ instead of embedded function names


On Tue, Mar 14, 2017 at 08:53:50PM -0700, mshan wrote:
> Embedded function names are less appropriate to use when
> refactoring, can cause function renaming.  Prefer the use
> of "%s", __func__ to embedded function names
> 
> Signed-off-by: mshan <mohsinshan1k@gmail.com>

Please use your legal/formal name as if you were signing a legal
document.  Also change the From header on your email to match.

regards,
dan carpenter

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

end of thread, other threads:[~2017-03-15  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15  3:53 [PATCH] drivers/staging/goldfish/goldfish_nand.c: Fixed Coding style Warnings mshan
2017-03-15  8:37 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.