Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4696694pxj; Wed, 12 May 2021 11:06:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygYYV8iYHNxKIf/SUYJkA1AezDgaImPreHpQLHf6JQCjSOcpd++/nShhrtMgm8MisPV5W6 X-Received: by 2002:aca:5c87:: with SMTP id q129mr8080411oib.163.1620842813487; Wed, 12 May 2021 11:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620842813; cv=none; d=google.com; s=arc-20160816; b=0omAQhT9d2yFY874yTarTmbnuls5xttj+/h/gLKpm/CceZW9w/j+eOyc1J2k9X2kiL x+4EL020uV8JD1fWJjQPg0vFhBivMu16H6P15t7DND07UhFrBDqhfdkl87cexNag/U1A ufOPdqinsTBWKso1X3Q16YL/IjmqI2PskLFgEpztqCcqItg7WMDVeQxjQIGQ5NnvRft2 kcbMV+bN853uDgU9rMOnaMTW0q/qPNpPQyFwaY0vsE+1k5Cw4jRCXRZu8n/LXNZ7l5QM Lao3ZXtirJ4ZBvuZQ0WmFyTiBzZKJhiMpQ1RpqhK0u0t3hianaCZrb/GxEJmuN2FCFqC qoGA== 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=oLi1mcmerH+rqfkJPQwkDVKMnOt9Ah8OQvO3USWjQEY=; b=N98WbJpYrdS/yogF6CrKzgCMD3zgrnKYaTdDw9rvNyM3mnaydR6V8s8izB3BQkb49o pVEiwZtyyDdIl8RklwNeQPkzWZUHOfq2JsPWtic3ordo8y8CocQqRrWqiQM/zRzSHHji z4X9CM/4T0xT4zzEpBg1NlxPhe4rpafKscyY1lGfPE19FPljj49ZHs82Gpo7DdkeS7gz OuQ9sxntPmNOI2Y1O4ZdLi/oodWrP4FA6FAFvkE/pNzjK9pD0NIlG0Hu9fHD7b9rOmY5 LdHHWimTBlDkCm6M6opeDo14O03tNl4G/YVNPdQ1m4bytKlLwT/960be4S8oL661hPW8 GQBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kaishome.de header.s=google header.b=bxVsfcaI; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si519272otn.9.2021.05.12.11.06.21; Wed, 12 May 2021 11:06:53 -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=@kaishome.de header.s=google header.b=bxVsfcaI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241207AbhELR4w (ORCPT + 99 others); Wed, 12 May 2021 13:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345973AbhELRMg (ORCPT ); Wed, 12 May 2021 13:12:36 -0400 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 276C1C061347 for ; Wed, 12 May 2021 10:04:13 -0700 (PDT) Received: by mail-qt1-x835.google.com with SMTP id v4so8909899qtp.1 for ; Wed, 12 May 2021 10:04:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kaishome.de; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oLi1mcmerH+rqfkJPQwkDVKMnOt9Ah8OQvO3USWjQEY=; b=bxVsfcaIReSLEU7C0MlvMrpMUN3lsMcxPHZ4Y1tW64aZFFDXsZFchQniUUWNorTwgx CDcsJwx/la2s5+Nd6B8khChsWyR7YiVWkF4b+NpcCsRUjt5XNHiHdCuVjT+8wwmMkYxK JGKFSxLuqScOGIicifpEGqwbuSlxhhbrDG3Bs= 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=oLi1mcmerH+rqfkJPQwkDVKMnOt9Ah8OQvO3USWjQEY=; b=WrXSwH3MvE1VHQXT5Bio+vyIde80obczMAd7plMlzqzeHmxxIvU9w9XlS7u4N/Ibe/ UIqe/kjOAvV4fJh/y+sYgQZwXhidkV7YneIl4zyknh1O4xIqTvCHMsPYOGDVpuVnakaw L7aaGEuMf/dAsgZx9i1JpnVXbU4/Xv4vI/xxYxmvuyW1w+jYgZHk8BMJI6j0PVDtg3pF gEUgsywvMl2wA9JmZ5sa25bSbV3MkPeRNcNEhMOGnxGyBZCyBAnC8xv6pKCpvp5w4hht 91zhx5ykB7KGGG1hLKljJg2Ck0MT7JM5yyeQ73Z/fLnF/jHywEScVGSruVaqhSYJdD5t Gb7g== X-Gm-Message-State: AOAM530+4dhIxhDCs6EV84w5CuGM8BqY2wmR7JUpFXFRrjE3HXMDapd+ zbq1DoAx2Ht14nMDpa7Wjfe7TQdgaTqkMQ+PJNKw8Q== X-Received: by 2002:ac8:7355:: with SMTP id q21mr18042001qtp.383.1620839052362; Wed, 12 May 2021 10:04:12 -0700 (PDT) MIME-Version: 1.0 References: <20210512133407.52330-1-szymon.janc@codecoup.pl> In-Reply-To: <20210512133407.52330-1-szymon.janc@codecoup.pl> From: Kai Krakow Date: Wed, 12 May 2021 19:04:01 +0200 Message-ID: Subject: Re: [PATCH] Bluetooth: Remove spurious error message To: Szymon Janc Cc: 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 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. Regards, Kai