Patch "PM: hibernate: Fix mistake in kerneldoc comment" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PM: hibernate: Fix mistake in kerneldoc comment

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pm-hibernate-fix-mistake-in-kerneldoc-comment.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 41033716b746ba86bed2cb034c94175ebb9d2497
Author: xiongxin <xiongxin@xxxxxxxxxx>
Date:   Tue Nov 1 10:28:39 2022 +0800

    PM: hibernate: Fix mistake in kerneldoc comment
    
    [ Upstream commit 6e5d7300cbe7c3541bc31f16db3e9266e6027b4b ]
    
    The actual maximum image size formula in hibernate_preallocate_memory()
    is as follows:
    
    max_size = (count - (size + PAGES_FOR_IO)) / 2
                - 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE);
    
    but the one in the kerneldoc comment of the function is different and
    incorrect.
    
    Fixes: ddeb64870810 ("PM / Hibernate: Add sysfs knob to control size of memory for drivers")
    Signed-off-by: xiongxin <xiongxin@xxxxxxxxxx>
    [ rjw: Subject and changelog rewrite ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 5dfac92521fa..b02850cfc8ee 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -1677,8 +1677,8 @@ static unsigned long minimum_image_size(unsigned long saveable)
  * /sys/power/reserved_size, respectively).  To make this happen, we compute the
  * total number of available page frames and allocate at least
  *
- * ([page frames total] + PAGES_FOR_IO + [metadata pages]) / 2
- *  + 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE)
+ * ([page frames total] - PAGES_FOR_IO - [metadata pages]) / 2
+ *  - 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE)
  *
  * of them, which corresponds to the maximum size of a hibernation image.
  *



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux