提交 b9391f41 编写于 作者: M Michael Krufky 提交者: Mauro Carvalho Chehab

V4L/DVB (10751): sms1xxx: fix checkpatch.pl violations introduced by previous changeset

Fix checkpatch.pl violations introduced by previous changeset:

ERROR: do not use C99 // comments
156: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1373:
+//#ifdef DVB_CORE

ERROR: do not use C99 // comments
157: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1374:
+//	smsdvb_unregister();

ERROR: do not use C99 // comments
158: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1375:
+//#endif

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
163: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1380:
+EXPORT_SYMBOL(smscore_onresponse);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
164: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1381:
+EXPORT_SYMBOL(sms_get_board);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
165: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1382:
+EXPORT_SYMBOL(sms_debug);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
166: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1383:
+EXPORT_SYMBOL(smscore_putbuffer);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
167: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1384:
+EXPORT_SYMBOL(smscore_registry_getmode);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
168: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1385:
+EXPORT_SYMBOL(smscore_register_device);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
169: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1386:
+EXPORT_SYMBOL(smscore_set_board_id);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
170: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1387:
+EXPORT_SYMBOL(smscore_start_device);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
171: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1388:
+EXPORT_SYMBOL(smsusb_id_table);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
172: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1389:
+EXPORT_SYMBOL(smscore_unregister_device);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
173: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1390:
+EXPORT_SYMBOL(smscore_getbuffer);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
174: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1391:
+EXPORT_SYMBOL(smscore_get_device_mode);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
175: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1392:
+EXPORT_SYMBOL(smscore_register_client);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
176: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1393:
+EXPORT_SYMBOL(smscore_unregister_hotplug);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
177: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1394:
+EXPORT_SYMBOL(smsclient_sendrequest);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
178: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1395:
+EXPORT_SYMBOL(smscore_unregister_client);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
179: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1396:
+EXPORT_SYMBOL(smscore_get_board_id);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
180: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1397:
+EXPORT_SYMBOL(smscore_register_hotplug);

WARNING: line over 80 characters
391: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:398:
+extern int smscore_get_fw_filename(struct smscore_device_t *coredev, int mode, char* filename);

ERROR: "foo* bar" should be "foo *bar"
391: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:398:
+extern int smscore_get_fw_filename(struct smscore_device_t *coredev, int mode, char* filename);

WARNING: line over 80 characters
392: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:399:
+extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size);

ERROR: "foo* bar" should be "foo *bar"
392: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:399:
+extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size);

ERROR: space required after that ',' (ctx:VxV)
392: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:399:
+extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size);
                                                                             ^

WARNING: __func__ should be used instead of gcc specific __FUNCTION__
489: FILE: linux/drivers/media/dvb/siano/smsusb.c:443:
+	printk(KERN_INFO"%s  Entering status %d.\n", __FUNCTION__, msg.event);

WARNING: __func__ should be used instead of gcc specific __FUNCTION__
501: FILE: linux/drivers/media/dvb/siano/smsusb.c:455:
+	printk(KERN_INFO  "%s  Entering.\n", __FUNCTION__);

ERROR: space prohibited before that '++' (ctx:WxB)
505: FILE: linux/drivers/media/dvb/siano/smsusb.c:459:
+	for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i ++)
 	                                                            ^

WARNING: __func__ should be used instead of gcc specific __FUNCTION__
517: FILE: linux/drivers/media/dvb/siano/smsusb.c:471:
+			__FUNCTION__, rc);
Signed-off-by: NMichael Krufky <mkrufky@linuxtv.org>
[mchehab@redhat.com: sms_dbg were declared on 3 different files]
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 e0f14c25
......@@ -86,6 +86,7 @@ struct sms_board *sms_get_board(int id)
return &sms_boards[id];
}
EXPORT_SYMBOL(sms_get_board);
static int sms_set_gpio(struct smscore_device_t *coredev, int pin, int enable)
{
......@@ -138,6 +139,7 @@ int sms_board_setup(struct smscore_device_t *coredev)
}
return 0;
}
EXPORT_SYMBOL(sms_board_setup);
int sms_board_power(struct smscore_device_t *coredev, int onoff)
{
......@@ -159,6 +161,7 @@ int sms_board_power(struct smscore_device_t *coredev, int onoff)
}
return 0;
}
EXPORT_SYMBOL(sms_board_power);
int sms_board_led_feedback(struct smscore_device_t *coredev, int led)
{
......@@ -181,6 +184,7 @@ int sms_board_led_feedback(struct smscore_device_t *coredev, int led)
}
return 0;
}
EXPORT_SYMBOL(sms_board_led_feedback);
int sms_board_lna_control(struct smscore_device_t *coredev, int onoff)
{
......@@ -199,3 +203,4 @@ int sms_board_lna_control(struct smscore_device_t *coredev, int onoff)
}
return -EINVAL;
}
EXPORT_SYMBOL(sms_board_lna_control);
......@@ -34,8 +34,8 @@
#include "smscoreapi.h"
#include "sms-cards.h"
int sms_debug;
module_param_named(debug, sms_debug, int, 0644);
int sms_dbg;
module_param_named(debug, sms_dbg, int, 0644);
MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
struct smscore_device_notifyee_t {
......@@ -105,11 +105,13 @@ int smscore_led_state(struct smscore_device_t *core, int led)
core->led_state = led;
return core->led_state;
}
EXPORT_SYMBOL(smscore_set_board_id);
int smscore_get_board_id(struct smscore_device_t *core)
{
return core->board_id;
}
EXPORT_SYMBOL(smscore_get_board_id);
struct smscore_registry_entry_t {
struct list_head entry;
......@@ -170,6 +172,7 @@ int smscore_registry_getmode(char *devpath)
return default_mode;
}
EXPORT_SYMBOL(smscore_registry_getmode);
static enum sms_device_type_st smscore_registry_gettype(char *devpath)
{
......@@ -261,6 +264,7 @@ int smscore_register_hotplug(hotplug_t hotplug)
return rc;
}
EXPORT_SYMBOL(smscore_register_hotplug);
/**
* unregister a client callback that called when device plugged in/unplugged
......@@ -289,6 +293,7 @@ void smscore_unregister_hotplug(hotplug_t hotplug)
kmutex_unlock(&g_smscore_deviceslock);
}
EXPORT_SYMBOL(smscore_unregister_hotplug);
static void smscore_notify_clients(struct smscore_device_t *coredev)
{
......@@ -432,6 +437,7 @@ int smscore_register_device(struct smsdevice_params_t *params,
return 0;
}
EXPORT_SYMBOL(smscore_register_device);
/**
* sets initial device mode and notifies client hotplugs that device is ready
......@@ -460,6 +466,7 @@ int smscore_start_device(struct smscore_device_t *coredev)
return rc;
}
EXPORT_SYMBOL(smscore_start_device);
static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev,
void *buffer, size_t size,
......@@ -688,6 +695,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev)
sms_info("device %p destroyed", coredev);
}
EXPORT_SYMBOL(smscore_unregister_device);
static int smscore_detect_mode(struct smscore_device_t *coredev)
{
......@@ -879,6 +887,7 @@ int smscore_get_device_mode(struct smscore_device_t *coredev)
{
return coredev->mode;
}
EXPORT_SYMBOL(smscore_get_device_mode);
/**
* find client by response id & type within the clients list.
......@@ -1006,6 +1015,7 @@ void smscore_onresponse(struct smscore_device_t *coredev,
smscore_putbuffer(coredev, cb);
}
}
EXPORT_SYMBOL(smscore_onresponse);
/**
* return pointer to next free buffer descriptor from core pool
......@@ -1031,6 +1041,7 @@ struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev)
return cb;
}
EXPORT_SYMBOL(smscore_getbuffer);
/**
* return buffer descriptor to a pool
......@@ -1045,6 +1056,7 @@ void smscore_putbuffer(struct smscore_device_t *coredev,
{
list_add_locked(&cb->entry, &coredev->buffers, &coredev->bufferslock);
}
EXPORT_SYMBOL(smscore_putbuffer);
static int smscore_validate_client(struct smscore_device_t *coredev,
struct smscore_client_t *client,
......@@ -1124,6 +1136,7 @@ int smscore_register_client(struct smscore_device_t *coredev,
return 0;
}
EXPORT_SYMBOL(smscore_register_client);
/**
* frees smsclient object and all subclients associated with it
......@@ -1154,6 +1167,7 @@ void smscore_unregister_client(struct smscore_client_t *client)
spin_unlock_irqrestore(&coredev->clientslock, flags);
}
EXPORT_SYMBOL(smscore_unregister_client);
/**
* verifies that source id is not taken by another client,
......@@ -1193,6 +1207,7 @@ int smsclient_sendrequest(struct smscore_client_t *client,
return coredev->sendrequest_handler(coredev->context, buffer, size);
}
EXPORT_SYMBOL(smsclient_sendrequest);
int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
......@@ -1316,31 +1331,9 @@ static void __exit smscore_module_exit(void)
}
kmutex_unlock(&g_smscore_registrylock);
//#ifdef DVB_CORE
// smsdvb_unregister();
//#endif
sms_debug("");
}
EXPORT_SYMBOL(smscore_onresponse);
EXPORT_SYMBOL(sms_get_board);
EXPORT_SYMBOL(sms_debug);
EXPORT_SYMBOL(smscore_putbuffer);
EXPORT_SYMBOL(smscore_registry_getmode);
EXPORT_SYMBOL(smscore_register_device);
EXPORT_SYMBOL(smscore_set_board_id);
EXPORT_SYMBOL(smscore_start_device);
EXPORT_SYMBOL(smscore_unregister_device);
EXPORT_SYMBOL(smscore_getbuffer);
EXPORT_SYMBOL(smscore_get_device_mode);
EXPORT_SYMBOL(smscore_register_client);
EXPORT_SYMBOL(smscore_unregister_hotplug);
EXPORT_SYMBOL(smsclient_sendrequest);
EXPORT_SYMBOL(smscore_unregister_client);
EXPORT_SYMBOL(smscore_get_board_id);
EXPORT_SYMBOL(smscore_register_hotplug);
module_init(smscore_module_init);
module_exit(smscore_module_exit);
......
......@@ -400,8 +400,10 @@ extern void smscore_onresponse(struct smscore_device_t *coredev,
extern int smscore_get_common_buffer_size(struct smscore_device_t *coredev);
extern int smscore_map_common_buffer(struct smscore_device_t *coredev,
struct vm_area_struct *vma);
extern int smscore_get_fw_filename(struct smscore_device_t *coredev, int mode, char* filename);
extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size);
extern int smscore_get_fw_filename(struct smscore_device_t *coredev,
int mode, char *filename);
extern int smscore_send_fw_file(struct smscore_device_t *coredev,
u8 *ufwbuf, int size);
extern
struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev);
......@@ -420,7 +422,7 @@ int smscore_led_state(struct smscore_device_t *core, int led);
/* ------------------------------------------------------------------------ */
extern int sms_debug;
extern int sms_dbg;
#define DBG_INFO 1
#define DBG_ADV 2
......@@ -429,7 +431,7 @@ extern int sms_debug;
printk(kern "%s: " fmt "\n", __func__, ##arg)
#define dprintk(kern, lvl, fmt, arg...) do {\
if (sms_debug & lvl) \
if (sms_dbg & lvl) \
sms_printk(kern, fmt, ##arg); } while (0)
#define sms_log(fmt, arg...) sms_printk(KERN_INFO, fmt, ##arg)
......
......@@ -436,7 +436,7 @@ static int smsusb_suspend(struct usb_interface *intf, pm_message_t msg)
{
struct smsusb_device_t *dev =
(struct smsusb_device_t *)usb_get_intfdata(intf);
printk(KERN_INFO "%s Entering status %d.\n", __func__, msg.event);
printk(KERN_INFO "%s: Entering status %d.\n", __func__, msg.event);
smsusb_stop_streaming(dev);
return 0;
}
......@@ -448,7 +448,7 @@ static int smsusb_resume(struct usb_interface *intf)
(struct smsusb_device_t *)usb_get_intfdata(intf);
struct usb_device *udev = interface_to_usbdev(intf);
printk(KERN_INFO "%s Entering.\n", __func__);
printk(KERN_INFO "%s: Entering.\n", __func__);
usb_clear_halt(udev, usb_rcvbulkpipe(udev, 0x81));
usb_clear_halt(udev, usb_rcvbulkpipe(udev, 0x02));
......@@ -463,9 +463,8 @@ static int smsusb_resume(struct usb_interface *intf)
intf->cur_altsetting->desc.
bInterfaceNumber, 0);
if (rc < 0) {
printk(KERN_INFO
"%s usb_set_interface failed, rc %d\n",
__func__, rc);
printk(KERN_INFO "%s usb_set_interface failed, "
"rc %d\n", __func__, rc);
return rc;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册