public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: a.hajda@samsung.com
Cc: linux-media@vger.kernel.org
Subject: re: [media] Add driver for Samsung S5K5BAF camera sensor
Date: Wed, 8 Jan 2014 12:58:40 +0300	[thread overview]
Message-ID: <20140108095840.GA10979@elgon.mountain> (raw)

Hello Andrzej Hajda,

The patch 7d459937dc09: "[media] Add driver for Samsung S5K5BAF
camera sensor" from Dec 5, 2013, leads to the following
static checker warning:

	drivers/media/i2c/s5k5baf.c:1043 s5k5baf_set_power()
	warn: add some parenthesis here?

drivers/media/i2c/s5k5baf.c
  1036  static int s5k5baf_set_power(struct v4l2_subdev *sd, int on)
  1037  {
  1038          struct s5k5baf *state = to_s5k5baf(sd);
  1039          int ret = 0;
  1040  
  1041          mutex_lock(&state->lock);
  1042  
  1043          if (!on != state->power)
                    ^^^^^^^^^^^^^^^^^^^
This would be cleaner if it were "if (on == state->power)"

  1044                  goto out;
  1045  
  1046          if (on) {

regards,
dan carpenter


             reply	other threads:[~2014-01-08  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08  9:58 Dan Carpenter [this message]
2014-01-08 11:58 ` [media] Add driver for Samsung S5K5BAF camera sensor Andrzej Hajda
2014-01-08 12:45   ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2014-01-08  9:09 Dan Carpenter
2014-01-08 10:29 ` Sachin Kamat

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=20140108095840.GA10979@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=a.hajda@samsung.com \
    --cc=linux-media@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