public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	linux-kernel@vger.kernel.org,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Jani Nikula <jani.nikula@intel.com>
Subject: Re: [RFC] include/linux/make_type.h: Helpers for making u16/u32/u64 values
Date: Wed, 14 Feb 2024 19:32:10 +0200	[thread overview]
Message-ID: <Zcz5GmAtPbdInWJU@smile.fi.intel.com> (raw)
In-Reply-To: <ffa107dd-23dd-47e0-b3bb-06c60ca3e2e2@p183>

On Wed, Feb 14, 2024 at 08:20:55PM +0300, Alexey Dobriyan wrote:

...

> Secondly,
> 
> 	#define make_u64(hi__, lo__)  ((u64)(hi__) << 32 | (u32)(lo__))
> 
> doesn't truncate hi, why?

Because it's not needed (the whole point AFAIU is to override promotion
to a _signed_ type (int) and here it makes no difference)?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-02-14 17:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 17:20 [RFC] include/linux/make_type.h: Helpers for making u16/u32/u64 values Alexey Dobriyan
2024-02-14 17:32 ` Andy Shevchenko [this message]
2024-02-14 17:39   ` Alexey Dobriyan
2024-02-14 17:42     ` Andy Shevchenko
2024-02-14 17:55     ` Michal Wajdeczko
2024-02-16  6:23       ` Alexey Dobriyan
  -- strict thread matches above, loose matches on Subject: below --
2024-02-14 15:54 Michal Wajdeczko
2024-02-14 16:04 ` Andy Shevchenko
2024-02-14 17:02   ` Michal Wajdeczko
2024-02-14 17:15     ` Andy Shevchenko

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=Zcz5GmAtPbdInWJU@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=adobriyan@gmail.com \
    --cc=jani.nikula@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.wajdeczko@intel.com \
    --cc=rodrigo.vivi@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox