]> git.baikalelectronics.ru Git - kernel.git/commit
clk: intel: Avoid unnecessary memset by improving code
authorRahul Tanwar <rahul.tanwar@linux.intel.com>
Thu, 16 Jul 2020 06:30:32 +0000 (14:30 +0800)
committerStephen Boyd <sboyd@kernel.org>
Fri, 24 Jul 2020 08:58:15 +0000 (01:58 -0700)
commit76cac44550c258262191ca03684800293bd2456c
tree139e3448d113699f4bc9ead0b7ce4871f700c32c
parentfddb3b62480eaee923b1ec32b6cee2df3ae5f81b
clk: intel: Avoid unnecessary memset by improving code

memset can be avoided in a loop if the variables used are declared
inside the loop. Move such variables declaration inside the loop
to avoid memset.

Signed-off-by: Rahul Tanwar <rahul.tanwar@linux.intel.com>
Link: https://lore.kernel.org/r/26624b65d0e6b958c4765a406b9929d1a9ce1c2c.1594880946.git.rahul.tanwar@linux.intel.com
[sboyd@kernel.org: Drop NULL assignment that is overwritten]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/x86/clk-cgu.c