From: Shreeya Patel <shreeya.patel23498@gmail.com>
To: Boris Brezillon <boris.brezillon@bootlin.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Richard Weinberger <richard@nod.at>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
outreachy-kernel <outreachy-kernel@googlegroups.com>,
linux-mtd@lists.infradead.org,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Subject: Re: [Outreachy kernel] Re: [PATCH NAND 0/5] Replace printk statements with pr_*macros
Date: Mon, 19 Feb 2018 02:00:42 +0530 [thread overview]
Message-ID: <1518985842.22737.1.camel@gmail.com> (raw)
In-Reply-To: <20180218210950.30fe9310@bbrezillon>
On Sun, 2018-02-18 at 21:09 +0100, Boris Brezillon wrote:
> Hi Shreeya,
>
> Please try to keep everyone in the loop when you reply to an email.
> All
> discussions should happen publicly to keep everyone aware of the
> progress and let other developers/maintainers take part to the
> discussion if they have something to add.
I'll keep this in mind.
>
>
> On Sun, 18 Feb 2018 23:56:05 +0530
> Shreeya Patel <shreeya.patel23498@gmail.com> wrote:
>
> >
> > On Sun, 2018-02-18 at 19:13 +0100, Boris Brezillon wrote:
> > >
> > > On Sun, 18 Feb 2018 23:31:10 +0530
> > > Shreeya Patel <shreeya.patel23498@gmail.com> wrote:
> > >
> > > >
> > > >
> > > > On Fri, 2018-02-16 at 18:48 +0100, Boris Brezillon wrote:
> > > >
> > > > Hello Sir,
> > > >
> > > > >
> > > > >
> > > > > On Fri, 16 Feb 2018 14:26:56 -0300
> > > > > Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 16 February 2018 at 14:23, Julia Lawall <julia.lawall@li
> > > > > > p6.f
> > > > > > r>
> > > > > > wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Fri, 16 Feb 2018, Ezequiel Garcia wrote:
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Hi Shreeya,
> > > > > > > >
> > > > > > > > Thanks for the contribution.
> > > > > > > >
> > > > > > > > On 16 February 2018 at 13:50, Shreeya Patel
> > > > > > > > <shreeya.patel23498@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > This patchset removes all the log levels i.e.
> > > > > > > > > KERN_WARN,
> > > > > > > > > KERN_NOTICE, KERN_ERR, KERN_INFO, KERN_DEBUG used in
> > > > > > > > > the
> > > > > > > > > printk
> > > > > > > > > statements and replaces the printk statements with
> > > > > > > > > appropriate
> > > > > > > > > pr_*macros.
> > > > > > > > > According to the kernel coding style, pr_*macro is
> > > > > > > > > the
> > > > > > > > > preferred
> > > > > > > > > way to print the message.
> > > > > > > > >
> > > > > > > > So, two things to begin with.
> > > > > > > >
> > > > > > > > First of all, despite this contribution being part of
> > > > > > > > outreachy,
> > > > > > > > I believe you can include mailing lists in your case.
> > > > > > > >
> > > > > > > > In other words, don't use the "nol" option in
> > > > > > > > get_maintainer
> > > > > > > > script and Cc the MTD mailing list: linux-mtd at
> > > > > > > > lists.infradead.org.
> > > > > > > Shouldn't the dev_* functions also be usable?
> > > > > > >
> > > > > > Provided that:
> > > > > > 1. it's applicable, i.e. if in the context of a device.
> > > > > Yep, be careful with that. The MTD/NAND subsystem initializes
> > > > > mtd->dev.name quite late, so it's not safe to use &mtd->dev
> > > > > with
> > > > > dev_<loglevel>(). Note that you can use the NAND controller
> > > > > pdev-
> > > > > >
> > > > > > dev
> > > > > if
> > > > > available.
> > > > I would like to ask here that what will be the benefit or good
> > > > cause if
> > > > I use pdev->dev?
> > > > How is it different from others?
> > > Well, pdev->dev is guaranteed to be properly initialized when you
> > > pass
> > > it to dev_<loglevel>(). This is not the case with mtd->dev which
> > > is
> > > initialized in mtd_device_register(), but the NAND controller
> > > driver
> > > usually does some operations on the NAND device before reaching
> > > this
> > > point (reading the ID, reading the bad block markers to determine
> > > which
> > > blocks are bad, ...).
> > >
> > Thanks for making me understand.
> >
> > >
> > > Anyway, I think it's better if you first do the
> > > s/printk(KERN_<LOGLEVEL>(/pr_<loglevel>(/ replacement. Replacing
> > > pr_xxx
> > > by dev_xxx is something we can do afterwards.
> > I've created one patch where I have replaced printk
> > with dev_* and used pdev->dev.
> Okay. pdev->dev is not always directly accessible so doing
> s/printk(KERN_<LOGLEVEL>/dev_<loglevel>(&pdev->dev, / is likely to
> cause build failures. But I guess you compile-tested the changes
> you're
> about to submit.
Yes, it wasn't directly accessible at some places.
Also, I was unable to compile ams-delta.c file.
I am working on it right now as I will have to cross compile for arm.
Thanks
>
> Regards,
>
> Boris
>
>
next prev parent reply other threads:[~2018-02-18 20:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 16:50 [PATCH NAND 0/5] Replace printk statements with pr_*macros Shreeya Patel
2018-02-16 16:55 ` [PATCH NAND 1/5] mtd/nand: Replace printk with pr_warn Shreeya Patel
2018-02-16 17:08 ` [Outreachy kernel] " Julia Lawall
2018-02-16 17:52 ` Shreeya Patel
2018-02-16 16:57 ` [PATCH NAND 2/5] mtd/nand: Replace printk with pr_notice Shreeya Patel
2018-02-16 17:00 ` [PATCH NAND 3/5] mtd/nand: Replace printk with pr_err Shreeya Patel
2018-02-16 17:03 ` [PATCH NAND 4/5] mtd/nand: Replace printk with pr_info Shreeya Patel
2018-02-16 17:08 ` [PATCH NAND 5/5] mtd/nand: Replace printk with pr_debug Shreeya Patel
2018-02-16 17:19 ` [PATCH NAND 0/5] Replace printk statements with pr_*macros Richard Weinberger
2018-02-16 17:24 ` Ezequiel Garcia
2018-02-16 17:25 ` Ezequiel Garcia
2018-02-16 17:58 ` Richard Weinberger
2018-02-16 18:15 ` Boris Brezillon
2018-02-16 18:48 ` [Outreachy kernel] " Greg KH
2018-02-16 18:54 ` Julia Lawall
2018-02-16 18:00 ` Boris Brezillon
2018-02-16 17:19 ` Ezequiel Garcia
2018-02-16 17:23 ` [Outreachy kernel] " Julia Lawall
2018-02-16 17:26 ` Ezequiel Garcia
2018-02-16 17:48 ` Boris Brezillon
2018-02-16 17:59 ` Shreeya Patel
[not found] ` <1518976870.2784.4.camel@gmail.com>
[not found] ` <20180218191347.76f4a287@bbrezillon>
[not found] ` <1518978365.2969.6.camel@gmail.com>
2018-02-18 20:09 ` Boris Brezillon
2018-02-18 20:20 ` Shreeya Patel
2018-02-18 20:30 ` Shreeya Patel [this message]
2018-02-16 17:35 ` Shreeya Patel
2018-02-16 17:45 ` Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1518985842.22737.1.camel@gmail.com \
--to=shreeya.patel23498@gmail.com \
--cc=boris.brezillon@bootlin.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=julia.lawall@lip6.fr \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.