From: Felipe Balbi <balbi@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "'open list:FREESCALE USB PER...'"
<linuxppc-dev@lists.ozlabs.org>,
Tanya Brokhman <tlinder@codeaurora.org>,
greg@kroah.com, linux-usb@vger.kernel.org,
'open list' <linux-kernel@vger.kernel.org>,
balbi@ti.com, linux-arm-msm@vger.kernel.org,
"'open list:OMAP USB SUPPORT'" <linux-omap@vger.kernel.org>,
ablay@codeaurora.org
Subject: Re: [PATCH] usb:gadget: use min_t() macro instead of min()
Date: Mon, 13 Jun 2011 22:09:25 +0300 [thread overview]
Message-ID: <20110613190924.GN2353@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1106131503040.1983-100000@iolanthe.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]
Hi,
On Mon, Jun 13, 2011 at 03:03:44PM -0400, Alan Stern wrote:
> > > The change I suggested involved replacing two typecasts with a single
> > > min_t. All (or almost all) the places this patch touches currently
> > > contain only one typecast, so the motivation for changing them is a lot
> > > weaker.
> > >
> > You're right. So what's the final call on this one? Do you think it can be
> > merged or you prefer not change anything? I personally think the code looks
> > nicer using min_t instead of min with casting but that's just my opinion and
> > of course there are arguments against this patch.
>
> I don't care either way. It's up to you and Felipe.
I guess it's better to have a more critical look at the arguments first.
Looking into dummy_hcd for instance, it doesn't appear like we need to
be int, it could be unsigned int. I just skimmed through the code, but
it looks like we will always hold >= 0 values on that variable.
So go through that exercise first, then we look at the others. Blindly
changing to min_t() might not give us any improvements at all ;-)
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
prev parent reply other threads:[~2011-06-13 19:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-12 11:14 [PATCH] usb:gadget: use min_t() macro instead of min() Tatyana Brokhman
2011-06-13 9:24 ` Felipe Balbi
2011-06-13 11:52 ` Tanya Brokhman
2011-06-13 11:57 ` Felipe Balbi
2011-06-13 14:38 ` Alan Stern
2011-06-13 18:07 ` Tanya Brokhman
2011-06-13 19:03 ` Alan Stern
2011-06-13 19:09 ` Felipe Balbi [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=20110613190924.GN2353@legolas.emea.dhcp.ti.com \
--to=balbi@ti.com \
--cc=ablay@codeaurora.org \
--cc=greg@kroah.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=stern@rowland.harvard.edu \
--cc=tlinder@codeaurora.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;
as well as URLs for NNTP newsgroup(s).