mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4] dma-buf: heap: Replace nested max() with single max3()
@ 2025-03-17  2:37 feng.wei8
  2025-03-17  8:24 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: feng.wei8 @ 2025-03-17  2:37 UTC (permalink / raw)
  To: sumit.semwal
  Cc: benjamin.gaignard, brian.starkey, jstultz, tjmercier,
	christian.koenig, linux-media, dri-devel, linaro-mm-sig,
	linux-kernel

From: FengWei <feng.wei8@zte.com.cn>

Use max3() macro instead of nesting max() to simplify the return
statement.

Signed-off-by: FengWei <feng.wei8@zte.com.cn>
---
v3 -> v4
fix the format of this patch.
 drivers/dma-buf/dma-heap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c
index 3cbe87d4a464..96cb9ab5731a 100644
--- a/drivers/dma-buf/dma-heap.c
+++ b/drivers/dma-buf/dma-heap.c
@@ -147,7 +147,7 @@ static long dma_heap_ioctl(struct file *file, unsigned int ucmd,
 		in_size = 0;
 	if ((ucmd & kcmd & IOC_OUT) == 0)
 		out_size = 0;
-	ksize = max(max(in_size, out_size), drv_size);
+	ksize = max3(in_size, out_size, drv_size);

 	/* If necessary, allocate buffer for ioctl argument */
 	if (ksize > sizeof(stack_kdata)) {
-- 
2.25.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v4] dma-buf: heap: Replace nested max() with single max3()
  2025-03-17  2:37 [PATCH v4] dma-buf: heap: Replace nested max() with single max3() feng.wei8
@ 2025-03-17  8:24 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-17  8:24 UTC (permalink / raw)
  To: feng.wei8, sumit.semwal, xie.ludan, shao.mingyin, tang.dongxing
  Cc: benjamin.gaignard, brian.starkey, jstultz, tjmercier,
	christian.koenig, linux-media, dri-devel, linaro-mm-sig,
	linux-kernel

On 17/03/2025 03:37, feng.wei8@zte.com.cn wrote:
> From: FengWei <feng.wei8@zte.com.cn>
> 
> Use max3() macro instead of nesting max() to simplify the return
> statement.
> 
> Signed-off-by: FengWei <feng.wei8@zte.com.cn>
> ---
> v3 -> v4
> fix the format of this patch.
>  drivers/dma-buf/dma-heap.c | 2 +-
You sent five versions per day of the same patch.

Look what was in v3:

	v2 -> v3
	fix the format of this patch

So you are doing the same over and over and sending it to us?

Srsly, ZTE, slow down and be sure you follow the process BEFORE you send
flood of patches like that and learn on the go.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-17  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-17  2:37 [PATCH v4] dma-buf: heap: Replace nested max() with single max3() feng.wei8
2025-03-17  8:24 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®