Skip to contentSkip to conversation

exec.c: Remove out of date comment

PATCH Applied Peter Maydell 3 participants 5 messages Aug 1, 2012 – Aug 3, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 exec.c: Remove out of date comment

Remove an out of date comment: this comment used to be attached to cpu_register_physical_memory_log(), before commit 0f0cb164 accidentally inserted a couple of other functions between the comment and its function. It is in any case obsolete since (a) the function arguments it refers to have been replaced with a single MemoryRegionSection* argument and
(b) the inability to handle regions whose offset_within_address_space and offset_within_region aren't equally aligned was fixed as part of the rewrite of this code.

---
Pretty sure my analysis is right and this comment is out of date -- Avi, could you confirm that please?

 exec.c |    8 --------
 1 file changed, 8 deletions(-)
exec.c +0 -8
index feb4795..22dff17 100644
@@ -2240,14 +2240,6 @@ static void phys_sections_clear(void)
     phys_sections_nb = 0;
 }
 
-/* register physical memory.
-   For RAM, 'size' must be a multiple of the target page size.
-   If (phys_offset & ~TARGET_PAGE_MASK) != 0, then it is an
-   io memory page.  The address used when calling the IO function is
-   the offset from the start of the region, plus region_offset.  Both
-   start_addr and region_offset are rounded down to a page boundary
-   before calculating this offset.  This should not be a problem unless
-   the low bits of start_addr and region_offset differ.  */
 static void register_subpage(MemoryRegionSection *section)
 {
     subpage_t *subpage;
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 8 lines · Peter Maydell

Remove an out of date comment: this comment used to be attached to cpu_register_physical_memory_log(), before commit 0f0cb164 accidentally inserted a couple of other functions between the comment and its function. It is in any case obsolete since (a) the function arguments it refers to have been replaced with a single MemoryRegionSection* argument and
(b) the inability to handle regions whose offset_within_address_space and offset_within_region aren't equally aligned was fixed as part of the rewrite of this code.

(c) it doesn't use the conventional block comment style.

Quoted 5 lines

---
Pretty sure my analysis is right and this comment is out of date -- Avi, could you confirm that please?

Yes, you are correct.

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw
Quoted 11 lines · Avi Kivity
Quoted 8 lines · Peter Maydell

Remove an out of date comment: this comment used to be attached to cpu_register_physical_memory_log(), before commit 0f0cb164 accidentally inserted a couple of other functions between the comment and its function. It is in any case obsolete since (a) the function arguments it refers to have been replaced with a single MemoryRegionSection* argument and
(b) the inability to handle regions whose offset_within_address_space and offset_within_region aren't equally aligned was fixed as part of the rewrite of this code.

(c) it doesn't use the conventional block comment style.

I agree that I don't like the aesthetics of this style of comment but we don't actually mandate a One True Comment Format in HACKING so I usually try to suppress my preferences in code review :-)

-- PMM

#3 lore raw
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Avi Kivity
Quoted 8 lines · Peter Maydell

Remove an out of date comment: this comment used to be attached to cpu_register_physical_memory_log(), before commit 0f0cb164 accidentally inserted a couple of other functions between the comment and its function. It is in any case obsolete since (a) the function arguments it refers to have been replaced with a single MemoryRegionSection* argument and
(b) the inability to handle regions whose offset_within_address_space and offset_within_region aren't equally aligned was fixed as part of the rewrite of this code.

Quoted 5 lines
Quoted 1 line

(c) it doesn't use the conventional block comment style.

I agree that I don't like the aesthetics of this style of comment but we don't actually mandate a One True Comment Format in HACKING so I usually try to suppress my preferences in code review :-)

Indeed comment style is quite low on the patch rejection scale, which is why I didn't ask for a preliminary patch that fixes the comment style before deleting it in the second one (giving us the option to backport the first patch to qemu 1.1.stable if we get user complaints).

Signature · 1 line
error compiling committee.c: too many arguments to function
#4 lore raw
In reply to Peter Maydell
Quoted 9 lines · Peter Maydell

Remove an out of date comment: this comment used to be attached to cpu_register_physical_memory_log(), before commit 0f0cb164 accidentally inserted a couple of other functions between the comment and its function. It is in any case obsolete since (a) the function arguments it refers to have been replaced with a single MemoryRegionSection* argument and
(b) the inability to handle regions whose offset_within_address_space and offset_within_region aren't equally aligned was fixed as part of the rewrite of this code.

Quoted 7 lines

---
Pretty sure my analysis is right and this comment is out of date -- Avi, could you confirm that please?

 exec.c |    8 --------
 1 file changed, 8 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan