# Re: \[PATCH hotfix 6.11 v2 3/3\] minmax: reduce min/max macro expansion in atomisp driver

- From: Linus Torvalds \<hidden\>
- Date: 2024-09-11 18:11:45 
- List: netdev
- Page: https://ratatoskr.run/netdev/2024/09/2745049
- Thread: https://ratatoskr.run/netdev/2024/09/2745015/t.md

```text
On Wed, 11 Sept 2024 at 10:51, Lorenzo Stoakes
[ref] wrote:
>
> Avoid unnecessary nested min()/max() which results in egregious macro
> expansion. Use clamp_t() as this introduces the least possible expansion.

I took this (single) patch directly, since that's the one that
actually causes build problems in limited environments (admittedly not
in current git with the more invasive min/max cleanups, but in order
to be back-ported).

Plus it cleans up the code with more legible inline functions, rather
than just doing some minimal syntactic changes. I expanded on the
commit message to say that.

The two others I'll leave for now and see what maintainers of their
respective areas think.

            Linus
```
