KernelNewbies
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Kernel Hacking

  • Frontpage

  • Kernel Hacking

  • Kernel Documentation

  • Kernel Glossary

  • FAQ

  • Found a bug?

  • Kernel Changelog

  • Upstream Merge Guide

Projects

  • KernelJanitors

  • KernelMentors

  • KernelProjects

Community

  • Why a community?

  • Regional Kernelnewbies

  • Personal Pages

  • Upcoming Events

References

  • Mailing Lists

  • Related Sites

  • Programming Links

Wiki

  • Recent Changes

  • Site Editors

  • Side Bar

  • Tips for Editors

  • Hosted by WikiWall

Navigation

  • RecentChanges
  • FindPage
  • HelpContents

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 12 as of 2017-12-30 01:30:30
KernelNewbies:
  • KernelJanitors
  • Todo
  • VoidPointerConvs

(void*) conversions

Here are a few tips and scripts how to find unnecessary (void*) conversions.

Find (void*) functions

Here's a script that finds all functions returning (void*): find_voidp_funcs.pl

Example:

./find_voidp_funcs.pl linux-2.6.git/

Finding and removing type conversion on such assignments

Another script has an embedded list of such function names (after the _END_), or can take such names on the commandline: type-convs.pl

Example:

./type-convs.pl linux-2.6.git kmalloc

The output is a patch that removes these type conversions; the source files are kept unchanged.

(void*) variable assignments

Some kernel structures have variables meant to be private to some driver, normally named "priv" or "private"; these are of type "(void *)", and need not be casted to some other type.

This script returns a patch for such assignments: voidp_vars.pl

Example:

./voidp_vars.pl linux-2.6.git kmalloc
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01