Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp780709ybz; Fri, 24 Apr 2020 09:09:58 -0700 (PDT) X-Google-Smtp-Source: APiQypICn/9B4j8KPF311a0rjPgL3PHxsmPBzQ57v32s7CYe4Tbh/k3uyT2joGjfJsxuihTRRi3F X-Received: by 2002:a1c:2e91:: with SMTP id u139mr10692063wmu.18.1587744598402; Fri, 24 Apr 2020 09:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587744598; cv=none; d=google.com; s=arc-20160816; b=QI4Mpl7l6RpVLJ9T0XfhqP7rsUp+F8hYQlV5BUZH6i0QdXSJFnFMKJZ0xfBvleftB/ vUKFxwdtp2mGIQqubkAdvnZsK36EGeoYvIUih1nPGTtyNpjViBEPbYWGK+CGd6FAi4rm BoW0IHnHV7NNm6jgooxAaqjwbiCjuYzwyEd+YlCr6BHxno65NCpYTC/e5Y2He5OlpAFz 21nLSvYOEFf3cBuE7EuImnjiO9Ws5oZ4ek5C4hhd9t9YMmrhL3Kh6r/C2LsmL1L/uLI9 rzaP/3ak/laWEpjmE2wi+ytS2HIlPuouM233As3GVXbNrU1O/Sx5kiqVBhia5CE0FyTh y2kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=AIwpluvlrsL5SLEYT+O9atoJBsrUK0uTSuv5pX28WSM=; b=ShjGjQteN6cDdNU92jbPbWboWR+GvjTr2VyFWBGgzKGjT3i9oR7jRcWKJ9yiEckE5l oqLwWSkiAHsH5b06NzQHQgZPHGbDO9H2pqITiIeCJerw+dEApzew4aSM9fVBTj6nCGaz Gc58T0iRaE3mC3dh+kdkmDcSr6IDvpHdfxJDLR5XaVt6XklatyZA4hnz1YH0VCaHAqco fX2s5jJiuhh0OT83kkiWl0mzquqOMIQjfXwQBYMv4rvSIrJhPGKgNYzm8XMgolAF6Rhl sJOVFNb66jV4JIVHL20QF02wtAJ6NCjlVDVr1qX9odkKcN4OgzRC6bA2UZGYiJJjavO/ S2DA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 j3si3298957ejv.401.2020.04.24.09.09.18; Fri, 24 Apr 2020 09:09:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727088AbgDXQHd (ORCPT + 99 others); Fri, 24 Apr 2020 12:07:33 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:60856 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbgDXQHd (ORCPT ); Fri, 24 Apr 2020 12:07:33 -0400 X-IronPort-AV: E=Sophos;i="5.73,311,1583190000"; d="scan'208";a="446777922" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2020 18:07:31 +0200 Date: Fri, 24 Apr 2020 18:07:30 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Joe Perches cc: Nick Desaulniers , Dan Carpenter , LKML , clang-built-linux , Greg KH Subject: Re: linux-kernel: Unused static inline functions In-Reply-To: <572b03bdc3eed286c5ed20887d42f674bd93336e.camel@perches.com> Message-ID: References: <1583509304-28508-1-git-send-email-cai@lca.pw> <442b7ace85a414c6a01040368f05d6d219f86536.camel@perches.com> <4603e761a5f39f4d97375e1e08d20d720c526341.camel@perches.com> <572b03bdc3eed286c5ed20887d42f674bd93336e.camel@perches.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Apr 2020, Joe Perches wrote: > (adding Julia Lawall and Dan Carpenter who may have ideas too) > > On Thu, 2020-04-23 at 11:57 -0700, Nick Desaulniers wrote: > > I've been mulling over teaching a class internally at Google on > > getting started contributing to the Linux kernel. I think this idea > > (removing dead static inline functions) is perfect for having lots of > > small little tasks that are clear wins. Do you have any other ideas > > for work that there's a lot of? Like lots of small little bite sized > > tasks? Maybe more fallthrough conversion? Anything else? > > Some generic ideas: > > o look for always unused/unreferenced, or always static > value function arguments and remove them > > o int function returns constrained to 0 or 1 could be > converted to bool. > > And some logging ideas: > > o printk to tracing conversions > > o removal of printks used just for function tracing > as ftrace works well > > o pr_ macro conversions to functions to save > object space > > o singletons for pr_fmt > > o default use of #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > and removal of the ~1200 current defines treewide > > > Happy to have folks use your script and add your suggested by tag. > > Suggested-by doesn't have much value to me, > especially for scripted stuff. > > I'd be happy enough that it gets done eventually. Perhaps typedefs for structures? Using standard list operations? In staging there are a lot of camel case and variables whose names incorporate their type. julia