Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp785754ybh; Tue, 10 Mar 2020 08:13:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtom3lZ1w3QCGwdWCmBBP/tW/yMw4Ju2WVGPSFDP10IkR3wYQQ8Eo4kvH7eMS9XeYlo9SdK X-Received: by 2002:aca:f591:: with SMTP id t139mr1456249oih.153.1583853219053; Tue, 10 Mar 2020 08:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583853219; cv=none; d=google.com; s=arc-20160816; b=RaPFlgs2CqIATzAjh4cSmY48fhU/9yqbkptUZzu7jJI6mwdI89LaUszrjtACUQmh36 qfq0r6EZ0kO1FA5apM/qDxJ+F5DcYQ4BtU/fcRDYScqf9/Tnn1i4x2nRTJcZoohqISqh OqRtKVpnq2QW8zJae13i2nFVgzKOtu1AGhpwcQBEc1G7hWts5lIS1wC6hyaksAfk6L1v aQeaHjihJonLQkTbkQNtqqanBDnNHw9wViWOB8M3bxITgT65ugfwPXqG/Yh2hZ5kTAXE j1bYncatz+aO8hzSBQAeGLg8k/9WadXySIFAXV1Lte/jEUw4BELm6xLIekp2Qt0nHngi r+lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Twlj9MHkzBY6DdkI/gne6oQUJzKoq7n7a5H7cHGS6i4=; b=qu8NlJeDB9t5zS4XXzBQWOHX5ntqeWrM7OYBo29lgrxKv8zEdY/IuW0Du9RUIiJYEP bkIiRS6ZFWoefJjq1Mhbt9mTQkqM5IU+wa9eNxK13rjvjR60ao44et3HWP+P9CfWRR0v Y9AadtznH5A4cvpKEJ4vFzxMvD1sZp6RAXBSkL3u/gejWaK7S8jVSOc9LaPvqMvS5slL IA3rmYRnN7H4Pt9d2ZyUg73pSaoBBPGHHU7vQfQwWADO++ead7mtc2o27H0ALb+MWci+ 7DBdtwj7gDwhAD5mcKXnX+FLJyyS1KPeKcoCs3jRVnbzr4QUSfd1rErIy7pwkFi++pwo +4Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="VOudf/Nq"; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v81si6167063oia.114.2020.03.10.08.13.25; Tue, 10 Mar 2020 08:13:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="VOudf/Nq"; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726582AbgCJPNR (ORCPT + 99 others); Tue, 10 Mar 2020 11:13:17 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41926 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726569AbgCJPNR (ORCPT ); Tue, 10 Mar 2020 11:13:17 -0400 Received: by mail-lj1-f195.google.com with SMTP id o10so7819134ljc.8 for ; Tue, 10 Mar 2020 08:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Twlj9MHkzBY6DdkI/gne6oQUJzKoq7n7a5H7cHGS6i4=; b=VOudf/NqcNhu9/Ob6m86j2u7lSUU8s9RXQlzHIdMWX/rzhy91kGjRwKNBjG5kYkIZe ipBL3ixnzvZMHxk/jp6EheLTAwImIXueXUuXYW/KhHN76J6rkziHDJEJqgksTcFnG0U9 og0zByWuN7R1GLysxCnXnT8zfaQ1MV7tmiqZCJqJTs3s3Ju7ktj3IuhzP2jsKyI9tePL R2TEm4oJO8PH94kaRv+pVl9PJiXZ3H61WrgMFE4ERTt99ia/iGaozFZ13nxcDkpuYY4P Ntz5Hu12dRbweeBizth+F8MYBqfxrvkcS5B6nKIbKI2kh03ZhcQRSRHofT5c+do8S7Do riTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Twlj9MHkzBY6DdkI/gne6oQUJzKoq7n7a5H7cHGS6i4=; b=NnEnE4VBTMKiIfHQQfQy/a9FPHStnVCLAcV4cPjANajO4d5Xo41H/0MVeqbbKSDlS/ FrQY8sLUL5Pp3boLDZU9lzq7q/5RoUX3KqSdp69f8s+BBVOqOyaQxn5V/W+UjAKAS2q5 tyjov7j6ELk6q7YbloHgBTR3e/1b+gzscsVCSPtg/CCwbZfG5XWzuC5UEXLuYNtdscjf etzRPhDijhacKTRl29bGaRLp2a0eKLcidf/xjwz1IL/UkH5L7uEJSUzokfLSS7UZGRlO z6seXqPdT3/Tsfc2jy3YLvUsxXk/8HjV7K29umPFH2t8NMYukstPFX5BlfLCq3Zk2hMc hfoA== X-Gm-Message-State: ANhLgQ2Dq0DTbkp+BuwNsXOWysyN8x8vQAHIGuop09Q4cgpLa0dGSJrS 5H5HcJj54xtPFqTMsPsUCGAJCU1pKZ2ST/Up9tVPH3KX X-Received: by 2002:a2e:890b:: with SMTP id d11mr13608651lji.79.1583853193448; Tue, 10 Mar 2020 08:13:13 -0700 (PDT) MIME-Version: 1.0 References: <20200309215723.442701-1-marcel@holtmann.org> In-Reply-To: <20200309215723.442701-1-marcel@holtmann.org> From: Alain Michaud Date: Tue, 10 Mar 2020 11:13:02 -0400 Message-ID: Subject: Re: [PATCH] Bluetooth: hci_h5: Switch from BT_ERR to bt_dev_err where possible To: Marcel Holtmann Cc: BlueZ Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel, On Mon, Mar 9, 2020 at 5:57 PM Marcel Holtmann wrote: > > All HCI device specific error messages shall use bt_dev_err to indicate > the device name in the message. > > Signed-off-by: Marcel Holtmann > --- > drivers/bluetooth/hci_h5.c | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > > diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c > index 812a5e975ec1..106c110efe56 100644 > --- a/drivers/bluetooth/hci_h5.c > +++ b/drivers/bluetooth/hci_h5.c > @@ -178,7 +178,7 @@ static void h5_peer_reset(struct hci_uart *hu) > { > struct h5 *h5 = hu->priv; > > - BT_ERR("Peer device has reset"); > + bt_dev_err(hu->hdev, "Peer device has reset"); > > h5->state = H5_UNINITIALIZED; > > @@ -438,21 +438,21 @@ static int h5_rx_3wire_hdr(struct hci_uart *hu, unsigned char c) > H5_HDR_LEN(hdr)); > > if (((hdr[0] + hdr[1] + hdr[2] + hdr[3]) & 0xff) != 0xff) { > - BT_ERR("Invalid header checksum"); > + bt_dev_err(hu->hdev, "Invalid header checksum"); > h5_reset_rx(h5); > return 0; > } > > if (H5_HDR_RELIABLE(hdr) && H5_HDR_SEQ(hdr) != h5->tx_ack) { > - BT_ERR("Out-of-order packet arrived (%u != %u)", > - H5_HDR_SEQ(hdr), h5->tx_ack); > + bt_dev_err(hu->hdev, "Out-of-order packet arrived (%u != %u)", > + H5_HDR_SEQ(hdr), h5->tx_ack); > h5_reset_rx(h5); > return 0; > } > > if (h5->state != H5_ACTIVE && > H5_HDR_PKT_TYPE(hdr) != HCI_3WIRE_LINK_PKT) { > - BT_ERR("Non-link packet received in non-active state"); > + bt_dev_err(hu->hdev, "Non-link packet received in non-active state"); > h5_reset_rx(h5); > return 0; > } > @@ -475,7 +475,7 @@ static int h5_rx_pkt_start(struct hci_uart *hu, unsigned char c) > > h5->rx_skb = bt_skb_alloc(H5_MAX_LEN, GFP_ATOMIC); > if (!h5->rx_skb) { > - BT_ERR("Can't allocate mem for new packet"); > + bt_dev_err(hu->hdev, "Can't allocate mem for new packet"); > h5_reset_rx(h5); > return -ENOMEM; > } > @@ -551,7 +551,7 @@ static int h5_recv(struct hci_uart *hu, const void *data, int count) > > if (h5->rx_pending > 0) { > if (*ptr == SLIP_DELIMITER) { > - BT_ERR("Too short H5 packet"); > + bt_dev_err(hu->hdev, "Too short H5 packet"); > h5_reset_rx(h5); > continue; > } > @@ -578,13 +578,13 @@ static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb) > struct h5 *h5 = hu->priv; > > if (skb->len > 0xfff) { > - BT_ERR("Packet too long (%u bytes)", skb->len); > + bt_dev_err(hu->hdev, "Packet too long (%u bytes)", skb->len); > kfree_skb(skb); > return 0; > } > > if (h5->state != H5_ACTIVE) { > - BT_ERR("Ignoring HCI data in non-active state"); > + bt_dev_err(hu->hdev, "Ignoring HCI data in non-active state"); > kfree_skb(skb); > return 0; > } > @@ -601,7 +601,7 @@ static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb) > break; > > default: > - BT_ERR("Unknown packet type %u", hci_skb_pkt_type(skb)); > + bt_dev_err(hu->hdev, "Unknown packet type %u", hci_skb_pkt_type(skb)); > kfree_skb(skb); > break; > } > @@ -657,7 +657,7 @@ static struct sk_buff *h5_prepare_pkt(struct hci_uart *hu, u8 pkt_type, > int i; > > if (!valid_packet_type(pkt_type)) { > - BT_ERR("Unknown packet type %u", pkt_type); > + bt_dev_err(hu->hdev, "Unknown packet type %u", pkt_type); > return NULL; > } > > @@ -734,7 +734,7 @@ static struct sk_buff *h5_dequeue(struct hci_uart *hu) > } > > skb_queue_head(&h5->unrel, skb); > - BT_ERR("Could not dequeue pkt because alloc_skb failed"); > + bt_dev_err(hu->hdev, "Could not dequeue pkt because alloc_skb failed"); > } > > spin_lock_irqsave_nested(&h5->unack.lock, flags, SINGLE_DEPTH_NESTING); > @@ -754,7 +754,7 @@ static struct sk_buff *h5_dequeue(struct hci_uart *hu) > } > > skb_queue_head(&h5->rel, skb); > - BT_ERR("Could not dequeue pkt because alloc_skb failed"); > + bt_dev_err(hu->hdev, "Could not dequeue pkt because alloc_skb failed"); > } > > unlock: > -- > 2.24.1 > LGTM.