public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@01.org, kbuild-all@01.org, Noralf T <noralf@tronnes.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v1 5/5] tinydrm: add winstar wg160160 driver
Date: Mon, 6 Aug 2018 14:07:11 +0200	[thread overview]
Message-ID: <20180806120711.GA27045@ravnborg.org> (raw)
In-Reply-To: <20180806091548.yccqipmfyymwnrvy@mwanda>

On Mon, Aug 06, 2018 at 12:15:48PM +0300, Dan Carpenter wrote:
> Hi Sam,
> 
> I love your patch! Perhaps something to improve:
> 
> url:    https://github.com/0day-ci/linux/commits/Sam-Ravnborg/dt-bindings-add-parallel-data-bus-pardata/20180803-090135
> 
> smatch warnings:
> drivers/gpu/drm/tinydrm/wg160160.c:145 write_buf() warn: right shifting more than type allows 8 vs 8
> include/drm/tinydrm/pardata-dbi.h:165 pardata_write_buf() error: we previously assumed 'pdd' could be null (see line 162)
> 
> # https://github.com/0day-ci/linux/commit/9fcebca9e208029e06eea5e4858c1055132f06b6
> git remote add linux-review https://github.com/0day-ci/linux
> git remote update linux-review
> git checkout 9fcebca9e208029e06eea5e4858c1055132f06b6
> vim +145 drivers/gpu/drm/tinydrm/wg160160.c
> 
> 9fcebca9 Sam Ravnborg 2018-08-02  124  
> 9fcebca9 Sam Ravnborg 2018-08-02  125  /**
> 9fcebca9 Sam Ravnborg 2018-08-02  126   * write_buf - write buffer on parallel bus to controller
> 9fcebca9 Sam Ravnborg 2018-08-02  127   *
> 9fcebca9 Sam Ravnborg 2018-08-02  128   * @pdd: pardata data
> 9fcebca9 Sam Ravnborg 2018-08-02  129   * @offset: offset into display RAM
> 9fcebca9 Sam Ravnborg 2018-08-02  130   * @data: pointer to data to write
> 9fcebca9 Sam Ravnborg 2018-08-02  131   * @len: number of bytes to write
> 9fcebca9 Sam Ravnborg 2018-08-02  132   *
> 9fcebca9 Sam Ravnborg 2018-08-02  133   * Returns:
> 9fcebca9 Sam Ravnborg 2018-08-02  134   * Zero on success, negative error code on failure
> 9fcebca9 Sam Ravnborg 2018-08-02  135   */
> 9fcebca9 Sam Ravnborg 2018-08-02  136  int write_buf(struct pardata_data *pdd, u8 offset, u8 *data, size_t len)
> 9fcebca9 Sam Ravnborg 2018-08-02  137  {
> 9fcebca9 Sam Ravnborg 2018-08-02  138  	int ins[PIN_NUM];
> 9fcebca9 Sam Ravnborg 2018-08-02  139  	int val[PIN_NUM];
> 9fcebca9 Sam Ravnborg 2018-08-02  140  	int bit;
> 9fcebca9 Sam Ravnborg 2018-08-02  141  	int i;
> 9fcebca9 Sam Ravnborg 2018-08-02  142  
> 9fcebca9 Sam Ravnborg 2018-08-02  143  	/* Setup address */
> 9fcebca9 Sam Ravnborg 2018-08-02  144  	write_reg(pdd, WG160160_ADDRSL_REG, offset & 0xff);
> 9fcebca9 Sam Ravnborg 2018-08-02 @145  	write_reg(pdd, WG160160_ADDRSL_REG, (offset >> 8) & 0xff);
>                                                                             ^^^^^^^^^^^^^^^^^^^^
> Probably this is fine.  I don't know.  If so then feel free to ignore
> the warning.

Thanks!
I will fix both issues in v2.

	Sam

  reply	other threads:[~2018-08-06 12:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02 19:39 [RFC PATCH v1 0/5] Add pardata bus + tinydrm driver Sam Ravnborg
2018-08-02 19:45 ` [PATCH v1 1/5] dt-bindings: add parallel data bus (pardata) Sam Ravnborg
2018-08-02 19:45 ` [PATCH v1 2/5] pardata: new bus for parallel data access Sam Ravnborg
2018-08-07 16:40   ` Noralf Trønnes
2018-08-08  8:24     ` Sam Ravnborg
2018-08-08 16:22       ` Noralf Trønnes
2020-01-20 10:10   ` Geert Uytterhoeven
2020-01-20 18:48     ` Sam Ravnborg
2020-01-20 19:12       ` Geert Uytterhoeven
2020-01-20 19:23         ` Sam Ravnborg
2018-08-02 19:45 ` [PATCH v1 3/5] tinydrm: add support for parallel data displays Sam Ravnborg
2018-08-02 19:45 ` [PATCH v1 4/5] dt-bindings: add winstar,wg160160 display bindings Sam Ravnborg
2018-08-02 19:45 ` [PATCH v1 5/5] tinydrm: add winstar wg160160 driver Sam Ravnborg
2018-08-06  9:15   ` Dan Carpenter
2018-08-06 12:07     ` Sam Ravnborg [this message]
2018-08-07 17:35   ` Noralf Trønnes
2018-08-08  8:32     ` Sam Ravnborg
2018-08-08 16:31       ` Noralf Trønnes
2018-08-02 19:46 ` [RFC PATCH v1 0/5] Add pardata bus + tinydrm driver Miguel Ojeda

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=20180806120711.GA27045@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=kbuild@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noralf@tronnes.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