[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110613190924.GN2353@legolas.emea.dhcp.ti.com>
Date: Mon, 13 Jun 2011 22:09:25 +0300
From: Felipe Balbi <balbi@...com>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Tanya Brokhman <tlinder@...eaurora.org>, balbi@...com,
greg@...ah.com, linux-usb@...r.kernel.org,
linux-arm-msm@...r.kernel.org, ablay@...eaurora.org,
'open list' <linux-kernel@...r.kernel.org>,
"'open list:FREESCALE USB PER...'" <linuxppc-dev@...ts.ozlabs.org>,
"'open list:OMAP USB SUPPORT'" <linux-omap@...r.kernel.org>
Subject: Re: [PATCH] usb:gadget: use min_t() macro instead of min()
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
Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)
Powered by blists - more mailing lists