dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

14 Commits

Author SHA1 Message Date
Ben Hutchings 1ee4c55fc9 staging: vt6656: Fix inconsistent structure packing
vt6656 has several headers that use the #pragma pack(1) directive to
enable structure packing, but never disable it.  The layout of
structures defined in other headers can then depend on which order the
various headers are included in, breaking the One Definition Rule.

In practice this resulted in crashes on x86_64 until the order of header
inclusion was changed for some files in commit 11d404cb56 ('staging:
vt6656: fix headers and add cfg80211.').  But we need a proper fix that
won't be affected by future changes to the order of inclusion.

This removes the #pragma pack(1) directives and adds __packed to the
structure definitions for which packing appears to have been intended.

Reported-and-tested-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 13:08:32 -08:00
Marcos Paulo de Souza 1acc0d62d0 staging: vt6656: Remove all commented macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:43:25 -07:00
Roel Van Nyen 93a94c42b1 Staging: vt6656: Remove PUINT from ttype.h
Remove PUINT from ttype.h

Signed-off-by: Roel Van Nyen <roel.vannyen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:16:27 -07:00
Andres More d9d1ccb51f Staging: vt6656: code cleanup, resolved checkpatch findings in headers
Resolved whitespace-related checkpatch findings in .h files

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 10:35:33 -07:00
Andres More cc856e61ee Staging: vt6656: removed custom UCHAR/USHORT/UINT/ULONG/ULONGLONG typedefs
Cleared all checkpatch warnings but 'do not add new typedefs' ones.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-18 14:51:08 -07:00
Andres More 213d2e9322 Staging: vt6656: removed custom CHAR/SHORT/INT/LONG typedefs
Cleared all checkpatch warnings but one 'do not add new typedefs'

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-18 14:50:30 -07:00
Andres More 0cbd8d9854 staging: vt6656: code cleanup, removed HANDLE definition in ttype.h
Checkpatch warnings about using externs in .c files were not resolved,
neither some long lines on deeply nested code.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 14:18:23 -07:00
Andres More 6f8c13c7db Staging: vt6656: code cleanup, removed OUT definition
Remoted empty OUT define in ttype.h and its usage across the code.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:12 -07:00
Andres More e7b07d1d89 Staging: vt6656: code cleanup, fixed comments style at the end of headers
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:01 -07:00
Andres More 8611a29ab9 Staging: vt6656: removed VOID/PVOID definitions
Warnings about the usage of externs in .c files were not resolved here.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:01 -07:00
Andres More 592ccfebb3 Staging: vt6656: Removed IN definition
Code cleanup, removed empty IN definition used to denote input parameters.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:56 -07:00
Jim Lieb 9d26d60f99 Staging: vt665x: Clean up include files, Part 1
Remove cplusplus lines from include files
Remove needless ifdefs on includes to conform with C
conventions.  Remove misc commented code/includes
Update TODO

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:07 -07:00
Jim Lieb 193a823caa Staging: vt665x: Typedef and macro cleanup Part 1
Clean up unused typedefs and macros to remove Win32'isms and
misc non-linux constructs.  Text edits to referencing
source for less frequently used macros.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:07 -07:00
Forest Bond 92b9679711 Staging: Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.
Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.  These
files were copied from the driver directory in the upstream source archive,
available here:

  http://www.viaarena.com/Driver/VT6656_Linux_src_v1.19_12_x86.zip

After copying, trailing whitespace was stripped.  This is GPL-licensed code.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00