Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH] ice: use min() to make code cleaner in ice_gnss
Date: Mon, 21 Mar 2022 15:47:28 +0000	[thread overview]
Message-ID: <ff90ebe7eed741829dc03b2bf92a41f7@AcuMS.aculab.com> (raw)
In-Reply-To: <20220321115412.844440-1-alexandr.lobakin@intel.com>

> Use `min_t(typeof(bytes_left), ICE_MAX_I2C_DATA_SIZE)` to avoid
> this. Plain definitions are usually treated as `unsigned long`
> unless there's a suffix (u, ull etc.).

I suspect they are 'int'.
And the compiler will convert to 'unsigned int' in any
arithmetic.
And the 'signed v unsigned' compare warning is supressed
to integer constants.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


      parent reply	other threads:[~2022-03-21 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  9:46 [Intel-wired-lan] [PATCH] ice: use min() to make code cleaner in ice_gnss Wan Jiabing
2022-03-18 20:19 ` Tony Nguyen
2022-03-19  4:24   ` Wan Jiabing
2022-03-21 11:54   ` Alexander Lobakin
2022-03-21 12:02     ` Jiabing Wan
2022-03-21 15:47     ` David Laight [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=ff90ebe7eed741829dc03b2bf92a41f7@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=intel-wired-lan@osuosl.org \
    /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