Search Linux Wireless

Re: [PATCH 07/48] libertas: make more functions static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 10 December 2007, David Woodhouse wrote:
> --- a/drivers/net/wireless/libertas/cmd.c
> +++ b/drivers/net/wireless/libertas/cmd.c
> @@ -13,6 +13,11 @@
>  #include "wext.h"
>  
>  static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode);
> +struct cmd_ctrl_node *lbs_get_cmd_ctrl_node(struct lbs_private *priv);
> +void lbs_set_cmd_ctrl_node(struct lbs_private *priv,
> +                   struct cmd_ctrl_node *ptempnode,
> +                   u16 wait_option, void *pdata_buf);
> +

You should never need forward declarations for global functions in a C file,
it is error prone in any case:

* if the functions are only used in one file, make them static.
* Better, avoid forward declarations entirely by ordering the functions in the
way they are called.
* If they are used in one file and defined in another, declare them in
a common header, and only there, in order to avoid the prototypes from diverging.

	Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux