All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
@ 2018-09-18  8:50 Simon Horman
  2018-09-18 10:07 ` Geert Uytterhoeven
  2018-10-01 10:08 ` Geert Uytterhoeven
  0 siblings, 2 replies; 10+ messages in thread
From: Simon Horman @ 2018-09-18  8:50 UTC (permalink / raw)
  To: Greg KH; +Cc: ltsi-dev, linux-renesas-soc, Magnus Damm, Geert Uytterhoeven

Hi,

This is intended as a submission to LTSI-4.14. It is the backport
of a fixes for safe DMA buffer handling for the SH-Mobile I2C driver
and I2C code. All patches are present in v4.19-rc3.

This pull-request is based on
"[GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix"
tagged as backport/v4.14.61/snapshot-to-v4.18+fixes-flattened,
which I have already sent a pull-request for.

There are 10 patches.

I have performed build testing of this backports on a wide range of
defconfigs and I am not aware of any regressions over v4.14.40 (the
baseline chosen when this work began).


The following changes since commit 4d4605e5c137ed9a53582e573118cbc16b82cbf1:

  i2c: rcar: implement STOP and REP_START according to docs (2018-08-28 13:35:06 +0200)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-backport.git backport/v4.14.61/snapshot-to-v4.18+fixes-v2-flattened

for you to fetch changes up to 720043a4efbb3356db116d084c7b877ad41ee51a:

  i2c: sh_mobile: fix leak when using DMA bounce buffer (2018-09-17 15:54:30 +0200)

----------------------------------------------------------------
Second Round of LTSI-v4.14 Backports of I2C R-Car Fixes

Base:
* v4.14.61
* Backports of components for Renesas SoCs to v4.18
* First round of Backports of I2C R-Car Fixes

Backport of post-v4.18 fix for i2c-shmobile and I2C core
The focus of these fixes is to make DMA buffer handling safe

----------------------------------------------------------------
Peter Rosin (1):
      i2c: smbus: kill memory leak on emulated and failed DMA SMBus xfers

Wenwen Wang (1):
      i2c: core: smbus: fix a potential missing-check bug

Wolfram Sang (8):
      i2c: dev: mark RDWR buffers as DMA_SAFE
      i2c: refactor i2c_master_{send_recv}
      i2c: add i2c_master_{send|recv}_dmasafe
      i2c: smbus: use DMA safe buffers for emulated SMBus transactions
      i2c: add docs to clarify DMA handling
      i2c: refactor function to release a DMA safe buffer
      i2c: sh_mobile: define start_ch() void as it only returns 0 anyhow
      i2c: sh_mobile: fix leak when using DMA bounce buffer

 Documentation/i2c/DMA-considerations | 71 ++++++++++++++++++++++++++++++++++
 drivers/i2c/busses/i2c-sh_mobile.c   | 15 ++++----
 drivers/i2c/i2c-core-base.c          | 75 ++++++++++++------------------------
 drivers/i2c/i2c-core-smbus.c         | 57 ++++++++++++++++++++++-----
 drivers/i2c/i2c-dev.c                |  2 +
 include/linux/i2c.h                  | 68 +++++++++++++++++++++++++++++---
 6 files changed, 215 insertions(+), 73 deletions(-)
 create mode 100644 Documentation/i2c/DMA-considerations

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
  2018-09-18  8:50 [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix Simon Horman
@ 2018-09-18 10:07 ` Geert Uytterhoeven
  2018-09-19  9:08   ` Simon Horman
  2018-10-01 10:08 ` Geert Uytterhoeven
  1 sibling, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-09-18 10:07 UTC (permalink / raw)
  To: Simon Horman; +Cc: Greg KH, ltsi-dev, Linux-Renesas, Magnus Damm

Hi Simon,

On Tue, Sep 18, 2018 at 10:51 AM Simon Horman <horms@verge.net.au> wrote:
> This is intended as a submission to LTSI-4.14. It is the backport
> of a fixes for safe DMA buffer handling for the SH-Mobile I2C driver
> and I2C code. All patches are present in v4.19-rc3.
>
> This pull-request is based on
> "[GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix"
> tagged as backport/v4.14.61/snapshot-to-v4.18+fixes-flattened,
> which I have already sent a pull-request for.
>
> There are 10 patches.
>
> I have performed build testing of this backports on a wide range of
> defconfigs and I am not aware of any regressions over v4.14.40 (the
> baseline chosen when this work began).
>
>
> The following changes since commit 4d4605e5c137ed9a53582e573118cbc16b82cbf1:
>
>   i2c: rcar: implement STOP and REP_START according to docs (2018-08-28 13:35:06 +0200)
>
> are available in the git repository at:
>
>   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-backport.git backport/v4.14.61/snapshot-to-v4.18+fixes-v2-flattened
>
> for you to fetch changes up to 720043a4efbb3356db116d084c7b877ad41ee51a:
>
>   i2c: sh_mobile: fix leak when using DMA bounce buffer (2018-09-17 15:54:30 +0200)

Thank, this all looks fine to me.

I subjected this to the same testing I do for each renesas-drivers release.
I have detected no regressions[*].

[*] The only regression I'm aware of is a regression in 4.14-stable, which can
    be fixed by "tick/nohz: Prevent bogus softirq pending warning".
    (https://lore.kernel.org/patchwork/patch/979451/).

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
  2018-09-18 10:07 ` Geert Uytterhoeven
@ 2018-09-19  9:08   ` Simon Horman
  2018-09-19  9:13     ` Geert Uytterhoeven
  0 siblings, 1 reply; 10+ messages in thread
From: Simon Horman @ 2018-09-19  9:08 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Greg KH, ltsi-dev, Linux-Renesas, Magnus Damm

On Tue, Sep 18, 2018 at 12:07:50PM +0200, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Tue, Sep 18, 2018 at 10:51 AM Simon Horman <horms@verge.net.au> wrote:
> > This is intended as a submission to LTSI-4.14. It is the backport
> > of a fixes for safe DMA buffer handling for the SH-Mobile I2C driver
> > and I2C code. All patches are present in v4.19-rc3.
> >
> > This pull-request is based on
> > "[GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix"
> > tagged as backport/v4.14.61/snapshot-to-v4.18+fixes-flattened,
> > which I have already sent a pull-request for.
> >
> > There are 10 patches.
> >
> > I have performed build testing of this backports on a wide range of
> > defconfigs and I am not aware of any regressions over v4.14.40 (the
> > baseline chosen when this work began).
> >
> >
> > The following changes since commit 4d4605e5c137ed9a53582e573118cbc16b82cbf1:
> >
> >   i2c: rcar: implement STOP and REP_START according to docs (2018-08-28 13:35:06 +0200)
> >
> > are available in the git repository at:
> >
> >   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-backport.git backport/v4.14.61/snapshot-to-v4.18+fixes-v2-flattened
> >
> > for you to fetch changes up to 720043a4efbb3356db116d084c7b877ad41ee51a:
> >
> >   i2c: sh_mobile: fix leak when using DMA bounce buffer (2018-09-17 15:54:30 +0200)
> 
> Thank, this all looks fine to me.
> 
> I subjected this to the same testing I do for each renesas-drivers release.
> I have detected no regressions[*].
> 
> [*] The only regression I'm aware of is a regression in 4.14-stable, which can
>     be fixed by "tick/nohz: Prevent bogus softirq pending warning".
>     (https://lore.kernel.org/patchwork/patch/979451/).

Is that something we want to add to LTSI-4.14?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
  2018-09-19  9:08   ` Simon Horman
@ 2018-09-19  9:13     ` Geert Uytterhoeven
  2018-09-19  9:25       ` Simon Horman
  0 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-09-19  9:13 UTC (permalink / raw)
  To: Simon Horman; +Cc: Greg KH, ltsi-dev, Linux-Renesas, Magnus Damm

Hi Simon,

On Wed, Sep 19, 2018 at 11:08 AM Simon Horman <horms@verge.net.au> wrote:
> On Tue, Sep 18, 2018 at 12:07:50PM +0200, Geert Uytterhoeven wrote:
> > [*] The only regression I'm aware of is a regression in 4.14-stable, which can
> >     be fixed by "tick/nohz: Prevent bogus softirq pending warning".
> >     (https://lore.kernel.org/patchwork/patch/979451/).
>
> Is that something we want to add to LTSI-4.14?

As that is a fix for a regression introduced in v4.14.62, I think it should
be fixed in 4.14-stable instead (and hopefully be fixed automatically in
v4.14.x-ltsi rc2 or final).

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
  2018-09-19  9:13     ` Geert Uytterhoeven
@ 2018-09-19  9:25       ` Simon Horman
  0 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2018-09-19  9:25 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Greg KH, ltsi-dev, Linux-Renesas, Magnus Damm

On Wed, Sep 19, 2018 at 11:13:14AM +0200, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Wed, Sep 19, 2018 at 11:08 AM Simon Horman <horms@verge.net.au> wrote:
> > On Tue, Sep 18, 2018 at 12:07:50PM +0200, Geert Uytterhoeven wrote:
> > > [*] The only regression I'm aware of is a regression in 4.14-stable, which can
> > >     be fixed by "tick/nohz: Prevent bogus softirq pending warning".
> > >     (https://lore.kernel.org/patchwork/patch/979451/).
> >
> > Is that something we want to add to LTSI-4.14?
> 
> As that is a fix for a regression introduced in v4.14.62, I think it should
> be fixed in 4.14-stable instead (and hopefully be fixed automatically in
> v4.14.x-ltsi rc2 or final).

Ok, that sounds reasonable to me.

Let me know if you want to revisit this at some point.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
  2018-09-18  8:50 [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix Simon Horman
  2018-09-18 10:07 ` Geert Uytterhoeven
@ 2018-10-01 10:08 ` Geert Uytterhoeven
  2018-10-01 13:52   ` Simon Horman
  1 sibling, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-10-01 10:08 UTC (permalink / raw)
  To: Simon Horman; +Cc: Greg KH, ltsi-dev, Linux-Renesas, Magnus Damm, Wolfram Sang

Hi Simon,

On Tue, Sep 18, 2018 at 10:51 AM Simon Horman <horms@verge.net.au> wrote:
> This is intended as a submission to LTSI-4.14. It is the backport
> of a fixes for safe DMA buffer handling for the SH-Mobile I2C driver
> and I2C code. All patches are present in v4.19-rc3.
>
> This pull-request is based on
> "[GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix"
> tagged as backport/v4.14.61/snapshot-to-v4.18+fixes-flattened,
> which I have already sent a pull-request for.
>
> There are 10 patches.
>
> I have performed build testing of this backports on a wide range of
> defconfigs and I am not aware of any regressions over v4.14.40 (the
> baseline chosen when this work began).
>
>
> The following changes since commit 4d4605e5c137ed9a53582e573118cbc16b82cbf1:
>
>   i2c: rcar: implement STOP and REP_START according to docs (2018-08-28 13:35:06 +0200)
>
> are available in the git repository at:
>
>   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-backport.git backport/v4.14.61/snapshot-to-v4.18+fixes-v2-flattened
>
> for you to fetch changes up to 720043a4efbb3356db116d084c7b877ad41ee51a:
>
>   i2c: sh_mobile: fix leak when using DMA bounce buffer (2018-09-17 15:54:30 +0200)
>
> ----------------------------------------------------------------
> Second Round of LTSI-v4.14 Backports of I2C R-Car Fixes
>
> Base:
> * v4.14.61
> * Backports of components for Renesas SoCs to v4.18
> * First round of Backports of I2C R-Car Fixes
>
> Backport of post-v4.18 fix for i2c-shmobile and I2C core
> The focus of these fixes is to make DMA buffer handling safe
>
> ----------------------------------------------------------------
> Peter Rosin (1):
>       i2c: smbus: kill memory leak on emulated and failed DMA SMBus xfers
>
> Wenwen Wang (1):
>       i2c: core: smbus: fix a potential missing-check bug
>
> Wolfram Sang (8):
>       i2c: dev: mark RDWR buffers as DMA_SAFE
>       i2c: refactor i2c_master_{send_recv}
>       i2c: add i2c_master_{send|recv}_dmasafe
>       i2c: smbus: use DMA safe buffers for emulated SMBus transactions
>       i2c: add docs to clarify DMA handling
>       i2c: refactor function to release a DMA safe buffer
>       i2c: sh_mobile: define start_ch() void as it only returns 0 anyhow

Somehow I missed that the above introduces a (rightful) compiler warning:

    drivers/i2c/busses/i2c-sh_mobile.c: In function ‘start_ch’:
    drivers/i2c/busses/i2c-sh_mobile.c:616:10: warning: ‘return’ with
a value, in function returning void
       return -EOPNOTSUPP;
              ^
    drivers/i2c/busses/i2c-sh_mobile.c:611:13: note: declared here
     static void start_ch(struct sh_mobile_i2c_data *pd, struct
i2c_msg *usr_msg,
                 ^~~~~~~~

as it depends on commit 7957c2e276ee73e6 ("i2c: sh_mobile: use core to
detect 'no zero length read' quirk"), which was not backported.

I think the easiest solution is to just drop "i2c: sh_mobile: define
start_ch() void as it only returns 0 anyhow", as it was meant not to
introduce any behavioral changes, and nothing depends on it.

Do you agree?
Thanks!

>       i2c: sh_mobile: fix leak when using DMA bounce buffer

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
  2018-10-01 10:08 ` Geert Uytterhoeven
@ 2018-10-01 13:52   ` Simon Horman
  2018-10-01 13:58     ` Geert Uytterhoeven
  0 siblings, 1 reply; 10+ messages in thread
From: Simon Horman @ 2018-10-01 13:52 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Greg KH, ltsi-dev, Linux-Renesas, Magnus Damm, Wolfram Sang

On Mon, Oct 01, 2018 at 12:08:38PM +0200, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Tue, Sep 18, 2018 at 10:51 AM Simon Horman <horms@verge.net.au> wrote:
> > This is intended as a submission to LTSI-4.14. It is the backport
> > of a fixes for safe DMA buffer handling for the SH-Mobile I2C driver
> > and I2C code. All patches are present in v4.19-rc3.
> >
> > This pull-request is based on
> > "[GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix"
> > tagged as backport/v4.14.61/snapshot-to-v4.18+fixes-flattened,
> > which I have already sent a pull-request for.
> >
> > There are 10 patches.
> >
> > I have performed build testing of this backports on a wide range of
> > defconfigs and I am not aware of any regressions over v4.14.40 (the
> > baseline chosen when this work began).
> >
> >
> > The following changes since commit 4d4605e5c137ed9a53582e573118cbc16b82cbf1:
> >
> >   i2c: rcar: implement STOP and REP_START according to docs (2018-08-28 13:35:06 +0200)
> >
> > are available in the git repository at:
> >
> >   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-backport.git backport/v4.14.61/snapshot-to-v4.18+fixes-v2-flattened
> >
> > for you to fetch changes up to 720043a4efbb3356db116d084c7b877ad41ee51a:
> >
> >   i2c: sh_mobile: fix leak when using DMA bounce buffer (2018-09-17 15:54:30 +0200)
> >
> > ----------------------------------------------------------------
> > Second Round of LTSI-v4.14 Backports of I2C R-Car Fixes
> >
> > Base:
> > * v4.14.61
> > * Backports of components for Renesas SoCs to v4.18
> > * First round of Backports of I2C R-Car Fixes
> >
> > Backport of post-v4.18 fix for i2c-shmobile and I2C core
> > The focus of these fixes is to make DMA buffer handling safe
> >
> > ----------------------------------------------------------------
> > Peter Rosin (1):
> >       i2c: smbus: kill memory leak on emulated and failed DMA SMBus xfers
> >
> > Wenwen Wang (1):
> >       i2c: core: smbus: fix a potential missing-check bug
> >
> > Wolfram Sang (8):
> >       i2c: dev: mark RDWR buffers as DMA_SAFE
> >       i2c: refactor i2c_master_{send_recv}
> >       i2c: add i2c_master_{send|recv}_dmasafe
> >       i2c: smbus: use DMA safe buffers for emulated SMBus transactions
> >       i2c: add docs to clarify DMA handling
> >       i2c: refactor function to release a DMA safe buffer
> >       i2c: sh_mobile: define start_ch() void as it only returns 0 anyhow
> 
> Somehow I missed that the above introduces a (rightful) compiler warning:
> 
>     drivers/i2c/busses/i2c-sh_mobile.c: In function ‘start_ch’:
>     drivers/i2c/busses/i2c-sh_mobile.c:616:10: warning: ‘return’ with
> a value, in function returning void
>        return -EOPNOTSUPP;
>               ^
>     drivers/i2c/busses/i2c-sh_mobile.c:611:13: note: declared here
>      static void start_ch(struct sh_mobile_i2c_data *pd, struct
> i2c_msg *usr_msg,
>                  ^~~~~~~~
> 
> as it depends on commit 7957c2e276ee73e6 ("i2c: sh_mobile: use core to
> detect 'no zero length read' quirk"), which was not backported.
> 
> I think the easiest solution is to just drop "i2c: sh_mobile: define
> start_ch() void as it only returns 0 anyhow", as it was meant not to
> introduce any behavioral changes, and nothing depends on it.
> 
> Do you agree?
> Thanks!

Likewise, thanks for pointing this out.

Your proposed solution looks good to me.
Have you tested it?

> 
> >       i2c: sh_mobile: fix leak when using DMA bounce buffer
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
  2018-10-01 13:52   ` Simon Horman
@ 2018-10-01 13:58     ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-10-01 13:58 UTC (permalink / raw)
  To: Simon Horman; +Cc: Greg KH, ltsi-dev, Linux-Renesas, Magnus Damm, Wolfram Sang

Hi Simon,

On Mon, Oct 1, 2018 at 3:52 PM Simon Horman <horms@verge.net.au> wrote:
> On Mon, Oct 01, 2018 at 12:08:38PM +0200, Geert Uytterhoeven wrote:
> > On Tue, Sep 18, 2018 at 10:51 AM Simon Horman <horms@verge.net.au> wrote:
> > > This is intended as a submission to LTSI-4.14. It is the backport
> > > of a fixes for safe DMA buffer handling for the SH-Mobile I2C driver
> > > and I2C code. All patches are present in v4.19-rc3.
> > >
> > > This pull-request is based on
> > > "[GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix"
> > > tagged as backport/v4.14.61/snapshot-to-v4.18+fixes-flattened,
> > > which I have already sent a pull-request for.
> > >
> > > There are 10 patches.
> > >
> > > I have performed build testing of this backports on a wide range of
> > > defconfigs and I am not aware of any regressions over v4.14.40 (the
> > > baseline chosen when this work began).
> > >
> > > The following changes since commit 4d4605e5c137ed9a53582e573118cbc16b82cbf1:
> > >
> > >   i2c: rcar: implement STOP and REP_START according to docs (2018-08-28 13:35:06 +0200)
> > >
> > > are available in the git repository at:
> > >
> > >   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-backport.git backport/v4.14.61/snapshot-to-v4.18+fixes-v2-flattened
> > >
> > > for you to fetch changes up to 720043a4efbb3356db116d084c7b877ad41ee51a:
> > >
> > >   i2c: sh_mobile: fix leak when using DMA bounce buffer (2018-09-17 15:54:30 +0200)
> > >
> > > ----------------------------------------------------------------
> > > Second Round of LTSI-v4.14 Backports of I2C R-Car Fixes
> > >
> > > Base:
> > > * v4.14.61
> > > * Backports of components for Renesas SoCs to v4.18
> > > * First round of Backports of I2C R-Car Fixes
> > >
> > > Backport of post-v4.18 fix for i2c-shmobile and I2C core
> > > The focus of these fixes is to make DMA buffer handling safe
> > >
> > > ----------------------------------------------------------------
> > > Peter Rosin (1):
> > >       i2c: smbus: kill memory leak on emulated and failed DMA SMBus xfers
> > >
> > > Wenwen Wang (1):
> > >       i2c: core: smbus: fix a potential missing-check bug
> > >
> > > Wolfram Sang (8):
> > >       i2c: dev: mark RDWR buffers as DMA_SAFE
> > >       i2c: refactor i2c_master_{send_recv}
> > >       i2c: add i2c_master_{send|recv}_dmasafe
> > >       i2c: smbus: use DMA safe buffers for emulated SMBus transactions
> > >       i2c: add docs to clarify DMA handling
> > >       i2c: refactor function to release a DMA safe buffer
> > >       i2c: sh_mobile: define start_ch() void as it only returns 0 anyhow
> >
> > Somehow I missed that the above introduces a (rightful) compiler warning:
> >
> >     drivers/i2c/busses/i2c-sh_mobile.c: In function ‘start_ch’:
> >     drivers/i2c/busses/i2c-sh_mobile.c:616:10: warning: ‘return’ with
> > a value, in function returning void
> >        return -EOPNOTSUPP;
> >               ^
> >     drivers/i2c/busses/i2c-sh_mobile.c:611:13: note: declared here
> >      static void start_ch(struct sh_mobile_i2c_data *pd, struct
> > i2c_msg *usr_msg,
> >                  ^~~~~~~~
> >
> > as it depends on commit 7957c2e276ee73e6 ("i2c: sh_mobile: use core to
> > detect 'no zero length read' quirk"), which was not backported.
> >
> > I think the easiest solution is to just drop "i2c: sh_mobile: define
> > start_ch() void as it only returns 0 anyhow", as it was meant not to
> > introduce any behavioral changes, and nothing depends on it.
> >
> > Do you agree?
> > Thanks!
>
> Likewise, thanks for pointing this out.
>
> Your proposed solution looks good to me.
> Have you tested it?

More or less, the error case is not easily triggered, and the code should
behave as before.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
  2018-08-28 11:49 Simon Horman
@ 2018-08-30  8:44 ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-08-30  8:44 UTC (permalink / raw)
  To: Simon Horman; +Cc: ltsi-dev, Linux-Renesas, Magnus Damm

Hi Simon,

On Tue, Aug 28, 2018 at 1:49 PM Simon Horman <horms@verge.net.au> wrote:
> This is intended as a submission to LTSI-4.14. It is the backport
> of a fix for the R-Car I2C driver, and its dependency, both of which
> are present in linux-next 20180821.
>
> This pull-request is based on
> "[GIT PULL LTSI-4.14] Renesas SoCs and Drivers to v4.18-rc8",
> tagged as backport/v4.14.61/snapshot-to-v4.18-rc8+fixes-flattened,
> which I have already sent a pull-request for.
>
> There are 2 patches.
>
> I have performed build testing of this backports on a wide range of
> defconfigs and I am not aware of any regressions over v4.14.40 (the
> baseline chosen when this work began).
>
>
> The following changes since commit cc88cfdc0571385f098e82db47f5a16b6f44726e:
>
>   i2c: rcar: use the new get_bus_free callback (2018-08-09 17:22:00 +0200)
>
> are available in the git repository at:
>
>   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-backport.git backport/v4.14.61/snapshot-to-v4.18+fixes-flattened
>
> for you to fetch changes up to 4d4605e5c137ed9a53582e573118cbc16b82cbf1:
>
>   i2c: rcar: implement STOP and REP_START according to docs (2018-08-28 13:35:06 +0200)
>
> ----------------------------------------------------------------
> LTSI-v4.14 Backport or I2C R-Car Fix
>
> Base:
> * v4.14.61
> * Backports of components for Renesas SoCs to v4.18
>
> Backport of post-v4.18 fix for i2c-rcar:
> * implement STOP and REP_START according to docs
>
> Dependency of above
> * Refactor private flags of i2c-rcar driver
>
> ----------------------------------------------------------------
> Wolfram Sang (2):
>       i2c: rcar: refactor private flags
>       i2c: rcar: implement STOP and REP_START according to docs
>
>  drivers/i2c/busses/i2c-rcar.c | 39 +++++++++++++++++++++++----------------
>  1 file changed, 23 insertions(+), 16 deletions(-)

Thank you, looks good to me.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix
@ 2018-08-28 11:49 Simon Horman
  2018-08-30  8:44 ` Geert Uytterhoeven
  0 siblings, 1 reply; 10+ messages in thread
From: Simon Horman @ 2018-08-28 11:49 UTC (permalink / raw)
  To: ltsi-dev; +Cc: linux-renesas-soc, Magnus Damm, Geert Uytterhoeven

Hi,

This is intended as a submission to LTSI-4.14. It is the backport
of a fix for the R-Car I2C driver, and its dependency, both of which
are present in linux-next 20180821.

This pull-request is based on
"[GIT PULL LTSI-4.14] Renesas SoCs and Drivers to v4.18-rc8",
tagged as backport/v4.14.61/snapshot-to-v4.18-rc8+fixes-flattened,
which I have already sent a pull-request for.

There are 2 patches.

I have performed build testing of this backports on a wide range of
defconfigs and I am not aware of any regressions over v4.14.40 (the
baseline chosen when this work began).


The following changes since commit cc88cfdc0571385f098e82db47f5a16b6f44726e:

  i2c: rcar: use the new get_bus_free callback (2018-08-09 17:22:00 +0200)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-backport.git backport/v4.14.61/snapshot-to-v4.18+fixes-flattened

for you to fetch changes up to 4d4605e5c137ed9a53582e573118cbc16b82cbf1:

  i2c: rcar: implement STOP and REP_START according to docs (2018-08-28 13:35:06 +0200)

----------------------------------------------------------------
LTSI-v4.14 Backport or I2C R-Car Fix

Base:
* v4.14.61
* Backports of components for Renesas SoCs to v4.18

Backport of post-v4.18 fix for i2c-rcar:
* implement STOP and REP_START according to docs

Dependency of above
* Refactor private flags of i2c-rcar driver

----------------------------------------------------------------
Wolfram Sang (2):
      i2c: rcar: refactor private flags
      i2c: rcar: implement STOP and REP_START according to docs

 drivers/i2c/busses/i2c-rcar.c | 39 +++++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 16 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-10-01 20:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-18  8:50 [GIT PULL LTSI-4.14] LTSI-v4.14 Backport or I2C R-Car Fix Simon Horman
2018-09-18 10:07 ` Geert Uytterhoeven
2018-09-19  9:08   ` Simon Horman
2018-09-19  9:13     ` Geert Uytterhoeven
2018-09-19  9:25       ` Simon Horman
2018-10-01 10:08 ` Geert Uytterhoeven
2018-10-01 13:52   ` Simon Horman
2018-10-01 13:58     ` Geert Uytterhoeven
  -- strict thread matches above, loose matches on Subject: below --
2018-08-28 11:49 Simon Horman
2018-08-30  8:44 ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.