[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1433056278.2984.16.camel@perches.com>
Date: Sun, 31 May 2015 00:11:18 -0700
From: Joe Perches <joe@...ches.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: Nikhil Badola <nikhil.badola@...escale.com>,
linux-kernel@...r.kernel.org, stern@...land.harvard.edu,
linux-usb@...r.kernel.org
Subject: Re: [PATCH 3/5] drivers:usb:fsl: Replace macros with enumerated type
On Sun, 2015-05-31 at 15:50 +0900, Greg KH wrote:
> On Tue, May 26, 2015 at 05:15:48PM +0530, Nikhil Badola wrote:
> > Replace macros with enumerated type to represent usb ip
> > controller version
> >
> > Signed-off-by: Nikhil Badola <nikhil.badola@...escale.com>
> > ---
> > include/linux/fsl_devices.h | 13 ++++++++-----
> > 1 file changed, 8 insertions(+), 5 deletions(-)
> >
> > diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
[]
> > +enum fsl_usb2_controller_ver {
> > + FSL_USB_VER_OLD = 0,
> > + FSL_USB_VER_1_6,
> > + FSL_USB_VER_2_2,
> > + FSL_USB_VER_2_4,
> > + FSL_USB_VER_2_5,
> > +};
>
> Don't you want to change that function that uses these to return the
> enumerated type and not an integer?
>
> Also, I don't think the C standard forces the non-numberd values to be
> sequential,
Then you haven't read the standard in awhile and you likely forgot.
6.7.2.2
If the first enumerator has no =, the value of its enumeration constant
is 0. Each subsequent enumerator with no = defines its enumeration
constant as the value of the constant expression obtained by adding 1 to
the value of the previous enumeration constant.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists