media: dvb_frontend: cleanup some coding style errors

This is a core media file... it shoudn't have so many coding
style issues! The last patch ended by being submitted with
an error like that, very likely due to some cut and paste
issue.

Maybe it is time to clean it up. Do it with the auto
fix logic:

 ./scripts/checkpatch.pl -f drivers/media/dvb-core/dvb_frontend.c --strict --fix-inplace

Then manually fix the errors introduced by it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Mauro Carvalho Chehab 2018-05-11 12:18:34 -04:00
parent f17c403af9
commit 09c2cc98cd
1 changed files with 101 additions and 99 deletions

View File

@ -190,7 +190,7 @@ dtv_property_legacy_params_sync(struct dvb_frontend *fe,
static bool has_get_frontend(struct dvb_frontend *fe) static bool has_get_frontend(struct dvb_frontend *fe)
{ {
return fe->ops.get_frontend != NULL; return fe->ops.get_frontend;
} }
/* /*
@ -457,8 +457,8 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
return 1; return 1;
} }
dev_dbg(fe->dvb->device, "%s: drift:%i inversion:%i auto_step:%i " \ dev_dbg(fe->dvb->device,
"auto_sub_step:%i started_auto_step:%i\n", "%s: drift:%i inversion:%i auto_step:%i auto_sub_step:%i started_auto_step:%i\n",
__func__, fepriv->lnb_drift, fepriv->inversion, __func__, fepriv->lnb_drift, fepriv->inversion,
fepriv->auto_step, fepriv->auto_sub_step, fepriv->auto_step, fepriv->auto_sub_step,
fepriv->started_auto_step); fepriv->started_auto_step);
@ -598,7 +598,7 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
} }
fepriv->check_wrapped = 1; fepriv->check_wrapped = 1;
/* if we've just retuned, enter the ZIGZAG_FAST state. /* if we've just re-tuned, enter the ZIGZAG_FAST state.
* This ensures we cannot return from an * This ensures we cannot return from an
* FE_SET_FRONTEND ioctl before the first frontend tune * FE_SET_FRONTEND ioctl before the first frontend tune
* occurs */ * occurs */
@ -677,8 +677,9 @@ static int dvb_frontend_thread(void *data)
up(&fepriv->sem); /* is locked when we enter the thread... */ up(&fepriv->sem); /* is locked when we enter the thread... */
restart: restart:
wait_event_interruptible_timeout(fepriv->wait_queue, wait_event_interruptible_timeout(fepriv->wait_queue,
dvb_frontend_should_wakeup(fe) || kthread_should_stop() dvb_frontend_should_wakeup(fe) ||
|| freezing(current), kthread_should_stop() ||
freezing(current),
fepriv->delay); fepriv->delay);
if (kthread_should_stop() || dvb_frontend_is_exiting(fe)) { if (kthread_should_stop() || dvb_frontend_is_exiting(fe)) {
@ -905,7 +906,8 @@ static void dvb_frontend_get_frequency_limits(struct dvb_frontend *fe,
*freq_max = min(fe->ops.info.frequency_max, fe->ops.tuner_ops.info.frequency_max); *freq_max = min(fe->ops.info.frequency_max, fe->ops.tuner_ops.info.frequency_max);
if (*freq_min == 0 || *freq_max == 0) if (*freq_min == 0 || *freq_max == 0)
dev_warn(fe->dvb->device, "DVB: adapter %i frontend %u frequency limits undefined - fix the driver\n", dev_warn(fe->dvb->device,
"DVB: adapter %i frontend %u frequency limits undefined - fix the driver\n",
fe->dvb->num, fe->id); fe->dvb->num, fe->id);
} }
@ -2272,7 +2274,6 @@ static int dtv_set_frontend(struct dvb_frontend *fe)
return 0; return 0;
} }
static int dvb_frontend_handle_ioctl(struct file *file, static int dvb_frontend_handle_ioctl(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
@ -2530,6 +2531,7 @@ static int dvb_frontend_handle_ioctl(struct file *file,
ktime_t tv[10]; ktime_t tv[10];
int i; int i;
u8 last = 1; u8 last = 1;
if (dvb_frontend_debug) if (dvb_frontend_debug)
dprintk("%s switch command: 0x%04lx\n", dprintk("%s switch command: 0x%04lx\n",
__func__, swcmd); __func__, swcmd);
@ -2641,7 +2643,6 @@ static int dvb_frontend_handle_ioctl(struct file *file,
return err; return err;
} }
static __poll_t dvb_frontend_poll(struct file *file, struct poll_table_struct *wait) static __poll_t dvb_frontend_poll(struct file *file, struct poll_table_struct *wait)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
@ -2673,7 +2674,7 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
if (adapter->mfe_shared) { if (adapter->mfe_shared) {
mutex_lock(&adapter->mfe_lock); mutex_lock(&adapter->mfe_lock);
if (adapter->mfe_dvbdev == NULL) if (!adapter->mfe_dvbdev)
adapter->mfe_dvbdev = dvbdev; adapter->mfe_dvbdev = dvbdev;
else if (adapter->mfe_dvbdev != dvbdev) { else if (adapter->mfe_dvbdev != dvbdev) {
@ -2687,7 +2688,7 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
mutex_unlock(&adapter->mfe_lock); mutex_unlock(&adapter->mfe_lock);
while (mferetry-- && (mfedev->users != -1 || while (mferetry-- && (mfedev->users != -1 ||
mfepriv->thread != NULL)) { mfepriv->thread)) {
if (msleep_interruptible(500)) { if (msleep_interruptible(500)) {
if (signal_pending(current)) if (signal_pending(current))
return -EINTR; return -EINTR;
@ -2700,7 +2701,7 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
mfe = mfedev->priv; mfe = mfedev->priv;
mfepriv = mfe->frontend_priv; mfepriv = mfe->frontend_priv;
if (mfedev->users != -1 || if (mfedev->users != -1 ||
mfepriv->thread != NULL) { mfepriv->thread) {
mutex_unlock(&adapter->mfe_lock); mutex_unlock(&adapter->mfe_lock);
return -EBUSY; return -EBUSY;
} }
@ -2905,7 +2906,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb,
return -ERESTARTSYS; return -ERESTARTSYS;
fe->frontend_priv = kzalloc(sizeof(struct dvb_frontend_private), GFP_KERNEL); fe->frontend_priv = kzalloc(sizeof(struct dvb_frontend_private), GFP_KERNEL);
if (fe->frontend_priv == NULL) { if (!fe->frontend_priv) {
mutex_unlock(&frontend_mutex); mutex_unlock(&frontend_mutex);
return -ENOMEM; return -ENOMEM;
} }
@ -2950,6 +2951,7 @@ EXPORT_SYMBOL(dvb_register_frontend);
int dvb_unregister_frontend(struct dvb_frontend *fe) int dvb_unregister_frontend(struct dvb_frontend *fe)
{ {
struct dvb_frontend_private *fepriv = fe->frontend_priv; struct dvb_frontend_private *fepriv = fe->frontend_priv;
dev_dbg(fe->dvb->device, "%s:\n", __func__); dev_dbg(fe->dvb->device, "%s:\n", __func__);
mutex_lock(&frontend_mutex); mutex_lock(&frontend_mutex);