lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 19 Dec 2023 15:27:46 -0800
From: Stephen Boyd <>
To: Jonathan Cameron <>, Justin Stitt <>, 
	Lars-Peter Clausen <>
Subject: Re: [PATCH v4] iio: sx9324: avoid copying property strings

Quoting Justin Stitt (2023-12-19 13:34:15)
> We're doing some needless string copies when trying to assign the proper
> `prop` string. We can make `prop` a const char* and simply assign to
> string literals.
> For the case where a format string is used, let's extract the parsing
> logic out into sx9324_parse_phase_prop(). We no longer need to create
> copies or allocate new memory.
> sx9324_parse_phase_prop() will simply return the default def value if it
> fails.
> This also cleans up some deprecated strncpy() uses [1].
> Furthermore, let's clean up this code further by removing some unused
> defines:
> |  #define SX9324_PIN_DEF "semtech,ph0-pin"
> |  #define SX9324_RESOLUTION_DEF "semtech,ph01-resolution"
> |  #define SX9324_PROXRAW_DEF "semtech,ph01-proxraw-strength"
> Link: [1]
> Link:
> Cc:
> Signed-off-by: Justin Stitt <>
> ---

Reviewed-by: Stephen Boyd <>

Powered by blists - more mailing lists