[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR11MB465760932106C0719648B3FA9B06A@DM6PR11MB4657.namprd11.prod.outlook.com>
Date: Fri, 28 Jul 2023 09:55:13 +0000
From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@...el.com>
To: Linus Walleij <linus.walleij@...aro.org>
CC: "kuba@...nel.org" <kuba@...nel.org>, "jiri@...nulli.us"
<jiri@...nulli.us>, "vadfed@...a.com" <vadfed@...a.com>,
"jonathan.lemon@...il.com" <jonathan.lemon@...il.com>, "pabeni@...hat.com"
<pabeni@...hat.com>, "corbet@....net" <corbet@....net>, "davem@...emloft.net"
<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
"vadfed@...com" <vadfed@...com>, "Brandeburg, Jesse"
<jesse.brandeburg@...el.com>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "M, Saeed" <saeedm@...dia.com>,
"leon@...nel.org" <leon@...nel.org>, "richardcochran@...il.com"
<richardcochran@...il.com>, "sj@...nel.org" <sj@...nel.org>,
"javierm@...hat.com" <javierm@...hat.com>, "ricardo.canuelo@...labora.com"
<ricardo.canuelo@...labora.com>, "mst@...hat.com" <mst@...hat.com>,
"tzimmermann@...e.de" <tzimmermann@...e.de>, "Michalik, Michal"
<michal.michalik@...el.com>, "gregkh@...uxfoundation.org"
<gregkh@...uxfoundation.org>, "jacek.lawrynowicz@...ux.intel.com"
<jacek.lawrynowicz@...ux.intel.com>, "airlied@...hat.com"
<airlied@...hat.com>, "ogabbay@...nel.org" <ogabbay@...nel.org>,
"arnd@...db.de" <arnd@...db.de>, "nipun.gupta@....com" <nipun.gupta@....com>,
"axboe@...nel.dk" <axboe@...nel.dk>, "linux@...y.sk" <linux@...y.sk>,
"masahiroy@...nel.org" <masahiroy@...nel.org>,
"benjamin.tissoires@...hat.com" <benjamin.tissoires@...hat.com>,
"geert+renesas@...der.be" <geert+renesas@...der.be>, "Olech, Milena"
<milena.olech@...el.com>, "kuniyu@...zon.com" <kuniyu@...zon.com>,
"liuhangbin@...il.com" <liuhangbin@...il.com>, "hkallweit1@...il.com"
<hkallweit1@...il.com>, "andy.ren@...cruise.com" <andy.ren@...cruise.com>,
"razor@...ckwall.org" <razor@...ckwall.org>, "idosch@...dia.com"
<idosch@...dia.com>, "lucien.xin@...il.com" <lucien.xin@...il.com>,
"nicolas.dichtel@...nd.com" <nicolas.dichtel@...nd.com>, "phil@....cc"
<phil@....cc>, "claudiajkang@...il.com" <claudiajkang@...il.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, poros <poros@...hat.com>, mschmidt
<mschmidt@...hat.com>, "linux-clk@...r.kernel.org"
<linux-clk@...r.kernel.org>, "vadim.fedorenko@...ux.dev"
<vadim.fedorenko@...ux.dev>
Subject: RE: [RFC PATCH v9 07/10] ice: add admin commands to access cgu
configuration
>From: Linus Walleij <linus.walleij@...aro.org>
>Sent: Thursday, July 27, 2023 11:17 PM
>
>Hi Arkadiusz,
>
>On Fri, Jun 23, 2023 at 2:45 PM Arkadiusz Kubalewski
><arkadiusz.kubalewski@...el.com> wrote:
>
>> +/**
>> + * convert_s48_to_s64 - convert 48 bit value to 64 bit value
>> + * @signed_48: signed 64 bit variable storing signed 48 bit value
>> + *
>> + * Convert signed 48 bit value to its 64 bit representation.
>> + *
>> + * Return: signed 64 bit representation of signed 48 bit value.
>> + */
>> +static s64 convert_s48_to_s64(s64 signed_48)
>> +{
>> + return signed_48 & BIT_ULL(47) ?
>> + GENMASK_ULL(63, 48) | signed_48 : signed_48;
>> +}
>
>Can't you just use sign_extend64() from <linux/bitops.h>
>passing bit 48 as sign bit istead of inventing this?
>
Hi Linus,
First of all, sorry for late answer.
Well, Yes it seems I can :)
Thank you for pointing this out!
Arkadiusz
>Yours,
>Linus Walleij
Powered by blists - more mailing lists