From: <Conor.Dooley@microchip.com>
To: <lijessen2016@gmail.com>, <wsa@kernel.org>
Cc: <linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<root@LAPTOP-706CEGJT.localdomain>
Subject: Re: [PATCH] Print some info into ring-buffer during loading
Date: Sun, 19 Jun 2022 10:59:44 +0000 [thread overview]
Message-ID: <9b94e885-be5f-3548-67ed-d79c6e7c22e0@microchip.com> (raw)
In-Reply-To: <20220619083207.749-1-root@LAPTOP-706CEGJT.localdomain>
On 19/06/2022 09:32, root wrote:
> ---
Hey Jessen Li/Jason-Lee,
(I hope one of those is your name, sorry if it isn't - just feels weird
addressing a username like "root" haha.
Maybe you already know this, but adding pr_info()s is not generally a
useful change. You should check out kernel newbies [0] - I think they
direct people towards starting kernel development in drivers/staging
where there is a lot of low hanging fruit for new developers.
Also, it might be of use to you to check out the guidelines for writing
commit messages before you go any further [1].
Hope that helps & good luck!
Conor.
[0] https://kernelnewbies.org/FirstKernelPatch
[1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html#the-canonical-patch-format
> drivers/i2c/i2c-core-base.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index d43db2c3876e..8e127ff3e32e 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -469,6 +469,8 @@ static int i2c_device_probe(struct device *dev)
> struct i2c_driver *driver;
> int status;
>
> + pr_info("I have changed i2c device driver\n");
> +
> if (!client)
> return 0;
>
> @@ -1829,6 +1831,7 @@ int i2c_for_each_dev(void *data, int (*fn)(struct device *dev, void *data))
> int res;
>
> mutex_lock(&core_lock);
> + pr_info("i2c_for_each_dev: before bus_for_each_dev\n");
> res = bus_for_each_dev(&i2c_bus_type, NULL, data, fn);
> mutex_unlock(&core_lock);
>
> @@ -1838,8 +1841,10 @@ EXPORT_SYMBOL_GPL(i2c_for_each_dev);
>
> static int __process_new_driver(struct device *dev, void *data)
> {
> + pr_info("Enter process_new_driver\n");
> if (dev->type != &i2c_adapter_type)
> return 0;
> + pr_info("__process_new_driver, before i2c_do_add_adapter\n");
> return i2c_do_add_adapter(data, to_i2c_adapter(dev));
> }
>
> @@ -1860,13 +1865,16 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
> driver->driver.owner = owner;
> driver->driver.bus = &i2c_bus_type;
> INIT_LIST_HEAD(&driver->clients);
> -
> + pr_info("i2c driver name is [%s] before driver_register\n", driver->driver.name);
> /* When registration returns, the driver core
> * will have called probe() for all matching-but-unbound devices.
> */
> res = driver_register(&driver->driver);
> - if (res)
> + if (res){
> + pr_info("i2c driver name is [%s], res is [%d]\n", driver->driver.name, res);
> return res;
> + }
> + pr_info("i2c driver name is [%s], after driver_register\n", driver->driver.name);
>
> pr_debug("driver [%s] registered\n", driver->driver.name);
>
> @@ -1933,7 +1941,7 @@ EXPORT_SYMBOL(i2c_clients_command);
> static int __init i2c_init(void)
> {
> int retval;
> -
> + pr_info("Jason-Lee: Entering i2c_init\n");
> retval = of_alias_get_highest_id("i2c");
>
> down_write(&__i2c_board_lock);
next prev parent reply other threads:[~2022-06-19 10:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-19 8:32 [PATCH] Print some info into ring-buffer during loading root
2022-06-19 10:59 ` Conor.Dooley [this message]
2022-06-19 11:08 ` Wolfram Sang
2022-06-19 11:17 ` Conor.Dooley
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=9b94e885-be5f-3548-67ed-d79c6e7c22e0@microchip.com \
--to=conor.dooley@microchip.com \
--cc=lijessen2016@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=root@LAPTOP-706CEGJT.localdomain \
--cc=wsa@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox