diff mbox series

[5/6] docs/devel/reset: Update to new API for hold and exit phase methods

Message ID 20240412160809.1260625-6-peter.maydell@linaro.org
State New
Headers show
Series reset: Add RESET_TYPE_SNAPSHOT_LOAD | expand

Commit Message

Peter Maydell April 12, 2024, 4:08 p.m. UTC
Update the reset documentation's example code to match the new API
for the hold and exit phase method APIs where they take a ResetType
argument.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 docs/devel/reset.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Richard Henderson April 12, 2024, 5:27 p.m. UTC | #1
On 4/12/24 09:08, Peter Maydell wrote:
> Update the reset documentation's example code to match the new API
> for the hold and exit phase method APIs where they take a ResetType
> argument.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   docs/devel/reset.rst | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Philippe Mathieu-Daudé April 12, 2024, 5:29 p.m. UTC | #2
On 12/4/24 18:08, Peter Maydell wrote:
> Update the reset documentation's example code to match the new API
> for the hold and exit phase method APIs where they take a ResetType
> argument.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   docs/devel/reset.rst | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Luc Michel April 16, 2024, 9:10 a.m. UTC | #3
On 17:08 Fri 12 Apr     , Peter Maydell wrote:
> Update the reset documentation's example code to match the new API
> for the hold and exit phase method APIs where they take a ResetType
> argument.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Luc Michel <luc.michel@amd.com>

> ---
>  docs/devel/reset.rst | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/devel/reset.rst b/docs/devel/reset.rst
> index 2ea85e7779b..49baa1ea271 100644
> --- a/docs/devel/reset.rst
> +++ b/docs/devel/reset.rst
> @@ -150,25 +150,25 @@ in reset.
>          mydev->var = 0;
>      }
> 
> -    static void mydev_reset_hold(Object *obj)
> +    static void mydev_reset_hold(Object *obj, ResetType type)
>      {
>          MyDevClass *myclass = MYDEV_GET_CLASS(obj);
>          MyDevState *mydev = MYDEV(obj);
>          /* call parent class hold phase */
>          if (myclass->parent_phases.hold) {
> -            myclass->parent_phases.hold(obj);
> +            myclass->parent_phases.hold(obj, type);
>          }
>          /* set an IO */
>          qemu_set_irq(mydev->irq, 1);
>      }
> 
> -    static void mydev_reset_exit(Object *obj)
> +    static void mydev_reset_exit(Object *obj, ResetType type)
>      {
>          MyDevClass *myclass = MYDEV_GET_CLASS(obj);
>          MyDevState *mydev = MYDEV(obj);
>          /* call parent class exit phase */
>          if (myclass->parent_phases.exit) {
> -            myclass->parent_phases.exit(obj);
> +            myclass->parent_phases.exit(obj, type);
>          }
>          /* clear an IO */
>          qemu_set_irq(mydev->irq, 0);
> --
> 2.34.1
> 
> 

--
diff mbox series

Patch

diff --git a/docs/devel/reset.rst b/docs/devel/reset.rst
index 2ea85e7779b..49baa1ea271 100644
--- a/docs/devel/reset.rst
+++ b/docs/devel/reset.rst
@@ -150,25 +150,25 @@  in reset.
         mydev->var = 0;
     }
 
-    static void mydev_reset_hold(Object *obj)
+    static void mydev_reset_hold(Object *obj, ResetType type)
     {
         MyDevClass *myclass = MYDEV_GET_CLASS(obj);
         MyDevState *mydev = MYDEV(obj);
         /* call parent class hold phase */
         if (myclass->parent_phases.hold) {
-            myclass->parent_phases.hold(obj);
+            myclass->parent_phases.hold(obj, type);
         }
         /* set an IO */
         qemu_set_irq(mydev->irq, 1);
     }
 
-    static void mydev_reset_exit(Object *obj)
+    static void mydev_reset_exit(Object *obj, ResetType type)
     {
         MyDevClass *myclass = MYDEV_GET_CLASS(obj);
         MyDevState *mydev = MYDEV(obj);
         /* call parent class exit phase */
         if (myclass->parent_phases.exit) {
-            myclass->parent_phases.exit(obj);
+            myclass->parent_phases.exit(obj, type);
         }
         /* clear an IO */
         qemu_set_irq(mydev->irq, 0);