LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Tyrel Datwyler <tyreld@linux.ibm.com>
Cc: nathanl@linux.ibm.com, linuxppc-dev@lists.ozlabs.org,
	Tyrel Datwyler <tyreld@linux.ibm.com>
Subject: Re: [PATCH 7/9] PCI: rpaphp: annotate and correctly byte swap DRC properties
Date: Thu, 07 Nov 2019 22:40:19 +1100
Message-ID: <8736ez6hjw.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <1572967453-9586-8-git-send-email-tyreld@linux.ibm.com>

Tyrel Datwyler <tyreld@linux.ibm.com> writes:
> The device tree is in big endian format and any properties directly
> retrieved using OF helpers that don't explicitly byte swap should
> be annotated. In particular there are several places where we grab
> the opaque property value for the old ibm,drc-* properties and the
> ibm,my-drc-index property.
>
> Fix this for better static checking by annotating values we know to
> explicitly big endian, and byte swap where appropriate.
>
> Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
> ---
>  drivers/pci/hotplug/rpaphp_core.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)

This is allegedly still popping some sparse warnings:

  +drivers/pci/hotplug/rpaphp_core.c:XX:28: warning: incorrect type in assignment (different base types) expected restricted __be32 const [usertype] * got int const *[assigned] names
  +drivers/pci/hotplug/rpaphp_core.c:XX:28: warning: incorrect type in assignment (different base types) expected restricted __be32 const [usertype] * got int const *[assigned] types
  +drivers/pci/hotplug/rpaphp_core.c:XX:30: warning: incorrect type in assignment (different base types) expected restricted __be32 const [usertype] * got int const *[assigned] indexes
  +drivers/pci/hotplug/rpaphp_core.c:XX:36: warning: incorrect type in assignment (different base types) expected restricted __be32 const [usertype] * got int const *[assigned] domains


I say allegedly because that output's from a script that tries to diff
sparse warnings before and after the build and it's not always 100% reliable.

cheers

  reply index

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05 15:24 [PATCH 0/9] Fixes and Enablement of ibm,drc-info property Tyrel Datwyler
2019-11-05 15:24 ` [PATCH 1/9] powerpc/pseries: Fix bad drc_index_start value parsing of drc-info entry Tyrel Datwyler
2019-11-05 15:24 ` [PATCH 2/9] powerpc/pseries: Fix drc-info mappings of logical cpus to drc-index Tyrel Datwyler
2019-11-05 15:24 ` [PATCH 3/9] powerpc/pseries: Add cpu DLPAR support for drc-info property Tyrel Datwyler
2019-11-05 16:55   ` Thomas Falcon
2019-11-06 20:15     ` Tyrel Datwyler
2019-11-07 11:35   ` Michael Ellerman
2019-11-05 15:24 ` [PATCH 4/9] PCI: rpaphp: Fix up pointer to first drc-info entry Tyrel Datwyler
2019-11-05 15:24 ` [PATCH 5/9] PCI: rpaphp: Don't rely on firmware feature to imply drc-info support Tyrel Datwyler
2019-11-05 15:24 ` [PATCH 6/9] PCI: rpaphp: Add drc-info support for hotplug slot registration Tyrel Datwyler
2019-11-05 15:24 ` [PATCH 7/9] PCI: rpaphp: annotate and correctly byte swap DRC properties Tyrel Datwyler
2019-11-07 11:40   ` Michael Ellerman [this message]
2019-11-05 15:24 ` [PATCH 8/9] PCI: rpaphp: Correctly match ibm, my-drc-index to drc-name when using drc-info Tyrel Datwyler
2019-11-05 15:24 ` [PATCH 9/9] powerpc/pseries: Enable support for ibm, drc-info property Tyrel Datwyler
2019-11-07 11:38   ` Michael Ellerman
2019-11-05 17:03 ` [PATCH 0/9] Fixes and Enablement of ibm,drc-info property Thomas Falcon
2019-11-06 20:12   ` Tyrel Datwyler
2019-11-07 11:26     ` Michael Ellerman

Reply instructions:

You may reply publically 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=8736ez6hjw.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nathanl@linux.ibm.com \
    --cc=tyreld@linux.ibm.com \
    /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

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git