All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: aliguori@us.ibm.com, mjt@tls.msk.ru, qemu-devel@nongnu.org,
	agraf@suse.de, blauwirbel@gmail.com, qemu-ppc@nongnu.org,
	aviksil@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v4 5/6] ppc: Don't duplicate QEMUMachineInitArgs in PPCE500Params
Date: Mon, 19 Aug 2013 11:36:59 +0200	[thread overview]
Message-ID: <5211E73B.6050206@redhat.com> (raw)
In-Reply-To: <87pptadoed.fsf@blackfin.pond.sub.org>

On 08/19/13 11:24, Markus Armbruster wrote:
> Laszlo Ersek <lersek@redhat.com> writes:

>> Please always use
>>
>>   -O/path/to/order_file
>>
>> when invoking git-format-patch.
>>
>> The contents of "order_file" should be minimally
>>
>>   configure
>>   Makefile*
>>   *.json
>>   *.h
>>   *.c
>>
>> It's much easier to review a patch when "declarative changes" are shown
>> first (ie. in approximate logical dependency order).
> 
> Is there a way to put this in .git/config?

The only way we've found thus far is to introduce a new alias for
git-format-patch that hardwires it.

> Should http://wiki.qemu.org/Contribute/SubmitAPatch ask for this?

Not a bad idea, but I'm afraid new contributors don't read it because
they don't know about it, and veteran contributors don't read it because
they don't need it.

The wiki would need a usable table of contents anyway, I have great
trouble every time I want to find anything. Wikipedia probably should
not have a flat sitemap for its millions of articles. The qemu wiki
should, for its handful.

Laszlo

> 
>> Then,
>>
>>> -void ppce500_init(PPCE500Params *params)
>>> +void ppce500_init(QEMUMachineInitArgs *args, PPCE500Params *params)
>>>  {
>>>      MemoryRegion *address_space_mem = get_system_memory();
>>>      MemoryRegion *ram = g_new(MemoryRegion, 1);
>>> @@ -584,8 +585,8 @@ void ppce500_init(PPCE500Params *params)
>>>      PPCE500CCSRState *ccsr;
>>>  
>>>      /* Setup CPUs */
>>> -    if (params->cpu_model == NULL) {
>>> -        params->cpu_model = "e500v2_v30";
>>> +    if (args->cpu_model == NULL) {
>>> +        args->cpu_model = "e500v2_v30";
>>>      }
>>
>> As discussed before, this change will modify the "args.cpu_model" member
>> in main(), but that's OK.
>>
>>
>>> @@ -634,7 +635,7 @@ void ppce500_init(PPCE500Params *params)
>>>  
>>>      /* Fixup Memory size on a alignment boundary */
>>>      ram_size &= ~(RAM_SIZES_ALIGN - 1);
>>> -    params->ram_size = ram_size;
>>> +    args->ram_size = ram_size;
>>
>> This hackery (commendably left intact by the patch) is convincing me
>> that QEMUMachineInitArgs should not have a "ram_size" member at all. If
>> "ram_size" is a well-founded global, then let's treat it as such. Whatever.
> 
> Global variables are often bad style (there are exceptions).  Even worse
> is passing what is essentially global state down call chains while
> keeping the global variables around for random poking.  And that's what
> we tend to do %-/
> 
>> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 
> Thanks!
> 

  reply	other threads:[~2013-08-19  9:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16 11:13 [Qemu-devel] [PATCH v4 0/6] Clean up bogus default boot order armbru
2013-08-16 11:13 ` [Qemu-devel] [PATCH v4 1/6] pc: Don't prematurely explode QEMUMachineInitArgs armbru
2013-08-17 10:07   ` Laszlo Ersek
2013-08-19  9:09     ` Markus Armbruster
2013-08-21 18:05   ` Eduardo Habkost
2013-08-16 11:13 ` [Qemu-devel] [PATCH v4 2/6] pc: Don't explode QEMUMachineInitArgs into local variables needlessly armbru
2013-08-17 10:12   ` Laszlo Ersek
2013-08-21 18:06   ` Eduardo Habkost
2013-08-16 11:13 ` [Qemu-devel] [PATCH v4 3/6] sun4: Don't prematurely explode QEMUMachineInitArgs armbru
2013-08-17 10:29   ` Laszlo Ersek
2013-08-19  9:15     ` Markus Armbruster
2013-08-16 11:13 ` [Qemu-devel] [PATCH v4 4/6] ppc: Don't explode QEMUMachineInitArgs into local variables needlessly armbru
2013-08-17 10:33   ` Laszlo Ersek
2013-08-16 11:13 ` [Qemu-devel] [PATCH v4 5/6] ppc: Don't duplicate QEMUMachineInitArgs in PPCE500Params armbru
2013-08-17 10:46   ` Laszlo Ersek
2013-08-19  9:24     ` Markus Armbruster
2013-08-19  9:36       ` Laszlo Ersek [this message]
2013-08-16 11:13 ` [Qemu-devel] [PATCH v4 6/6] hw: Clean up bogus default boot order armbru
2013-08-17 11:59   ` Laszlo Ersek
2013-08-21 20:28 ` [Qemu-devel] [PATCH v4 0/6] " Michael S. Tsirkin
2013-08-21 20:29   ` Michael S. Tsirkin
2013-08-23 12:31   ` Markus Armbruster
2013-08-25 11:10     ` Michael S. Tsirkin

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=5211E73B.6050206@redhat.com \
    --to=lersek@redhat.com \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=aviksil@linux.vnet.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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.