From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Andrew Lunn <andrew@lunn.ch>,
Dominique Martinet <dominique.martinet@atmark-techno.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
Johan Hedberg <johan.hedberg@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
mizo@atmark-techno.com
Subject: Re: [RFC PATCH 2/2] bluetooth/hci_h4: add serdev support
Date: Tue, 8 Nov 2022 21:58:07 +0100 [thread overview]
Message-ID: <a8fe49f4-09f2-2507-e652-cbbb13ed8006@linaro.org> (raw)
In-Reply-To: <Y2q+TkZJOfXFYlBO@lunn.ch>
On 08/11/2022 21:38, Andrew Lunn wrote:
>> +static int h4_probe(struct serdev_device *serdev)
>> +{
>> + struct h4_device *h4dev;
>> + struct hci_uart *hu;
>> + int ret;
>> + u32 speed;
>> +
>> + h4dev = devm_kzalloc(&serdev->dev, sizeof(*h4dev), GFP_KERNEL);
>> + if (!h4dev)
>> + return -ENOMEM;
>> +
>> + hu = &h4dev->hu;
>> +
>> + hu->serdev = serdev;
>> + ret = device_property_read_u32(&serdev->dev, "max-speed", &speed);
>> + if (!ret) {
>> + /* h4 does not have any baudrate handling:
>> + * user oper speed from the start
>> + */
>> + hu->init_speed = speed;
>> + hu->oper_speed = speed;
>> + }
>> +
>> + serdev_device_set_drvdata(serdev, h4dev);
>> + dev_info(&serdev->dev, "h4 device registered.\n");
>
> It is considered bad practice to spam the logs like this. dev_dbg().
>
>> +
>> + return hci_uart_register_device(hu, &h4p);
>> +}
>> +
>> +static void h4_remove(struct serdev_device *serdev)
>> +{
>> + struct h4_device *h4dev = serdev_device_get_drvdata(serdev);
>> +
>> + dev_info(&serdev->dev, "h4 device unregistered.\n");
>
> dev_dbg().
I would say none of them (the same in probe). Any prints in probe/remove
paths are considered redundant, as core already gives that information.
Best regards,
Krzysztof
prev parent reply other threads:[~2022-11-08 20:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 5:55 [RFC PATCH 0/2] Add serdev support for hci h4 Dominique Martinet
2022-11-08 5:55 ` [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4 Dominique Martinet
2022-11-08 11:37 ` Krzysztof Kozlowski
2022-11-08 23:54 ` Dominique Martinet
2022-11-09 7:29 ` Dominique Martinet
2022-11-09 22:00 ` Rob Herring
2022-11-10 7:37 ` Dominique Martinet
2022-11-10 16:27 ` Rob Herring
2022-11-08 12:54 ` Rob Herring
2022-11-08 13:59 ` Rob Herring
2022-11-08 5:55 ` [RFC PATCH 2/2] bluetooth/hci_h4: add serdev support Dominique Martinet
2022-11-08 20:38 ` Andrew Lunn
2022-11-08 20:58 ` Krzysztof Kozlowski [this message]
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=a8fe49f4-09f2-2507-e652-cbbb13ed8006@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dominique.martinet@atmark-techno.com \
--cc=edumazet@google.com \
--cc=johan.hedberg@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=mizo@atmark-techno.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).