staging: rtl8192u: Header file organisation and cleanup?

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

 



Hello all,

I've had a few goes at code style clean up of the file
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c Unfortunately the low
hanging fruit has been cleared, and a lot of the checkpatch errors are down to
line length or to CamelCase. So I decided I'd have a look at camel case.

I had a look at a local variable in the first function in the file:

void HTUpdateDefaultSetting(struct ieee80211_device *ieee)
{
	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;

Now that type PRT_HIGH_THROUGHPUT is declared in the header file

#include "rtl819x_HT.h"

which is included at the top of the C file. As is another header file:

#include "ieee80211.h"

These header files are the reason for this question. The ieee80211.h file also
includes the rtl819x_HT.h file so the file is included twice, but protected by
a #ifndef at the top of the file.

So my first question would be if you were trimming the number of includes of
that header file would the include in the C File be removed, or alternatively
the include in ieee80211.h be removed?

The second question is to do with the name of those files. I'm wroking in
staging/rtl8192u but that header file name is mirrored in staging/rtl8192e

$ find -name rtl819x_HT.h -print
./drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
./drivers/staging/rtl8192e/rtl819x_HT.h

$ find . -name "*.[ch]" -exec grep "rtl819x_HT.h" {} /dev/null \;
./drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:#include "rtl819x_HT.h"
./drivers/staging/rtl8192u/ieee80211/ieee80211.h:#include "rtl819x_HT.h"
./drivers/staging/rtl8192e/rtl819x_HTProc.c:#include "rtl819x_HT.h"
./drivers/staging/rtl8192e/rtllib.h:#include "rtl819x_HT.h"

I'm wondering given that there are two different files they should be renamed
to rtl819u_HT.h and rtl819e_HT.h?


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux