Re: [PATCH] i2c: avoid dynamic stack use in dm_i2c_write

2022-07-19 Thread Heiko Schocher
Hello Rasmus, On 07.07.22 15:12, Rasmus Villemoes wrote: > The size of the dynamic stack allocation here is bounded by the if() > statement. However, just allocating the maximum size up-front and > doing malloc() if necessary avoids code duplication (the > i2c_setup_offset() until the invocation o

Re: [PATCH] i2c: avoid dynamic stack use in dm_i2c_write

2022-07-10 Thread Heiko Schocher
Hello Rasmus, On 07.07.22 15:12, Rasmus Villemoes wrote: > The size of the dynamic stack allocation here is bounded by the if() > statement. However, just allocating the maximum size up-front and > doing malloc() if necessary avoids code duplication (the > i2c_setup_offset() until the invocation o