Thread (3 messages) 3 messages, 3 authors, 2022-12-13

Re: [PATCH] arch: change variable types to match those of what is assigned to them

From: Randy Dunlap <hidden>
Date: 2022-12-13 17:41:04
Also in: linux-mips, lkml, xen-devel

Hi,

Please look at
  https://lore.kernel.org/lkml/CAA42iKx2f2LsAQ9C5rxnCTPhOB6n+L35Winc5WK1K2EySAjvXA@mail.gmail.com/T/#u (local)

and see if that matches what you thought you sent as a patch.

The gmail web interface is notorious for dropping tabs in emails.


On 12/13/22 09:35, Seija K. wrote:
There are many places where "int len = strlen(foo);" is written, just
for len to be passed as a parameter of size_t. This causes truncation
and then expansion back from int to size_t. Not to mention this is
poor logic and needless truncations can add extra unneeded
instructions.

This patch aims to fix the worst offenders.

Signed-off-by: Seija Kijin <redacted>
---
 arch/arm/mm/mmu.c                      | 30 +++++++++++++-------------
 arch/arm/probes/kprobes/test-core.c    |  8 +++----
 arch/arm/vfp/vfpmodule.c               |  4 ++--
 arch/arm/xen/p2m.c                     |  4 ++--
 arch/mips/alchemy/common/irq.c         |  2 +-
 arch/mips/alchemy/common/prom.c        |  2 +-
 arch/mips/alchemy/devboards/bcsr.c     |  2 +-
 arch/mips/alchemy/devboards/platform.c |  8 +++----
 arch/mips/ar7/prom.c                   |  4 ++--
 arch/mips/boot/compressed/dbg.c        | 14 +++++-------
 arch/mips/fw/arc/cmdline.c             |  4 ++--
 arch/xtensa/platforms/iss/console.c    |  4 ++--
 12 files changed, 41 insertions(+), 45 deletions(-)

-- 
~Randy

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help