[PATCH 0/3] exec: Kill CPUReadMemoryFunc/CPUWriteMemoryFunc typedefs

Philippe Mathieu-Daudé posted 3 patches 3 years, 11 months ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200601075400.2043-1-f4bug@amsat.org
There is a newer version of this series
include/exec/cpu-common.h |  3 ---
include/exec/memory.h     |  6 -----
include/hw/usb.h          | 30 -------------------------
include/hw/usb/musb.h     | 47 +++++++++++++++++++++++++++++++++++++++
hw/usb/hcd-musb.c         |  5 +++--
hw/usb/tusb6010.c         |  1 +
6 files changed, 51 insertions(+), 41 deletions(-)
create mode 100644 include/hw/usb/musb.h
[PATCH 0/3] exec: Kill CPUReadMemoryFunc/CPUWriteMemoryFunc typedefs
Posted by Philippe Mathieu-Daudé 3 years, 11 months ago
Followed Peter's suggestions:

 * delete the unused MmeoryRegionMmio
 * move these typedefs into include/hw/usb.h and rename them
   to MUSBReadFunc and MUSBWriteFunc, since that's all they're
   used for now

https://www.mail-archive.com/qemu-devel@nongnu.org/msg708165.html

Philippe Mathieu-Daudé (3):
  exec/memory: Remove unused MemoryRegionMmio type
  hw/usb: Move device-specific declarations to new 'musb.h' header
  exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/musb.h'

 include/exec/cpu-common.h |  3 ---
 include/exec/memory.h     |  6 -----
 include/hw/usb.h          | 30 -------------------------
 include/hw/usb/musb.h     | 47 +++++++++++++++++++++++++++++++++++++++
 hw/usb/hcd-musb.c         |  5 +++--
 hw/usb/tusb6010.c         |  1 +
 6 files changed, 51 insertions(+), 41 deletions(-)
 create mode 100644 include/hw/usb/musb.h

-- 
2.21.3


Re: [PATCH 0/3] exec: Kill CPUReadMemoryFunc/CPUWriteMemoryFunc typedefs
Posted by Peter Maydell 3 years, 11 months ago
On Mon, 1 Jun 2020 at 08:54, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Followed Peter's suggestions:
>
>  * delete the unused MmeoryRegionMmio
>  * move these typedefs into include/hw/usb.h and rename them
>    to MUSBReadFunc and MUSBWriteFunc, since that's all they're
>    used for now

>  include/exec/cpu-common.h |  3 ---
>  include/exec/memory.h     |  6 -----
>  include/hw/usb.h          | 30 -------------------------
>  include/hw/usb/musb.h     | 47 +++++++++++++++++++++++++++++++++++++++
>  hw/usb/hcd-musb.c         |  5 +++--
>  hw/usb/tusb6010.c         |  1 +

I think we usually would give the .h file a name matching the .c file,
so include/hw/usb/hcd-musb.h ?

Either way, whole series:
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

Re: [PATCH 0/3] exec: Kill CPUReadMemoryFunc/CPUWriteMemoryFunc typedefs
Posted by Philippe Mathieu-Daudé 3 years, 11 months ago
On 6/1/20 12:35 PM, Peter Maydell wrote:
> On Mon, 1 Jun 2020 at 08:54, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>
>> Followed Peter's suggestions:
>>
>>  * delete the unused MmeoryRegionMmio
>>  * move these typedefs into include/hw/usb.h and rename them
>>    to MUSBReadFunc and MUSBWriteFunc, since that's all they're
>>    used for now
> 
>>  include/exec/cpu-common.h |  3 ---
>>  include/exec/memory.h     |  6 -----
>>  include/hw/usb.h          | 30 -------------------------
>>  include/hw/usb/musb.h     | 47 +++++++++++++++++++++++++++++++++++++++
>>  hw/usb/hcd-musb.c         |  5 +++--
>>  hw/usb/tusb6010.c         |  1 +
> 
> I think we usually would give the .h file a name matching the .c file,
> so include/hw/usb/hcd-musb.h ?

Indeed, I'll update.

> 
> Either way, whole series:
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

Thanks!

> 
> thanks
> -- PMM
>