提交 05ad412a 编写于 作者: M Mauro Carvalho Chehab

[media] siano: Fix the remaining checkpatch.pl compliants

Fix all other remaining checkpatch.pl compliants on the Siano driver,
except for the 80-cols (soft) limit. Those are harder to fix, and
probably not worth to do right now.
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 28a59df4
...@@ -57,8 +57,8 @@ struct smscore_client_t { ...@@ -57,8 +57,8 @@ struct smscore_client_t {
struct list_head entry; struct list_head entry;
struct smscore_device_t *coredev; struct smscore_device_t *coredev;
void *context; void *context;
struct list_head idlist; struct list_head idlist;
onresponse_t onresponse_handler; onresponse_t onresponse_handler;
onremove_t onremove_handler; onremove_t onremove_handler;
}; };
...@@ -874,7 +874,7 @@ int smscore_configure_board(struct smscore_device_t *coredev) ...@@ -874,7 +874,7 @@ int smscore_configure_board(struct smscore_device_t *coredev)
* sets initial device mode and notifies client hotplugs that device is ready * sets initial device mode and notifies client hotplugs that device is ready
* *
* @param coredev pointer to a coredev object returned by * @param coredev pointer to a coredev object returned by
* smscore_register_device * smscore_register_device
* *
* @return 0 on success, <0 on error. * @return 0 on success, <0 on error.
*/ */
...@@ -961,7 +961,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, ...@@ -961,7 +961,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
while (size && rc >= 0) { while (size && rc >= 0) {
struct sms_data_download *data_msg = struct sms_data_download *data_msg =
(struct sms_data_download *) msg; (struct sms_data_download *) msg;
int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE); int payload_size = min_t(int, size, SMS_MAX_PAYLOAD_SIZE);
SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_DOWNLOAD_REQ, SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_DOWNLOAD_REQ,
(u16)(sizeof(struct sms_msg_hdr) + (u16)(sizeof(struct sms_msg_hdr) +
...@@ -1225,8 +1225,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev) ...@@ -1225,8 +1225,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev)
if (num_buffers == coredev->num_buffers) if (num_buffers == coredev->num_buffers)
break; break;
if (++retry > 10) { if (++retry > 10) {
sms_info("exiting although " sms_info("exiting although not all buffers released.");
"not all buffers released.");
break; break;
} }
...@@ -1279,8 +1278,8 @@ static int smscore_detect_mode(struct smscore_device_t *coredev) ...@@ -1279,8 +1278,8 @@ static int smscore_detect_mode(struct smscore_device_t *coredev)
coredev, msg, msg->msg_length, coredev, msg, msg->msg_length,
&coredev->version_ex_done); &coredev->version_ex_done);
if (rc < 0) if (rc < 0)
sms_err("MSG_SMS_GET_VERSION_EX_REQ failed " sms_err("MSG_SMS_GET_VERSION_EX_REQ failed second try, rc %d",
"second try, rc %d", rc); rc);
} else } else
rc = -ETIME; rc = -ETIME;
} }
......
...@@ -40,10 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -40,10 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define kmutex_trylock(_p_) mutex_trylock(_p_) #define kmutex_trylock(_p_) mutex_trylock(_p_)
#define kmutex_unlock(_p_) mutex_unlock(_p_) #define kmutex_unlock(_p_) mutex_unlock(_p_)
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
/* /*
* Define the firmware names used by the driver. * Define the firmware names used by the driver.
* Those should match what's used at smscoreapi.c and sms-cards.c * Those should match what's used at smscoreapi.c and sms-cards.c
......
...@@ -112,7 +112,7 @@ void smsdvb_print_dvb_stats(struct smsdvb_debugfs *debug_data, ...@@ -112,7 +112,7 @@ void smsdvb_print_dvb_stats(struct smsdvb_debugfs *debug_data,
"burst_cycle_time = %d\n", p->burst_cycle_time); "burst_cycle_time = %d\n", p->burst_cycle_time);
n += snprintf(&buf[n], PAGE_SIZE - n, n += snprintf(&buf[n], PAGE_SIZE - n,
"calc_burst_cycle_time = %d\n", "calc_burst_cycle_time = %d\n",
p->calc_burst_cycle_time); p->calc_burst_cycle_time);
n += snprintf(&buf[n], PAGE_SIZE - n, n += snprintf(&buf[n], PAGE_SIZE - n,
"num_of_rows = %d\n", p->num_of_rows); "num_of_rows = %d\n", p->num_of_rows);
n += snprintf(&buf[n], PAGE_SIZE - n, n += snprintf(&buf[n], PAGE_SIZE - n,
...@@ -509,8 +509,6 @@ void smsdvb_debugfs_release(struct smsdvb_client_t *client) ...@@ -509,8 +509,6 @@ void smsdvb_debugfs_release(struct smsdvb_client_t *client)
if (!client->debugfs) if (!client->debugfs)
return; return;
printk("%s\n", __func__);
client->prt_dvb_stats = NULL; client->prt_dvb_stats = NULL;
client->prt_isdb_stats = NULL; client->prt_isdb_stats = NULL;
client->prt_isdb_stats_ex = NULL; client->prt_isdb_stats_ex = NULL;
...@@ -548,7 +546,6 @@ int smsdvb_debugfs_register(void) ...@@ -548,7 +546,6 @@ int smsdvb_debugfs_register(void)
void smsdvb_debugfs_unregister(void) void smsdvb_debugfs_unregister(void)
{ {
if (smsdvb_debugfs_usb_root) debugfs_remove_recursive(smsdvb_debugfs_usb_root);
debugfs_remove_recursive(smsdvb_debugfs_usb_root);
smsdvb_debugfs_usb_root = NULL; smsdvb_debugfs_usb_root = NULL;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册