From: Corey Minyard <minyard@acm.org>
To: Vadim Pasternak <vadimp@mellanox.com>
Cc: Asmaa Mnebhi <Asmaa@mellanox.com>,
"wsa@the-dreams.de" <wsa@the-dreams.de>,
Michael Shych <michaelsh@mellanox.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH v4 0/1] Add support for IPMB driver
Date: Thu, 2 May 2019 17:59:11 -0500 [thread overview]
Message-ID: <20190502225910.GK6623@minyard.net> (raw)
In-Reply-To: <AM6PR05MB522465330E2C594B0309AE78A2340@AM6PR05MB5224.eurprd05.prod.outlook.com>
On Thu, May 02, 2019 at 09:14:46PM +0000, Vadim Pasternak wrote:
> [...]
> > >
> > > >>Better, if you can avoid cast.
> > > >>Would compiler warn if you use for example rol16(client->addr, 1) &
> > GENMASK(7, 0); or something like it?
> > > I thought it wouldn't be too much of an issue to use typecast here since other
> > existing ipmi drivers use typecasting: bt-bmc.c, kcs_bmc_aspeed.c,
> > kcs_bmc_npcm7xx.c all use (u8) typecasting.
> > > But if you really think it is worth it, I could do that.
> > > I just think it is not as straight forward to read this code as using a simple
> > typecast. Some might wonder why a GENMASK is needed in this case.
> > >
>
> Hi Asmaa,
>
> I will not insist in case it's OK with maintainers.
>
> [...]
I'm mostly against casts unless they are necessary, as they tend
to clutter up the code. But I don't feel that strongly about
it. I'm not sure how other maintainers feel.
-corey
prev parent reply other threads:[~2019-05-02 22:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 17:58 [PATCH v4 0/1] Add support for IPMB driver Asmaa Mnebhi
2019-04-30 17:58 ` [PATCH v4 1/1] " Asmaa Mnebhi
2019-04-30 21:24 ` Vadim Pasternak
2019-04-30 21:24 ` [PATCH v4 0/1] " Vadim Pasternak
2019-05-01 1:03 ` Corey Minyard
2019-05-02 18:06 ` Asmaa Mnebhi
2019-05-02 19:49 ` Corey Minyard
2019-05-02 20:40 ` Asmaa Mnebhi
2019-05-02 21:14 ` Vadim Pasternak
2019-05-02 22:59 ` Corey Minyard [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=20190502225910.GK6623@minyard.net \
--to=minyard@acm.org \
--cc=Asmaa@mellanox.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michaelsh@mellanox.com \
--cc=vadimp@mellanox.com \
--cc=wsa@the-dreams.de \
/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