All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@fr.ibm.com>
To: Greg Kurz <gkurz@linux.vnet.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH v2] spapr: compute interrupt vector address from LPCR
Date: Thu, 31 Mar 2016 11:33:56 +0200	[thread overview]
Message-ID: <56FCEF04.6070708@fr.ibm.com> (raw)
In-Reply-To: <56FCDDC9.3080109@fr.ibm.com>


>>> Index: qemu-dgibson-for-2.6.git/hw/ppc/spapr_hcall.c
>>> ===================================================================
>>> --- qemu-dgibson-for-2.6.git.orig/hw/ppc/spapr_hcall.c
>>> +++ qemu-dgibson-for-2.6.git/hw/ppc/spapr_hcall.c
>>> @@ -835,17 +835,8 @@ static target_ulong h_set_mode_resource_
>>>          return H_P4;
>>>      }
>>>
>>> -    switch (mflags) {
>>> -    case H_SET_MODE_ADDR_TRANS_NONE:
>>> -        prefix = 0;
>>> -        break;
>>> -    case H_SET_MODE_ADDR_TRANS_0001_8000:
>>> -        prefix = 0x18000;
>>> -        break;
>>> -    case H_SET_MODE_ADDR_TRANS_C000_0000_0000_4000:
>>> -        prefix = 0xC000000000004000ULL;
>>> -        break;
>>> -    default:
>>> +    prefix = cpu_ppc_get_excp_prefix(mflags);
>>> +    if (prefix == (target_ulong) -1ULL) {
>>
>> +    if (prefix == (target_ulong) (-1ULL)) {
>>
>> to make ./scripts/checkpatch.pl happy :)
> 
> yes. 
> 
> The funny thing is that checkpatch.pl does not complain for the exact
> same line below. Looks like a checkpatch.pl bug to me.

Well, the reason is that a new possible type 'target_ulong' is caught a 
little late in the checkpatch process and this is why the script complains 
at the first occurrence.

Pointer casts are caught early but not casts, probably because this is too
complex to catch with a regex.
 
So the easy fix would be to add 'target_ulong' in the @typeList array. 
This seems reasonable enough as 'target_ulong' is a common qemu type.

C.

  reply	other threads:[~2016-03-31  9:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 15:38 [Qemu-devel] [PATCH v2] spapr: compute interrupt vector address from LPCR Cédric Le Goater
2016-03-30 17:01 ` Greg Kurz
2016-03-30 17:15   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-03-30 17:12 ` [Qemu-devel] " Greg Kurz
2016-03-31  8:20   ` Cédric Le Goater
2016-03-31  9:33     ` Cédric Le Goater [this message]
2016-03-31  4:55 ` David Gibson
2016-03-31  7:13   ` [Qemu-devel] [Qemu-ppc] " Mark Cave-Ayland
2016-04-01  2:43     ` David Gibson
2016-04-03 17:57       ` Cédric Le Goater
2016-04-04  4:16         ` David Gibson
2016-04-04 14:47           ` Cédric Le Goater
2016-04-05  0:54             ` David Gibson
2016-03-31  8:16   ` [Qemu-devel] " Cédric Le Goater
2016-04-01  3:34   ` [Qemu-devel] [Qemu-ppc] " David Gibson

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=56FCEF04.6070708@fr.ibm.com \
    --to=clg@fr.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=gkurz@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.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
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.