mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Ruibin <11162571@vivo.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH v1] net:hidp:Use min macro
Date: Thu, 22 Aug 2024 17:39:55 +0800	[thread overview]
Message-ID: <eff06531-0b72-47fc-9f1a-dfa87a49b751@vivo.com> (raw)
In-Reply-To: <20240822075456.1370350-1-11162571@vivo.com>

Sorry, please ignore this patch.
Because the corresponding header file is not included, there may be 
compilation errors.

在 2024/8/22 15:54, Yang Ruibin 写道:
> Instead of using the min() implementation of
> the ternary operator, use real macros.
>
> Signed-off-by: Yang Ruibin <11162571@vivo.com>
> ---
>   net/bluetooth/hidp/core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
> index 707f229f8..7bf24f299 100644
> --- a/net/bluetooth/hidp/core.c
> +++ b/net/bluetooth/hidp/core.c
> @@ -294,7 +294,7 @@ static int hidp_get_raw_report(struct hid_device *hid,
>   
>   	skb = session->report_return;
>   	if (skb) {
> -		len = skb->len < count ? skb->len : count;
> +		len = min(skb->len, count);
>   		memcpy(data, skb->data, len);
>   
>   		kfree_skb(skb);

      reply	other threads:[~2024-08-22  9:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  7:54 Yang Ruibin
2024-08-22  9:39 ` Yang Ruibin [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=eff06531-0b72-47fc-9f1a-dfa87a49b751@vivo.com \
    --to=11162571@vivo.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=opensource.kernel@vivo.com \
    --cc=sfr@canb.auug.org.au \
    /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 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®