Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7777867ybi; Mon, 22 Jul 2019 20:34:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwecGqB59xokf5b3MSgwLKIUaMa8HLVeUoQmBvEymrs055zY91220oCnmB7GRZj5lb0cj2W X-Received: by 2002:a63:714a:: with SMTP id b10mr40988925pgn.25.1563852864303; Mon, 22 Jul 2019 20:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563852864; cv=none; d=google.com; s=arc-20160816; b=jNuqtdxcciPh/g0eaIhBVQoGiJnQPYHY0O9pUTQI8ksYxXAw+1YKbbg/gEzT1lzsQF 4MmtcRRGjF/hS4sa8xl82f4c/gvRwsrp1oDKmOgMfLpUv6lEcvli8CYjl4qTmkHx1TCm AQxwkCpEZwgLeRM+Redql/UHiWtvMmLeV18I1sLZhrCydgN57ml3tfaCoIjy4IDu3p/c uVR/V/whpdfoOrJ9U5MF2hhQ6TcN9lwVK/lF0ORSF1AD+zUVdYkV4BzPJ09sxIvDG08F cEhnj4F9d2TVSJaqR+y2cMqL+v3zSjCf6V1cOpVX4LC9sYA1Dq60RELpxGF5JSGYg44Q NMaA== 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=DKEAhS/uikfS3tuGBnrF3tOxR8a7NEWxciPtJNbuB4I=; b=reat15VzCqhm4KuSaw6Y0L5XcAvHEdYpnEQP5f46Z4tNqze9sL8EalT1T7UMixYMBa MsykCh3iE3r1Sb3nTyeUj0Sp1MMAJfclTKIUkD1oa++chWIUB+/xnkdfZ9hvQIrh9lrd Ef5vUFeaP/Sv0j94TQeGEUgfyHj8I1tcMaGrvL374IIH+nbO6MK2xz9UDYQ9P82ueL/i yzmpbnNdD8mnpPzG3HJlp7uR+oFUH88AheikBNItV2xQoho7tA574o2A9maPAwUvCfIb BzPh1aMvhID0qCVUosHay0BaF0DnTcw80DYxOEqsrJ4HpiKBFvv6nEX9JQbHmUl8TKjd UhdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JfSAj9ug; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id z186si9987627pgd.162.2019.07.22.20.34.09; Mon, 22 Jul 2019 20:34:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=JfSAj9ug; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1732690AbfGVVnV (ORCPT + 99 others); Mon, 22 Jul 2019 17:43:21 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:36011 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbfGVVnV (ORCPT ); Mon, 22 Jul 2019 17:43:21 -0400 Received: by mail-io1-f66.google.com with SMTP id o9so77420924iom.3; Mon, 22 Jul 2019 14:43:20 -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=DKEAhS/uikfS3tuGBnrF3tOxR8a7NEWxciPtJNbuB4I=; b=JfSAj9ugdtVl6OEkoUzepQEmicJQK8GpWKG2s+vG6iUdIXeSUt1rihBWoVTdYDTyUQ 3so7w+AxkdPrP/fETsa81ulrPPw0RwnjE13OzNfsXEhRRP071lUPgA7SHxDBoLq/kANS tftYZDKrRA6/aw3s3FkxcGpMQckhREwhdPqB8GoqKR8SBFYVgnIQkAZ1plu4h2cXCd5X PA426bL5v9lzDyec4oOJ/nd1ICXJKZWrgY2fqdf+g4WbtS6eXWm1sYrMoqLhMOf274xu e8bKpV1Zt+DlcCnqSRLce8RoWRN5DcM5hh3c2bvwct1PtWIlMmZTgPrRNdWXUf13eYLt fz8Q== 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=DKEAhS/uikfS3tuGBnrF3tOxR8a7NEWxciPtJNbuB4I=; b=ZDsyZQzyVxupikSwGKn6adsOkqLvo5LdFwLRBaQ2BqMXspwun6NNvulg/DhKakL5jh Q4XT2UNTT7govgOc7DQT5OJKJ2JCpBotNJFqnJb8C3MBKi3/0/OOq8SeEROTbK9uAsU3 oketIVxdgJGVts+raokX+gL8kI29k4ibqoRLhiSr6DprrUDlct3/K9OVn3Pwz21lRyEp UpLwpdgqeK5COxy0MAv8Iiz+riQAu5YhskhBUuH1PBN4Xwlx8XgYn1A+OXLsUiSg9LWe NKW1mhbMMPEgEJJxpXqfyf9zFJHz3ilLDHCZnyVPeuW6o+CGrUfAhl58R1NWKg6pay9Y tbkA== X-Gm-Message-State: APjAAAU6wFnq3X5Sx7/U+wuSsDEwH8/fnQaebz0nKW6Gw0x4m6560bKI r2yiB6EVJizhinGPeHfKJyJDahiKXUAKGBR3KgU= X-Received: by 2002:a02:cc50:: with SMTP id i16mr43428363jaq.50.1563831800346; Mon, 22 Jul 2019 14:43:20 -0700 (PDT) MIME-Version: 1.0 References: <20190722163642.10417-2-stillcompiling@gmail.com> <20190722212613.24906-1-stillcompiling@gmail.com> <20190722212613.24906-3-stillcompiling@gmail.com> In-Reply-To: From: Joshua Clayton Date: Mon, 22 Jul 2019 15:43:08 -0600 Message-ID: Subject: Re: [PATCH v2 3/3] HID: core: only warn once of oversize hid report To: Joe Perches Cc: Jiri Kosina , Benjamin Tissoires , "open list:HID CORE LAYER" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 3:30 PM Joe Perches wrote: > > On Mon, 2019-07-22 at 15:26 -0600, stillcompiling@gmail.com wrote: > > From: Joshua Clayton > > Thanks Joshua > > > On HP spectre x360 convertible the message: > > hid-sensor-hub 001F:8087:0AC2.0002: hid_field_extract() called with n (192) > 32! (kworker/1:2) > > is continually printed many times per second, crowding out all else > > Protect dmesg by printing the warning only one time. > [] > > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c > [] > > @@ -1311,8 +1311,8 @@ u32 hid_field_extract(const struct hid_device *hid, u8 *report, > > unsigned offset, unsigned n) > > { > > if (n > 32) { > > - hid_warn(hid, "hid_field_extract() called with n (%d) > 32! (%s)\n", > > - n, current->comm); > > + hid_warn_once(hid, "%s() called with n (%d) > 32! (%s)\n", > > + __func__ ,n , current->comm); > > All the other bits are fine, but this line is oddly written > with unusual spacing around 'n'. > > Normally it'd be something like: > > hid_warn_once(hid, "%s: called with n (%d) > 32! (%s)\n", > __func__, n, current->comm); Gah! Not only that but I missed a semicolon in patch 1. Will fix, (compile) and send v3 pdq. Sorry about the extra noise. > >