All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: "Cezary Rojewski" <cezary.rojewski@intel.com>,
	alsa-devel@alsa-project.org, "Takashi Iwai" <tiwai@suse.com>,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Subject: [PATCH 3/3] ASoC: Intel: avs: Use min_t instead of min with cast
Date: Fri, 13 Jan 2023 20:03:10 +0100	[thread overview]
Message-ID: <20230113190310.1451693-4-amadeuszx.slawinski@linux.intel.com> (raw)
In-Reply-To: <20230113190310.1451693-1-amadeuszx.slawinski@linux.intel.com>

Checkpatch script recommends using min_t instead of min with the cast.

Fixes: 69b23b3937a1 ("ASoC: Intel: avs: Event tracing")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 sound/soc/intel/avs/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/avs/trace.c b/sound/soc/intel/avs/trace.c
index fcb7cfc823d6..c63eea909b5e 100644
--- a/sound/soc/intel/avs/trace.c
+++ b/sound/soc/intel/avs/trace.c
@@ -24,7 +24,7 @@ void trace_avs_msg_payload(const void *data, size_t size)
 	while (remaining > 0) {
 		u32 chunk;
 
-		chunk = min(remaining, (size_t)MAX_CHUNK_SIZE);
+		chunk = min_t(size_t, remaining, MAX_CHUNK_SIZE);
 		trace_avs_ipc_msg_payload(data, chunk, offset, size);
 
 		remaining -= chunk;
-- 
2.25.1


      parent reply	other threads:[~2023-01-13 11:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 19:03 [PATCH 0/3] Fixes for avs driver Amadeusz Sławiński
2023-01-13 11:19 ` Cezary Rojewski
2023-01-13 15:14 ` Mark Brown
2023-01-13 19:03 ` [PATCH 1/3] ASoC: Intel: avs: Implement PCI shutdown Amadeusz Sławiński
2023-01-13 19:03 ` [PATCH 2/3] ASoC: Intel: avs: Correctly access topology fiels Amadeusz Sławiński
2023-01-13 19:03 ` Amadeusz Sławiński [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230113190310.1451693-4-amadeuszx.slawinski@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.