Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: vt6556: Remove typedefs

This patch removes uneeded typedefs reported by chackpatch and removes
one enum that is not in use. As checkpatch complained about the typedef
and the enum is not being used, this patch removes both typedef and enum.
The removed enum from card.h:

typedef enum _CARD_PHY_TYPE {
PHY_TYPE_AUTO = 0,
PHY_TYPE_11B,
PHY_TYPE_11G,
PHY_TYPE_11A
} CARD_PHY_TYPE, *PCARD_PHY_TYPE;

The following typedefs were removed, but enums were kept at device.h:

typedef enum __device_msg_level
typedef enum __DEVICE_NDIS_STATUS

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Senna Tschudin and committed by
Greg Kroah-Hartman
879be45a 91d42194

+8 -16
-7
drivers/staging/vt6656/card.h
··· 32 32 33 33 /* init card type */ 34 34 35 - typedef enum _CARD_PHY_TYPE { 36 - PHY_TYPE_AUTO = 0, 37 - PHY_TYPE_11B, 38 - PHY_TYPE_11G, 39 - PHY_TYPE_11A 40 - } CARD_PHY_TYPE, *PCARD_PHY_TYPE; 41 - 42 35 #define CB_MAX_CHANNEL_24G 14 43 36 #define CB_MAX_CHANNEL_5G 42 /* add channel9(5045MHz), 41==>42 */ 44 37 #define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G + CB_MAX_CHANNEL_5G)
+8 -9
drivers/staging/vt6656/device.h
··· 187 187 188 188 #define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); } 189 189 190 - typedef enum __device_msg_level { 190 + enum { 191 191 MSG_LEVEL_ERR = 0, /* Errors causing abnormal operation */ 192 192 MSG_LEVEL_NOTICE = 1, /* Errors needing user notification */ 193 193 MSG_LEVEL_INFO = 2, /* Normal message. */ 194 194 MSG_LEVEL_VERBOSE = 3, /* Will report all trival errors. */ 195 195 MSG_LEVEL_DEBUG = 4 /* Only for debug purpose. */ 196 - } DEVICE_MSG_LEVEL, *PDEVICE_MSG_LEVEL; 196 + }; 197 197 198 198 #define DEVICE_INIT_COLD 0x0 /* cold init */ 199 199 #define DEVICE_INIT_RESET 0x1 /* reset init or Dx to D0 power remain */ ··· 268 268 269 269 /*++ NDIS related */ 270 270 271 - typedef enum __DEVICE_NDIS_STATUS { 272 - STATUS_SUCCESS = 0, 273 - STATUS_FAILURE, 274 - STATUS_RESOURCES, 275 - STATUS_PENDING, 276 - } DEVICE_NDIS_STATUS, *PDEVICE_NDIS_STATUS; 277 - 271 + enum { 272 + STATUS_SUCCESS = 0, 273 + STATUS_FAILURE, 274 + STATUS_RESOURCES, 275 + STATUS_PENDING, 276 + }; 278 277 279 278 /* flags for options */ 280 279 #define DEVICE_FLAGS_UNPLUG 0x00000001UL