ACPI: PCC: Fix unintentional integer overflow
authorManank Patel <pmanank200502@gmail.com>
Mon, 17 Oct 2022 18:43:39 +0000 (00:13 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 26 Oct 2022 11:33:31 +0000 (13:33 +0200)
Fix an unintentional u32 overflow by changing PCC_CMD_WAIT_RETRIES_NUM
to 500ULL.

Fixes: 91cefefb6991 ("ACPI: PCC: replace wait_for_completion()")
Signed-off-by: Manank Patel <pmanank200502@gmail.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_pcc.c

index ee4ce5ba1fb2417e0b0b59a3ad8f6b1f5ec5430a..3e252be047b852d643269a8a70c4226d92968523 100644 (file)
@@ -27,7 +27,7 @@
  * Arbitrary retries in case the remote processor is slow to respond
  * to PCC commands
  */
-#define PCC_CMD_WAIT_RETRIES_NUM       500
+#define PCC_CMD_WAIT_RETRIES_NUM       500ULL
 
 struct pcc_data {
        struct pcc_mbox_chan *pcc_chan;