From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: fbdev: ssd1307fb: Unify init code and obtain hw specific bits from DT
Date: Mon, 25 May 2015 10:40:06 +0000 [thread overview]
Message-ID: <20150525104006.GD22558@mwanda> (raw)
In-Reply-To: <20150523173245.GA31663@mwanda>
On Mon, May 25, 2015 at 09:34:32AM +0200, Thomas Niederprüm wrote:
> Am Sat, 23 May 2015 20:32:45 +0300
> schrieb Dan Carpenter <dan.carpenter@oracle.com>:
>
> > Hello Thomas Niederprüm,
> >
> > The patch a3998fe03e87: "fbdev: ssd1307fb: Unify init code and obtain
> > hw specific bits from DT" from Mar 31, 2015, leads to the following
> > static checker warning:
> >
> > drivers/video/fbdev/ssd1307fb.c:371 ssd1307fb_init()
> > warn: add some parenthesis here?
> >
> > drivers/video/fbdev/ssd1307fb.c
> > 366 /* Set COM pins configuration */
> > 367 ret = ssd1307fb_write_cmd(par->client,
> > SSD1307FB_SET_COM_PINS_CONFIG); 368 if (ret < 0)
> > 369 return ret;
> > 370
> > 371 compins = 0x02 | (!par->com_seq & 0x1) << 4
> > 372 | (par->com_lrremap & 0x1)
> > << 5;
> >
> > Smatch is complaining because it's normally "!par->com_seq & 0x1" is
> > a bug and "!(par->com_seq & 0x1)" is intended. I don't know what was
> > intended here though. If the current code is correct, you can silence
> > the static checker warning by writing it as "(!par->com_seq) & 0x1".
>
> Indeed "!(par->com_seq & 0x1)" is what I intended. Thanks for spotting
> this.
> What is the best way to handle this now? Will you send a fixup
> patch as for the backlight code or will this be my task?
Could you send a fix and give me a:
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
cookie?
regards,
dan carpenter
prev parent reply other threads:[~2015-05-25 10:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-23 17:32 fbdev: ssd1307fb: Unify init code and obtain hw specific bits from DT Dan Carpenter
2015-05-25 5:12 ` Sudip Mukherjee
2015-05-25 7:34 ` Thomas Niederprüm
2015-05-25 9:48 ` Dan Carpenter
2015-05-25 10:40 ` Dan Carpenter [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=20150525104006.GD22558@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-fbdev@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;
as well as URLs for NNTP newsgroup(s).