Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4791547pxj; Wed, 12 May 2021 13:23:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLHzI/5V8R7ID+8Y9NZE15+OXjtno4XUbX5twzfcM6sFoooHqaYf5dJeimzlGiK9C91doM X-Received: by 2002:a05:6808:3a3:: with SMTP id n3mr24001252oie.157.1620850982476; Wed, 12 May 2021 13:23:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620850982; cv=none; d=google.com; s=arc-20160816; b=IlcUfEC8dOHhYoo+Tyxp98cdxq+Ky1QoXme2TXW183LW+Us0t+hn6GNI8KrAHvPju+ CwLTNGfzjFUfSMUk5hhejyAxgYZXpx9RmOkR1oWhKPbK96UDhCidVRYuB1kZDvvlNglk Q30iJysQ6YUL43Zt9q/YcSn+l79WnC9028/IHmTTS0HvF1pOwBAca4YA6SgUqXBD4vhQ XdpCP+MJBap0AjG1HWKIHkvc3XE8tX47B4/jgCi1ZuiRjo0iHdlZZrjNjqCbW0G66d5Y unLFuYV6pyrCKzngaUom9LI4aFLgcjZW9QE9jR76Rkw0nxiHSJNBj+sCjHvBv+PfW6Tu nBcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=A0THslFn0Kgu1sWjV5jie9dbcrzud4y09B5VHnV/OvU=; b=Px2rj0LLs0CDiKq8tdQ+Ri2jdT99PoVDmOOEjaDzAfHSkvdaPg124NxvoZ8C+p1RkB 1X7q+ao8893NKhefsGQelbfw/RG4eHOADQMt5X1pa28/BfLeswk8nWKbOrX2Hc/M7sqr SXg+ydP62soWamH86/PwXBLbmXiZMDcmRpDvU1BzZEHgxXynxllNYULeOIYmGZ114f4P kADmD1GhFg2LMNYuCLOHnwTxLo4BGN7GLh/WaWQM6cYm01F8l7jKGyAnpyOo+YJgGvCK FmfzGjjhQFP4bA/4YpTzJ+M32PUExzRyimTE1Uslvl6U0PfZmxbil+6uFJXiWtDxbk0o Rddw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h4G79n5j; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w24si637332ott.37.2021.05.12.13.21.49; Wed, 12 May 2021 13:23:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h4G79n5j; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241542AbhELUN6 (ORCPT + 99 others); Wed, 12 May 2021 16:13:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354023AbhELSQQ (ORCPT ); Wed, 12 May 2021 14:16:16 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B828C061349; Wed, 12 May 2021 11:13:31 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id 82so31836622yby.7; Wed, 12 May 2021 11:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A0THslFn0Kgu1sWjV5jie9dbcrzud4y09B5VHnV/OvU=; b=h4G79n5j2Q9e7O4qyc9sCxuAqxg6oZDNwMRBD3YMzPGfOfL4TrCzbmi3KH9dx8Ykom o/Pt46mKPb43l6HMaeofOZRMmgOMrQas8OqcGBQcPBIMwoas46b0iL2IJ8mX8EnGC0CR G6XLTEpCjujxGJiKOX0E2tgtush+4/TxKjmrfP5eGM0qQs5Ndq220Oo4VYbUuDepsHYp wpwhpn1EcYkqAhq8H0Y4MYylRcWF4zPnjsYwZZ4vzMecmknR9xse61peQ066iRj6TjrD OUtu7Bn537FO7nz7E6LwGgJx0QpGUe734RHb7rvvbxTo9s7LwppQmfj9VxSNGOV39nw1 o80Q== 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=A0THslFn0Kgu1sWjV5jie9dbcrzud4y09B5VHnV/OvU=; b=KHuRhPJWO9lNosgawmjF+MCqCWHXPZCArefoO6gJTTZJ5tBJ32QK87KWtzvke9Ayj0 YCEn7A9Url6dEhOEQk8k0HgbTAr3qQo7Fx578/EZ/v1lOAqCnqzCSmIpTpb/Szj3iH9k 5GaCSZ9Qcmz3JXZheQqdKrMQNgG9ARejDclTkINaAa4QUA9QwQSGyyhEZvTPmbwJF5Ss EmEtJVzayb1kt49b2zFcv+a462kTEZW6exMruvWFwDNd7V3Dumyxf8Ci/srkC7Repd49 LpZ8lqPNpn/5vTanTVyKp4PYIF6tNZXdkzuqCl80MD4JaSM0y73C/pKQJBbmk+g4Dc7q wiuA== X-Gm-Message-State: AOAM5330AmsZHB0suHaAf22uE3OeVFBexY9aWdpajq7pAaHcH65UMRqz hQkdYU02ZPGh1gRrcC7jgjQZ9xJC0mWbcMG0PDJ6rt6A X-Received: by 2002:a25:d0cb:: with SMTP id h194mr37698941ybg.408.1620843210333; Wed, 12 May 2021 11:13:30 -0700 (PDT) MIME-Version: 1.0 References: <20210512133407.52330-1-szymon.janc@codecoup.pl> In-Reply-To: From: Luiz Augusto von Dentz Date: Wed, 12 May 2021 11:13:19 -0700 Message-ID: Subject: Re: [PATCH] Bluetooth: Remove spurious error message To: Kai Krakow Cc: Szymon Janc , "linux-bluetooth@vger.kernel.org" , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Kai, On Wed, May 12, 2021 at 11:06 AM Kai Krakow wrote: > > Hi Szymon! > > Am Mi., 12. Mai 2021 um 15:34 Uhr schrieb Szymon Janc : > > > > Even with rate limited reporting this is very spammy and since > > it is remote device that is providing bogus data there is no > > need to report this as error. > > > [...] > > [72464.546319] Bluetooth: hci0: advertising data len corrected > > [72464.857318] Bluetooth: hci0: advertising data len corrected > > [72465.163332] Bluetooth: hci0: advertising data len corrected > > [72465.278331] Bluetooth: hci0: advertising data len corrected > > [72465.432323] Bluetooth: hci0: advertising data len corrected > > [72465.891334] Bluetooth: hci0: advertising data len corrected > > [72466.045334] Bluetooth: hci0: advertising data len corrected > > [72466.197321] Bluetooth: hci0: advertising data len corrected > > [72466.340318] Bluetooth: hci0: advertising data len corrected > > [72466.498335] Bluetooth: hci0: advertising data len corrected > > [72469.803299] bt_err_ratelimited: 10 callbacks suppressed > > > > Signed-off-by: Szymon Janc > > Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=203753 > > Cc: stable@vger.kernel.org > > --- > > net/bluetooth/hci_event.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c > > index 5e99968939ce..abdc44dc0b2f 100644 > > --- a/net/bluetooth/hci_event.c > > +++ b/net/bluetooth/hci_event.c > > @@ -5476,8 +5476,6 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr, > > > > /* Adjust for actual length */ > > if (len != real_len) { > > - bt_dev_err_ratelimited(hdev, "advertising data len corrected %u -> %u", > > - len, real_len); > > len = real_len; > > } > > This renders the "if" quite useless since it now always ensures len = > real_len and nothing else. At this point, the "if" can be removed, and > len can be set unconditionally. Depending on the further context of > the patch, destinction between real_len and len may not be needed at > all and real_len could be renamed to len, ditching the unused original > which is potentially bogus data anyways according to your commit > description. That was introduced to truncate the len, the patch just removes the logging but it does keep this logic, if you want to understand the reason for it just use git blame and look at the history. -- Luiz Augusto von Dentz