* [PATCH] scripts/coverity-scan/model.c: update address_space_*_cached
@ 2022-12-23 20:43 Vladimir Sementsov-Ogievskiy
2022-12-24 11:22 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2022-12-23 20:43 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, armbru, pbonzini, vsementsov
Make prototypes correspond to their origins. Also drop
address_space_rw_cached() which doesn't exist anywhere in the code.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
scripts/coverity-scan/model.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/scripts/coverity-scan/model.c b/scripts/coverity-scan/model.c
index 686d1a3008..b40d0fcbf3 100644
--- a/scripts/coverity-scan/model.c
+++ b/scripts/coverity-scan/model.c
@@ -69,7 +69,6 @@ static void __bufread(uint8_t *buf, ssize_t len)
}
MemTxResult address_space_read_cached(MemoryRegionCache *cache, hwaddr addr,
- MemTxAttrs attrs,
void *buf, int len)
{
MemTxResult result;
@@ -80,25 +79,13 @@ MemTxResult address_space_read_cached(MemoryRegionCache *cache, hwaddr addr,
}
MemTxResult address_space_write_cached(MemoryRegionCache *cache, hwaddr addr,
- MemTxAttrs attrs,
- const void *buf, int len)
+ const void *buf, int len)
{
MemTxResult result;
__bufread(buf, len);
return result;
}
-MemTxResult address_space_rw_cached(MemoryRegionCache *cache, hwaddr addr,
- MemTxAttrs attrs,
- void *buf, int len, bool is_write)
-{
- if (is_write) {
- return address_space_write_cached(cache, addr, attrs, buf, len);
- } else {
- return address_space_read_cached(cache, addr, attrs, buf, len);
- }
-}
-
MemTxResult address_space_read(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs,
void *buf, int len)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/coverity-scan/model.c: update address_space_*_cached
2022-12-23 20:43 [PATCH] scripts/coverity-scan/model.c: update address_space_*_cached Vladimir Sementsov-Ogievskiy
@ 2022-12-24 11:22 ` Philippe Mathieu-Daudé
2022-12-26 22:06 ` Vladimir Sementsov-Ogievskiy
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-24 11:22 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy, qemu-devel; +Cc: peter.maydell, armbru, pbonzini
On 23/12/22 21:43, Vladimir Sementsov-Ogievskiy wrote:
> Make prototypes correspond to their origins. Also drop
> address_space_rw_cached() which doesn't exist anywhere in the code.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> scripts/coverity-scan/model.c | 15 +--------------
> 1 file changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/scripts/coverity-scan/model.c b/scripts/coverity-scan/model.c
> index 686d1a3008..b40d0fcbf3 100644
> --- a/scripts/coverity-scan/model.c
> +++ b/scripts/coverity-scan/model.c
> @@ -69,7 +69,6 @@ static void __bufread(uint8_t *buf, ssize_t len)
> }
>
> MemTxResult address_space_read_cached(MemoryRegionCache *cache, hwaddr addr,
> - MemTxAttrs attrs,
> void *buf, int len)
> {
> MemTxResult result;
> @@ -80,25 +79,13 @@ MemTxResult address_space_read_cached(MemoryRegionCache *cache, hwaddr addr,
> }
>
> MemTxResult address_space_write_cached(MemoryRegionCache *cache, hwaddr addr,
> - MemTxAttrs attrs,
> - const void *buf, int len)
> + const void *buf, int len)
> {
Oops, missed in commit daa3dda43a ("exec: Let the address_space API use
void pointer arguments").
> -MemTxResult address_space_rw_cached(MemoryRegionCache *cache, hwaddr addr,
> - MemTxAttrs attrs,
> - void *buf, int len, bool is_write)
> -{
> - if (is_write) {
> - return address_space_write_cached(cache, addr, attrs, buf, len);
> - } else {
> - return address_space_read_cached(cache, addr, attrs, buf, len);
> - }
> -}
Apparently never required?
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/coverity-scan/model.c: update address_space_*_cached
2022-12-24 11:22 ` Philippe Mathieu-Daudé
@ 2022-12-26 22:06 ` Vladimir Sementsov-Ogievskiy
0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2022-12-26 22:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: peter.maydell, armbru, pbonzini
On 12/24/22 14:22, Philippe Mathieu-Daudé wrote:
> On 23/12/22 21:43, Vladimir Sementsov-Ogievskiy wrote:
>> Make prototypes correspond to their origins. Also drop
>> address_space_rw_cached() which doesn't exist anywhere in the code.
>>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
>> ---
>> scripts/coverity-scan/model.c | 15 +--------------
>> 1 file changed, 1 insertion(+), 14 deletions(-)
>>
>> diff --git a/scripts/coverity-scan/model.c b/scripts/coverity-scan/model.c
>> index 686d1a3008..b40d0fcbf3 100644
>> --- a/scripts/coverity-scan/model.c
>> +++ b/scripts/coverity-scan/model.c
>> @@ -69,7 +69,6 @@ static void __bufread(uint8_t *buf, ssize_t len)
>> }
>> MemTxResult address_space_read_cached(MemoryRegionCache *cache, hwaddr addr,
>> - MemTxAttrs attrs,
>> void *buf, int len)
>> {
>> MemTxResult result;
>> @@ -80,25 +79,13 @@ MemTxResult address_space_read_cached(MemoryRegionCache *cache, hwaddr addr,
>> }
>> MemTxResult address_space_write_cached(MemoryRegionCache *cache, hwaddr addr,
>> - MemTxAttrs attrs,
>> - const void *buf, int len)
>> + const void *buf, int len)
>> {
>
> Oops, missed in commit daa3dda43a ("exec: Let the address_space API use
> void pointer arguments").
>
>> -MemTxResult address_space_rw_cached(MemoryRegionCache *cache, hwaddr addr,
>> - MemTxAttrs attrs,
>> - void *buf, int len, bool is_write)
>> -{
>> - if (is_write) {
>> - return address_space_write_cached(cache, addr, attrs, buf, len);
>> - } else {
>> - return address_space_read_cached(cache, addr, attrs, buf, len);
>> - }
>> -}
>
> Apparently never required?
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
Thanks for reviewing!
Seems, even better patch is possible, we can get rid of the whole physmem-related modelling, look at "[PATCH] coverity: physmem: use simple assertions instead of modelling".
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-26 22:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23 20:43 [PATCH] scripts/coverity-scan/model.c: update address_space_*_cached Vladimir Sementsov-Ogievskiy
2022-12-24 11:22 ` Philippe Mathieu-Daudé
2022-12-26 22:06 ` Vladimir Sementsov-Ogievskiy
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.