From: Pavel Machek <pavel@ucw.cz>
To: Chihau Chau <chihau@gmail.com>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH] Staging: dream: camera: msm_camera: fix code style issues
Date: Fri, 26 Feb 2010 08:04:15 +0100 [thread overview]
Message-ID: <20100226070415.GA14036@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <1267138659-17859-1-git-send-email-chihau@gmail.com>
> From: Chihau Chau <chihau@gmail.com>
>
> This fixes some code style issues like to add one space after a while or
> switch statement and before a open parenthesis '(', and to include KERN_
> facility level in the printk() functions.
>
> Signed-off-by: Chihau Chau <chihau@gmail.com>
ACK.
> ---
> drivers/staging/dream/camera/msm_camera.c | 17 ++++++++++-------
> 1 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c
> index 925e16c..223918f 100644
> --- a/drivers/staging/dream/camera/msm_camera.c
> +++ b/drivers/staging/dream/camera/msm_camera.c
> @@ -76,14 +76,14 @@ static LIST_HEAD(msm_sensors);
> list_del_init(&qcmd->list); \
> kfree(qcmd); \
> }; \
> -} while(0)
> +} while (0)
>
> #define MSM_DRAIN_QUEUE(sync, name) do { \
> unsigned long flags; \
> spin_lock_irqsave(&(sync)->name##_lock, flags); \
> MSM_DRAIN_QUEUE_NOSYNC(sync, name); \
> spin_unlock_irqrestore(&(sync)->name##_lock, flags); \
> -} while(0)
> +} while (0)
>
> static int check_overlap(struct hlist_head *ptype,
> unsigned long paddr,
> @@ -868,7 +868,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg)
> return -EFAULT;
> }
>
> - switch(cfgcmd.cmd_type) {
> + switch (cfgcmd.cmd_type) {
> case CMD_STATS_ENABLE:
> axi_data.bufnum1 =
> msm_pmem_region_lookup(&sync->stats,
> @@ -1621,7 +1621,8 @@ static int msm_release_control(struct inode *node, struct file *filep)
> int rc;
> struct msm_control_device *ctrl_pmsm = filep->private_data;
> struct msm_device *pmsm = ctrl_pmsm->pmsm;
> - printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name);
> + printk(KERN_INFO "msm_camera: RELEASE %s\n",
> + filep->f_path.dentry->d_name.name);
> rc = __msm_release(pmsm->sync);
> if (!rc) {
> MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q);
> @@ -1635,7 +1636,8 @@ static int msm_release_frame(struct inode *node, struct file *filep)
> {
> int rc;
> struct msm_device *pmsm = filep->private_data;
> - printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name);
> + printk(KERN_INFO "msm_camera: RELEASE %s\n",
> + filep->f_path.dentry->d_name.name);
> rc = __msm_release(pmsm->sync);
> if (!rc) {
> MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q);
> @@ -1719,7 +1721,7 @@ static void msm_vfe_sync(struct msm_vfe_resp *vdata,
> qcmd->type = qtype;
>
> if (qtype == MSM_CAM_Q_VFE_MSG) {
> - switch(vdata->type) {
> + switch (vdata->type) {
> case VFE_MSG_OUTPUT1:
> case VFE_MSG_OUTPUT2:
> qcmd_frame =
> @@ -1928,7 +1930,8 @@ static int __msm_v4l2_control(struct msm_sync *sync,
> memcpy(out->value, ctrl->value, ctrl->length);
>
> end:
> - if (rcmd) kfree(rcmd);
> + if (rcmd)
> + kfree(rcmd);
> CDBG("__msm_v4l2_control: end rc = %d\n", rc);
> return rc;
> }
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
prev parent reply other threads:[~2010-02-26 7:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 22:57 Chihau Chau
2010-02-26 7:04 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100226070415.GA14036@atrey.karlin.mff.cuni.cz \
--to=pavel@ucw.cz \
--cc=chihau@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®