From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-6.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id F40077D2EF for ; Tue, 4 Jun 2019 16:58:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727795AbfFDQ65 (ORCPT ); Tue, 4 Jun 2019 12:58:57 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:43570 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727715AbfFDQ65 (ORCPT ); Tue, 4 Jun 2019 12:58:57 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 39DB028533D Message-ID: Subject: Re: [PATCH 03/10] mfd / platform: cros_ec: Miscellaneous character device to talk with the EC From: Ezequiel Garcia To: Greg Kroah-Hartman , Enric Balletbo i Serra Cc: linux-kernel@vger.kernel.org, gwendal@chromium.org, Guenter Roeck , Benson Leung , Lee Jones , kernel@collabora.com, dtor@chromium.org, Gustavo Pimentel , Randy Dunlap , Lorenzo Pieralisi , linux-doc@vger.kernel.org, Enno Luebbers , Guido Kiener , Thomas Gleixner , Kishon Vijay Abraham I , Jonathan Corbet , Wu Hao , Kate Stewart , Tycho Andersen , Gerd Hoffmann , Jilayne Lovejoy Date: Tue, 04 Jun 2019 13:58:38 -0300 In-Reply-To: <20190604155228.GB9981@kroah.com> References: <20190604152019.16100-1-enric.balletbo@collabora.com> <20190604152019.16100-4-enric.balletbo@collabora.com> <20190604155228.GB9981@kroah.com> Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org Hey Greg, > > + dev_info(&pdev->dev, "Created misc device /dev/%s\n", > > + data->misc.name); > > No need to be noisy, if all goes well, your code should be quiet. > I sometimes wonder about this being noise or not, so I will slightly hijack this thread for this discussion. >From a kernel developer point-of-view, or even from a platform developer or user with a debugging hat point-of-view, having a "device created" or "device registered" message is often very useful. In fact, I wish people would do this more often, so I don't have to deal with dynamic debug, or hack my way: diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c index 4589631798c9..473549b26bb2 100644 --- a/drivers/media/i2c/ov5647.c +++ b/drivers/media/i2c/ov5647.c @@ -603,7 +603,7 @@ static int ov5647_probe(struct i2c_client *client, if (ret < 0) goto error; - dev_dbg(dev, "OmniVision OV5647 camera driver probed\n"); + dev_info(dev, "OmniVision OV5647 camera driver probed\n"); return 0; error: media_entity_cleanup(&sd->entity); In some subsystems, it's even a behavior I'm more or less relying on: $ git grep v4l2_info.*registered drivers/media/ | wc -l 26 And on the downsides, I can't find much. It's just one little line, that is not even noticed unless you have logging turned on. Thanks, Ezequiel