All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: You Kangren <youkangren@vivo.com>
Cc: Kalle Valo <kvalo@kernel.org>, Dongliang Mu <dzm91@hust.edu.cn>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	"open list:RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER" 
	<linux-wireless@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	opensource.kernel@vivo.com
Subject: Re: [PATCH v3] wifi: ray_cs: Replace the ternary conditional operator with min()
Date: Thu, 29 Jun 2023 22:05:47 +0200	[thread overview]
Message-ID: <ZJ3kG7CSWSGw1Ql2@corigine.com> (raw)
In-Reply-To: <20230627043151.19576-1-youkangren@vivo.com>

On Tue, Jun 27, 2023 at 12:31:48PM +0800, You Kangren wrote:
> Replace the ternary conditional operator with min_t() to simplify the code
> 
> Signed-off-by: You Kangren <youkangren@vivo.com>
> ---
>  drivers/net/wireless/legacy/ray_cs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/legacy/ray_cs.c b/drivers/net/wireless/legacy/ray_cs.c
> index 8ace797ce951..25edbc655738 100644
> --- a/drivers/net/wireless/legacy/ray_cs.c
> +++ b/drivers/net/wireless/legacy/ray_cs.c
> @@ -2086,8 +2086,7 @@ static void ray_rx(struct net_device *dev, ray_dev_t *local,
>  			rx_data(dev, prcs, pkt_addr, rx_len);
>  
>  		copy_from_rx_buff(local, (UCHAR *) &local->last_bcn, pkt_addr,
> -				  rx_len < sizeof(struct beacon_rx) ?
> -				  rx_len : sizeof(struct beacon_rx));
> +				  min_t(size_t, rx_len, sizeof(struct beacon_rx));

Hi You Kangen,

unfortunately this patch doesn't seem to compile.

      parent reply	other threads:[~2023-06-29 20:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27  4:31 [PATCH v3] wifi: ray_cs: Replace the ternary conditional operator with min() You Kangren
2023-06-29 11:44 ` David Laight
2023-06-29 20:05 ` Simon Horman [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=ZJ3kG7CSWSGw1Ql2@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dzm91@hust.edu.cn \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --cc=youkangren@vivo.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.