Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7492286ybi; Mon, 22 Jul 2019 14:20:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqykwbO9Ys+rNAFuOwHSt8c+mGmZQP6uaZHxVTgWUOHM3GiJ/xM9vb/sTZuhIYgSouin4hpI X-Received: by 2002:a63:b20f:: with SMTP id x15mr75547817pge.453.1563830439745; Mon, 22 Jul 2019 14:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563830439; cv=none; d=google.com; s=arc-20160816; b=zR3ivtfRwpd1zjmXvSdfKfHNQ0wt1pZBRlQUHpWpnykapWLk7Tqu5m+SFxzgPoOzho AeoPabOkklaPPRPoYFfEtB69Vb36KsqyUNFDR2HE1wgbe183EfgCpHMiSvuLr5LL5c5e Qzk2puFwFFOjAfwC5IWS4agFiyh1cFuDfT8CYpMtQngDh+RikmM4YOTm5Kj5vJAwhhuk xtk/px1Zu4XWUkP+7BPuPEZ4xehe/nT1UHEcc9fPGovdjo3Bgr/CFK1lrGrN5AGTSeUX p7K6PbcnyjBDCnPclH8qtZnyy5KSAzID/ajsakfqwIcnEfoDW6bVQGt8MmbUFen09tGi d0cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=OVKbP3siqT2GIRlrHGeLqOoaq93/l6iRibyNC/uXx3k=; b=tHJB19QMbbTOkJKO9YZ3/lfYH0pNimK3qNp6hGrjVjmNFTG1yap23+g8vM8OC5pO0X 2LLRz6/tticWQ1qeFRME+/r1JpDaHCesHD6qJmAUWU83a2tpCE+ErtgGfXizpn3cJeGS lkns61I8JoTQNFZLTslrCIDiJpSGXsVWKeAh/hvA0bZifXHFBR/FwItRv1OtIeuS9ruU iq8ot9TOATQRefLjSYRffH6YiJkyfoctBa5usuXPxJzNPtkvix69F140JkHZ94CPKFw3 NsQMXcEEuCalU2fnf/LMHtd9b8/Yrwi9o7BXdGonubo5NfQhQE2rVdxpryFeOgUuGq7I 4qaQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v184si8889189pgd.278.2019.07.22.14.20.23; Mon, 22 Jul 2019 14:20:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731259AbfGVRXN (ORCPT + 99 others); Mon, 22 Jul 2019 13:23:13 -0400 Received: from smtprelay0155.hostedemail.com ([216.40.44.155]:41475 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728233AbfGVRXN (ORCPT ); Mon, 22 Jul 2019 13:23:13 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 9E65B100E86C5; Mon, 22 Jul 2019 17:23:11 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:599:800:973:988:989:1260:1277:1311:1313:1314:1345:1359:1381:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2897:3138:3139:3140:3141:3142:3352:3622:3865:3871:4250:4321:5007:7514:7903:7904:10004:10400:10848:11026:11232:11658:11914:12048:12296:12297:12740:12760:12895:13069:13095:13311:13357:13439:14181:14659:14721:21080:21433:21611:21627:21740:30054:30056:30091,0,RBL:23.242.196.136:@perches.com:.lbl8.mailshell.net-62.8.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: walk80_1ab20649d4030 X-Filterd-Recvd-Size: 1884 Received: from XPS-9350.home (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA; Mon, 22 Jul 2019 17:23:02 +0000 (UTC) Message-ID: Subject: Re: [PATCH 2/2] HID: core: only warn once of oversize hid report From: Joe Perches To: stillcompiling@gmail.com, Jiri Kosina , Benjamin Tissoires , "open list:HID CORE LAYER" , open list Date: Mon, 22 Jul 2019 10:23:00 -0700 In-Reply-To: <20190722163642.10417-2-stillcompiling@gmail.com> References: <20190722163642.10417-1-stillcompiling@gmail.com> <20190722163642.10417-2-stillcompiling@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.5-0ubuntu0.18.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-07-22 at 10:36 -0600, stillcompiling@gmail.com wrote: > 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 other kernel logs > Protect dmesg by printing the warning only one time. [] > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c [] > @@ -1311,7 +1311,7 @@ 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", > + hid_warn_once(hid, "hid_field_extract() called with n (%d) > 32! (%s)\n", > n, current->comm); > n = 32; > } Is this papering over an actual defect somewhere else? Trivially, this could use "%s: ...", __func__, ...