Re: [PATCH v2] ACPI: NFIT: Optimize nfit_mem_cmp() for efficiency

2023-10-18 Thread Kuan-Wei Chiu
On Wed, Oct 18, 2023 at 01:17:31PM +0200, Rafael J. Wysocki wrote: > On Fri, Oct 13, 2023 at 2:22 PM Kuan-Wei Chiu wrote: > > > > The original code used conditional branching in the nfit_mem_cmp > > function to compare two values and return -1, 1, or 0 based on th

[PATCH v2] ACPI: NFIT: Optimize nfit_mem_cmp() for efficiency

2023-10-13 Thread Kuan-Wei Chiu
roving efficiency and reducing code size. This change reduces the number of comparison operations from 1-2 to a single subtraction operation, thereby saving the number of instructions. Signed-off-by: Kuan-Wei Chiu --- v1 -> v2: - Add explicit type cast in case the sizes of u32 and int differ. dri

[PATCH] ACPI: NFIT: Optimize nfit_mem_cmp() for efficiency

2023-10-12 Thread Kuan-Wei Chiu
roving efficiency and reducing code size. This change reduces the number of comparison operations from 1-2 to a single subtraction operation, thereby saving the number of instructions. Signed-off-by: Kuan-Wei Chiu --- drivers/acpi/nfit/core.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-)