Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp7144358ybf; Fri, 6 Mar 2020 11:13:03 -0800 (PST) X-Google-Smtp-Source: ADFU+vv4ysbZiQSiXpACCTyd67OMJTqpBUCl5lbgbR35YheKfbkGRUIHTNL/1Sk0N0HPWZI7AlWb X-Received: by 2002:a9d:5cc4:: with SMTP id r4mr3834839oti.33.1583521983630; Fri, 06 Mar 2020 11:13:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583521983; cv=none; d=google.com; s=arc-20160816; b=fHtvJufOWV3WwMo9bWkRFfI66/muxGDQtALXjGct/gtbqyC0ZvWzY+mTF9RAt6MmdI MubxY4INO6ZpclvB9hSzozaPX5bH1xFufTa0g7zxOpjYt3cALFuFpSZzk794lb0K7SWy EzkyMGcSZdqTh76tGlpyF4Ai+DYIQCJW4x7NT73EDuZ7gNigA88ACqoKHd1GYTVeF7Y6 3Sj++xq96LXOOgraBMXH7vJgzLivO6onWGbgkItzwfRjR4+JzwDF3fHN0ubYRFYxjCSO eNCJG4ipbz5uaG0LdgMXJY0Ejs6vTweQfI9a+MbeYe8etLCrYdDVjQoQ1WzPMtKLsFFJ v49A== 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:cc:to:from:subject :message-id; bh=mBMR5as9eC7XAKYrmhAs7JUgUEBL6KR1PzKUz1EQKfg=; b=yjRU8iq4s3adxFQJJiffZjbfajZ7tSELVEpUXopaeqslRjZlC/Rfw6khGFRH2Gt11e yKr74JWvJ3Aw3uxP5fhuEwGaeQ4ZW2jAOB0Uomi2jLkynmOP+Ai8QCeV3Ye5TF1dMIu/ wWOt+lzm/64LJs6xPkC45DT7x3FVgPq0yds+yGw6iM0MNEUTpoAv8yUg61ssxmZcAI73 xZznrEJZO+sRl3IeHKpEhzqNgi9zOC9mId3CkRVtdz7y5NrwRVIyG7mjskcDMkiZ5wcj EUgDHmhl+V+nwR3wSIYxncst4XFLxi+GKq3ZANMuzYB+fPTK2ihpZzIl7/pzs5MTUtqE rzBg== 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 g26si82290otk.304.2020.03.06.11.12.51; Fri, 06 Mar 2020 11:13:03 -0800 (PST) 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 S1727085AbgCFTMP (ORCPT + 99 others); Fri, 6 Mar 2020 14:12:15 -0500 Received: from smtprelay0138.hostedemail.com ([216.40.44.138]:58410 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727065AbgCFTML (ORCPT ); Fri, 6 Mar 2020 14:12:11 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id F3F49182CED5B; Fri, 6 Mar 2020 19:12:09 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 90,9,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:2911:3138:3139:3140:3141:3142:3353:3622:3653:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:4425:5007:6691:6742:7903:10004:10400:11232:11658:11914:12043:12297:12740:12760:12895:13019:13069:13311:13357:13439:13869:14181:14659:14721:21080:21324:21611:21627:21660:21740:21741:30005:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:14,LUA_SUMMARY:none X-HE-Tag: shelf13_870d94afc7347 X-Filterd-Recvd-Size: 2547 Received: from XPS-9350.home (unknown [47.151.143.254]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Fri, 6 Mar 2020 19:12:07 +0000 (UTC) Message-ID: <4ec4c6915c23545a9d45f37df9ab4eb6a422b234.camel@perches.com> Subject: Re: [PATCH] sched/cputime: silence a -Wunused-function warning From: Joe Perches To: Nick Desaulniers Cc: Qian Cai , Peter Zijlstra , Ingo Molnar , juri.lelli@redhat.com, Vincent Guittot , dietmar.eggemann@arm.com, Steven Rostedt , Benjamin Segall , mgorman@suse.de, LKML , clang-built-linux Date: Fri, 06 Mar 2020 11:10:32 -0800 In-Reply-To: References: <1583509304-28508-1-git-send-email-cai@lca.pw> <442b7ace85a414c6a01040368f05d6d219f86536.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 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 Fri, 2020-03-06 at 11:02 -0800, Nick Desaulniers wrote: > On Fri, Mar 6, 2020 at 10:39 AM Joe Perches wrote: [] > > Turns out there are hundreds of unused static inline > > functions in kernel .h files. > > > > A trivial script to find some of them (with likely > > false positives as some might actually be used via ## > > token pasting mechanisms). > > > > (and there's almost certainly a better way to do this > > too as it takes a _very_ long time to run) > > > > $ grep-2.5.4 -rP --include=*.h '^[ \t]*static\s+inline\s+(?:\w+\s+){1,3}\w+[ \t]*\(' * | \ > > grep -P -oh '\w+\s*\(' | \ > > sort | uniq -c | sort -n | grep -P '^\s+1\b' | \ > > sed -r -e 's/^\s+1\s+//' -e 's/\(//' | \ > > while read line ; do \ > > echo -n "$line: " ; git grep -w $line | wc -l ; \ > > done | \ > > grep ": 1$" > > Please start sending patches to remove them and I'll review. If this > is a good amount of work, I have newbies that are looking to > contribute and can help. That's not a task I care to take on. I could run the script and post the results through if you can not.