diff for duplicates of <20160413094440.1b883491@bbrezillon> diff --git a/a/1.txt b/N1/1.txt index 2763e74..48a8670 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -3,18 +3,22 @@ Hi, On Sat, 9 Apr 2016 12:50:35 +0300 Andy Shevchenko <andy.shevchenko@gmail.com> wrote: -> On Fri, Apr 8, 2016 at 2:13 PM, Rafał Miłecki <zajec5@gmail.com> wrote: +> On Fri, Apr 8, 2016 at 2:13 PM, Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com= +> wrote: > > 1) Use pr_fmt to keep messages consistent > > 2) Don't warn if kzalloc fails as it dumps stack on its own > > 3) Use %pR format for displaying whole resource to avoid: -> > warning: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘resource_size_t’ +> > warning: format =E2=80=98%08llx=E2=80=99 expects type =E2=80=98long lon= +g unsigned int=E2=80=99, but argument 2 has type =E2=80=98resource_size_t= +=E2=80=99 > > -> > Signed-off-by: Rafał Miłecki <zajec5@gmail.com> +> > Signed-off-by: Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com> > > --- > > drivers/mtd/nand/pasemi_nand.c | 9 ++++----- > > 1 file changed, 4 insertions(+), 5 deletions(-) > > -> > diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c +> > diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_n= +and.c > > index 63fcb8c..e8372b4 100644 > > --- a/drivers/mtd/nand/pasemi_nand.c > > +++ b/drivers/mtd/nand/pasemi_nand.c @@ -27,23 +31,27 @@ Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > #include <linux/slab.h> > > #include <linux/module.h> > > #include <linux/mtd/mtd.h> -> > @@ -112,8 +114,6 @@ static int pasemi_nand_probe(struct platform_device *ofdev) +> > @@ -112,8 +114,6 @@ static int pasemi_nand_probe(struct platform_device= + *ofdev) > > /* Allocate memory for MTD device structure and private data */ -> > chip = kzalloc(sizeof(struct nand_chip), GFP_KERNEL); +> > chip =3D kzalloc(sizeof(struct nand_chip), GFP_KERNEL); > > if (!chip) { > > - printk(KERN_WARNING -> > - "Unable to allocate PASEMI NAND MTD device structure\n"); -> > err = -ENOMEM; +> > - "Unable to allocate PASEMI NAND MTD device struc= +ture\n"); +> > err =3D -ENOMEM; > > goto out; > > } -> > @@ -163,13 +163,12 @@ static int pasemi_nand_probe(struct platform_device *ofdev) +> > @@ -163,13 +163,12 @@ static int pasemi_nand_probe(struct platform_devi= +ce *ofdev) > > } > > > > if (mtd_device_register(pasemi_nand_mtd, NULL, 0)) { -> > - printk(KERN_ERR "pasemi_nand: Unable to register MTD device\n"); +> > - printk(KERN_ERR "pasemi_nand: Unable to register MTD de= +vice\n"); > > + pr_err("Unable to register MTD device\n"); -> -> And why not to use dev_err(&ofdev->dev, …); ? +>=20 +> And why not to use dev_err(&ofdev->dev, =E2=80=A6); ? Yep, I think it's better to use dev_err(). @@ -51,7 +59,7 @@ Best Regards, Boris --- +--=20 Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com diff --git a/a/content_digest b/N1/content_digest index 2fee00c..4359120 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -22,18 +22,22 @@ "On Sat, 9 Apr 2016 12:50:35 +0300\n" "Andy Shevchenko <andy.shevchenko@gmail.com> wrote:\n" "\n" - "> On Fri, Apr 8, 2016 at 2:13 PM, Rafa\305\202 Mi\305\202ecki <zajec5@gmail.com> wrote:\n" + "> On Fri, Apr 8, 2016 at 2:13 PM, Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com=\n" + "> wrote:\n" "> > 1) Use pr_fmt to keep messages consistent\n" "> > 2) Don't warn if kzalloc fails as it dumps stack on its own\n" "> > 3) Use %pR format for displaying whole resource to avoid:\n" - "> > warning: format \342\200\230%08llx\342\200\231 expects type \342\200\230long long unsigned int\342\200\231, but argument 2 has type \342\200\230resource_size_t\342\200\231\n" + "> > warning: format =E2=80=98%08llx=E2=80=99 expects type =E2=80=98long lon=\n" + "g unsigned int=E2=80=99, but argument 2 has type =E2=80=98resource_size_t=\n" + "=E2=80=99\n" "> >\n" - "> > Signed-off-by: Rafa\305\202 Mi\305\202ecki <zajec5@gmail.com>\n" + "> > Signed-off-by: Rafa=C5=82 Mi=C5=82ecki <zajec5@gmail.com>\n" "> > ---\n" "> > drivers/mtd/nand/pasemi_nand.c | 9 ++++-----\n" "> > 1 file changed, 4 insertions(+), 5 deletions(-)\n" "> >\n" - "> > diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c\n" + "> > diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_n=\n" + "and.c\n" "> > index 63fcb8c..e8372b4 100644\n" "> > --- a/drivers/mtd/nand/pasemi_nand.c\n" "> > +++ b/drivers/mtd/nand/pasemi_nand.c\n" @@ -46,23 +50,27 @@ "> > #include <linux/slab.h>\n" "> > #include <linux/module.h>\n" "> > #include <linux/mtd/mtd.h>\n" - "> > @@ -112,8 +114,6 @@ static int pasemi_nand_probe(struct platform_device *ofdev)\n" + "> > @@ -112,8 +114,6 @@ static int pasemi_nand_probe(struct platform_device=\n" + " *ofdev)\n" "> > /* Allocate memory for MTD device structure and private data */\n" - "> > chip = kzalloc(sizeof(struct nand_chip), GFP_KERNEL);\n" + "> > chip =3D kzalloc(sizeof(struct nand_chip), GFP_KERNEL);\n" "> > if (!chip) {\n" "> > - printk(KERN_WARNING\n" - "> > - \"Unable to allocate PASEMI NAND MTD device structure\\n\");\n" - "> > err = -ENOMEM;\n" + "> > - \"Unable to allocate PASEMI NAND MTD device struc=\n" + "ture\\n\");\n" + "> > err =3D -ENOMEM;\n" "> > goto out;\n" "> > }\n" - "> > @@ -163,13 +163,12 @@ static int pasemi_nand_probe(struct platform_device *ofdev)\n" + "> > @@ -163,13 +163,12 @@ static int pasemi_nand_probe(struct platform_devi=\n" + "ce *ofdev)\n" "> > }\n" "> >\n" "> > if (mtd_device_register(pasemi_nand_mtd, NULL, 0)) {\n" - "> > - printk(KERN_ERR \"pasemi_nand: Unable to register MTD device\\n\");\n" + "> > - printk(KERN_ERR \"pasemi_nand: Unable to register MTD de=\n" + "vice\\n\");\n" "> > + pr_err(\"Unable to register MTD device\\n\");\n" - "> \n" - "> And why not to use dev_err(&ofdev->dev, \342\200\246); ?\n" + ">=20\n" + "> And why not to use dev_err(&ofdev->dev, =E2=80=A6); ?\n" "\n" "Yep, I think it's better to use dev_err().\n" "\n" @@ -70,9 +78,9 @@ "\n" "Boris\n" "\n" - "-- \n" + "--=20\n" "Boris Brezillon, Free Electrons\n" "Embedded Linux and Kernel engineering\n" http://free-electrons.com -b4919c5ebada0ba8e154f6e123dbe19c6d443578f202dcb71da248b09178f553 +9955d7c03721c02bad9d25bd7c2f9deb56f3792e40cdf144a9364ecb12f4ae8e
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.