linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Serge Semin <fancer.lancer@gmail.com>,
	Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 08/11] i2c: designware: Convert driver to using regmap API
Date: Sat, 30 May 2020 13:09:30 +0200	[thread overview]
Message-ID: <20200530110930.GC1038@ninjato> (raw)
In-Reply-To: <20200528093322.23553-9-Sergey.Semin@baikalelectronics.ru>

[-- Attachment #1: Type: text/plain, Size: 2248 bytes --]

On Thu, May 28, 2020 at 12:33:18PM +0300, Serge Semin wrote:
> Seeing the DW I2C driver is using flags-based accessors with two
> conditional clauses it would be better to replace them with the regmap
> API IO methods and to initialize the regmap object with read/write
> callbacks specific to the controller registers map implementation. This
> will be also handy for the drivers with non-standard registers mapping
> (like an embedded into the Baikal-T1 System Controller DW I2C block, which
> glue-driver is a part of this series).
> 
> As before the driver tries to detect the mapping setup at probe stage and
> creates a regmap object accordingly, which will be used by the rest of the
> code to correctly access the controller registers. In two places it was
> appropriate to convert the hand-written read-modify-write and
> read-poll-loop design patterns to the corresponding regmap API
> ready-to-use methods.
> 
> Note the regmap IO methods return value is checked only at the probe
> stage. The rest of the code won't do this because basically we have
> MMIO-based regmap so non of the read/write methods can fail (this also
> won't be needed for the Baikal-T1-specific I2C controller).
> 
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: linux-mips@vger.kernel.org

My codecheckers found these, rightfully I'd say:

SPARSE
drivers/i2c/busses/i2c-designware-master.c:427:53: warning: incorrect type in argument 3 (different signedness)
drivers/i2c/busses/i2c-designware-master.c:427:53:    expected unsigned int *val
drivers/i2c/busses/i2c-designware-master.c:427:53:    got int *

CC
drivers/i2c/busses/i2c-designware-common.c:127: warning: Excess function parameter 'base' description in 'i2c_dw_init_regmap'

^ means there is an argument documented which does not exist in the
function declaration


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2020-05-30 11:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  9:33 [PATCH v6 00/11] i2c: designeware: Add Baikal-T1 System I2C support Serge Semin
2020-05-28  9:33 ` [PATCH v6 01/11] dt-bindings: i2c: Convert DW I2C binding to DT schema Serge Semin
2020-05-30  9:39   ` Wolfram Sang
2020-05-30 10:24     ` Serge Semin
2020-05-30 11:10       ` Wolfram Sang
2020-05-28  9:33 ` [PATCH v6 02/11] dt-bindings: i2c: Convert DW I2C slave to the DW I2C master example Serge Semin
2020-05-29 19:17   ` Rob Herring
2020-05-28  9:33 ` [PATCH v6 03/11] dt-bindings: i2c: dw: Add Baikal-T1 SoC I2C controller Serge Semin
2020-05-29 19:18   ` Rob Herring
2020-05-28  9:33 ` [PATCH v6 04/11] i2c: designware: Use `-y` to build multi-object modules Serge Semin
2020-05-28  9:33 ` [PATCH v6 05/11] i2c: designware: slave: Set DW I2C core module dependency Serge Semin
2020-05-28  9:33 ` [PATCH v6 06/11] i2c: designware: Add Baytrail sem config DW I2C platform dependency Serge Semin
2020-05-28  9:33 ` [PATCH v6 07/11] i2c: designware: Discard Cherry Trail model flag Serge Semin
2020-05-28 10:06   ` Andy Shevchenko
2020-06-01  8:54     ` Jarkko Nikula
2020-05-28  9:33 ` [PATCH v6 08/11] i2c: designware: Convert driver to using regmap API Serge Semin
2020-05-28 10:04   ` Andy Shevchenko
2020-05-30 11:09   ` Wolfram Sang [this message]
2020-05-30 21:05     ` Wolfram Sang
2020-05-31 17:12       ` Serge Semin
2020-05-28  9:33 ` [PATCH v6 09/11] i2c: designware: Retrieve quirk flags as early as possible Serge Semin
2020-05-28  9:33 ` [PATCH v6 10/11] i2c: designware: Move reg-space remapping into a dedicated function Serge Semin
2020-05-28  9:33 ` [PATCH v6 11/11] i2c: designware: Add Baikal-T1 System I2C support Serge Semin
2020-05-30 21:06 ` [PATCH v6 00/11] i2c: designeware: " Wolfram Sang

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=20200530110930.GC1038@ninjato \
    --to=wsa@the-dreams.de \
    --cc=Alexey.Malahov@baikalelectronics.ru \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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).