All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Erhard F." <erhard_f@mailbox.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Aishwarya R <aishwaryarj100@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Richard Fontana <rfontana@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-i2c@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: powermac: Simplify reading the "reg" and "i2c-address" property
Date: Wed, 22 Apr 2020 23:07:14 +0200	[thread overview]
Message-ID: <20200422230709.19a81ef9@supah> (raw)
In-Reply-To: <20200421093712.GA1241@ninjato>

On Tue, 21 Apr 2020 11:37:13 +0200
Wolfram Sang <wsa@the-dreams.de> wrote:

> On Wed, Apr 15, 2020 at 06:49:14PM +0530, Aishwarya R wrote:
> > >> Use of_property_read_u32 to read the "reg" and "i2c-address" property
> > >> instead of using of_get_property to check the return values.
> > >>
> > >> Signed-off-by: Aishwarya R <aishwaryarj100@gmail.com>  
> >   
> > > This is quite a fragile driver. Have you tested it on HW?  
> > 
> > This change is not tested with the Hardware.
> > But of_property_read_u32 is better here than generic of_get_property.
> > This make sure that value read properly independent of system endianess.  
> 
> This driver is only used on PPC_BE. And it is *very* fragile. The gain
> is not enough for me to accept it without testing. Maybe Erhard (CCed)
> is interested. If not, you may find someone on the ppc lists.
> 

I applied the patch on top of kernel 5.6.6 and tested it on a PowerMac G4 3,6 DP and a PowerMac G5 11,2. Both machines run without anything suspicious going on. dmesg | grep i2c looks the same with patch and without patch.

Tested-by: Erhard Furtner <erhard_f@mailbox.org>

WARNING: multiple messages have this Message-ID (diff)
From: "Erhard F." <erhard_f@mailbox.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	Richard Fontana <rfontana@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	linux-i2c@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linuxppc-dev@lists.ozlabs.org,
	Aishwarya R <aishwaryarj100@gmail.com>
Subject: Re: [PATCH] i2c: powermac: Simplify reading the "reg" and "i2c-address" property
Date: Wed, 22 Apr 2020 23:07:14 +0200	[thread overview]
Message-ID: <20200422230709.19a81ef9@supah> (raw)
In-Reply-To: <20200421093712.GA1241@ninjato>

On Tue, 21 Apr 2020 11:37:13 +0200
Wolfram Sang <wsa@the-dreams.de> wrote:

> On Wed, Apr 15, 2020 at 06:49:14PM +0530, Aishwarya R wrote:
> > >> Use of_property_read_u32 to read the "reg" and "i2c-address" property
> > >> instead of using of_get_property to check the return values.
> > >>
> > >> Signed-off-by: Aishwarya R <aishwaryarj100@gmail.com>  
> >   
> > > This is quite a fragile driver. Have you tested it on HW?  
> > 
> > This change is not tested with the Hardware.
> > But of_property_read_u32 is better here than generic of_get_property.
> > This make sure that value read properly independent of system endianess.  
> 
> This driver is only used on PPC_BE. And it is *very* fragile. The gain
> is not enough for me to accept it without testing. Maybe Erhard (CCed)
> is interested. If not, you may find someone on the ppc lists.
> 

I applied the patch on top of kernel 5.6.6 and tested it on a PowerMac G4 3,6 DP and a PowerMac G5 11,2. Both machines run without anything suspicious going on. dmesg | grep i2c looks the same with patch and without patch.

Tested-by: Erhard Furtner <erhard_f@mailbox.org>

  reply	other threads:[~2020-04-22 21:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 10:03 [PATCH] i2c: powermac: Simplify reading the "reg" and "i2c-address" property Aishwarya R
2020-04-08 10:03 ` Aishwarya R
2020-04-15 11:12 ` Wolfram Sang
2020-04-15 11:12   ` Wolfram Sang
2020-04-15 13:19 ` Aishwarya R
2020-04-15 13:19   ` Aishwarya R
2020-04-21  9:37   ` Wolfram Sang
2020-04-21  9:37     ` Wolfram Sang
2020-04-22 21:07     ` Erhard F. [this message]
2020-04-22 21:07       ` Erhard F.
2020-04-26  8:32 ` Wolfram Sang
2020-04-26  8:32   ` 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=20200422230709.19a81ef9@supah \
    --to=erhard_f@mailbox.org \
    --cc=aishwaryarj100@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=rfontana@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=wsa@the-dreams.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 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.