Static functions in Linux device driver?

后端 未结 3 905
半阙折子戏
半阙折子戏 2021-02-20 13:25

Is there a reason why most function definition in device driver in linux code is defined as static? Is there a reason for this?

I was told this is for scoping and to pr

3条回答
  •  旧时难觅i
    2021-02-20 14:14

    I concur. This is common and wise practice in any C code - not just kernel code! Don't go thinking this is only appropriate for low level stuff, any C code that stretches past one .c file should have thought given to this.

提交回复
热议问题