lkml.org 
[lkml]   [2020]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-kernel: Unused static inline functions


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_<level> 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

\
 
 \ /
  Last update: 2020-04-24 18:08    [W:0.071 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site