On Sun, 2023-12-17 at 13:24 +, Jonathan Cameron wrote:
> On Mon, 11 Dec 2023 22:30:12 -0800
> Joe Perches wrote:
>
> > On Tue, 2023-12-12 at 00:42 +, Justin Stitt wrote:
> > > We're doing some needless string copies when trying to assign the proper
> > > `prop` string. We can make `prop`
On Mon, 11 Dec 2023 22:30:12 -0800
Joe Perches wrote:
> On Tue, 2023-12-12 at 00:42 +, Justin Stitt wrote:
> > 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.
>
> trivia:
Quoting Justin Stitt (2023-12-11 16:42:52)
> diff --git a/drivers/iio/proximity/sx9324.c b/drivers/iio/proximity/sx9324.c
> index 438f9c9aba6e..e3bc30b57b19 100644
> --- a/drivers/iio/proximity/sx9324.c
> +++ b/drivers/iio/proximity/sx9324.c
> @@ -873,6 +873,32 @@ static int sx9324_init_compensatio
On Tue, Dec 12, 2023 at 12:42:52AM +, Justin Stitt wrote:
> 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 parsi
On Tue, 2023-12-12 at 00:42 +, Justin Stitt wrote:
> 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.
trivia:
I would have updated it like this moving the
various declarations int
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