From: Matt Porter <mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Christian Daudt <bcm-xK7y4jjYLqYh9ZMKESR00Q@public.gmane.org>,
Paul Zimmerman <paulz-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
Devicetree List
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Kamil Debski <k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Linaro Patches <patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Linux USB List
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Kyungmin Park
<kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Linux ARM Kernel List
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v4 1/9] phy: add phy_get_bus_width()/phy_set_bus_width() calls
Date: Thu, 12 Dec 2013 06:50:03 -0500 [thread overview]
Message-ID: <20131212115003.GB20773@beef> (raw)
In-Reply-To: <20131212112715.GK4360-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
On Thu, Dec 12, 2013 at 11:27:15AM +0000, Russell King wrote:
> On Thu, Dec 12, 2013 at 06:18:29AM -0500, Matt Porter wrote:
> > /**
> > + * struct phy_attrs - represents phy attributes
> > + * @bus_width: Data path width implemented by PHY
> > + */
> > +struct phy_attrs {
> > + u32 bus_width;
>
> Why u32?
Kishon suggested it and I changed it on this rev...forgetting about the
error path below.
> > int phy_power_off(struct phy *phy);
> > +static inline u32 phy_get_bus_width(struct phy *phy)
> > +{
> > + return phy->attrs.bus_width;
> ...
> >
> > +static inline u32 phy_get_bus_width(struct phy *phy)
> > +{
> > + return -ENOSYS;
>
> Why u32, especially as you're returning a negative number here.
>
> If the bus width is a small integer (I'm assuming you don't have up to
> 2^30 bus signals) then what's wrong with it being an 'int' ?
Yes, very correct...it's expected to always be a small positive integer
value or zero (when not populated as it's optional). I agree it should
go back to 'int' especially due to the negative value when GENERIC_PHY
isn't enabled.
-Matt
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-12-12 11:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 11:18 [PATCH v4 0/9] USB Device Controller support for BCM281xx Matt Porter
2013-12-12 11:18 ` [PATCH v4 1/9] phy: add phy_get_bus_width()/phy_set_bus_width() calls Matt Porter
[not found] ` <1386847117-21240-2-git-send-email-mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-12-12 11:27 ` Russell King - ARM Linux
[not found] ` <20131212112715.GK4360-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-12-12 11:50 ` Matt Porter [this message]
2013-12-12 11:18 ` [PATCH v4 2/9] staging: dwc2: update DT binding to add generic clock/phy properties Matt Porter
2013-12-12 11:18 ` [PATCH v4 4/9] usb: gadget: s3c-hsotg: add snps,dwc2 compatible string Matt Porter
[not found] ` <1386847117-21240-1-git-send-email-mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-12-12 11:18 ` [PATCH v4 3/9] usb: gadget: s3c-hsotg: enable build for other platforms Matt Porter
2013-12-12 11:18 ` [PATCH v4 5/9] usb: gadget: s3c-hsotg: use generic phy_init()/phy_exit() support Matt Porter
2013-12-12 11:18 ` [PATCH v4 6/9] usb: gadget: s3c-hsotg: get phy bus width from phy subsystem Matt Porter
2013-12-12 11:18 ` [PATCH v4 7/9] phy: add Broadcom Kona USB2 PHY DT binding Matt Porter
2013-12-12 11:18 ` [PATCH v4 8/9] phy: add Broadcom Kona USB2 PHY driver Matt Porter
2013-12-12 11:18 ` [PATCH v4 9/9] ARM: dts: add usb udc support to bcm281xx Matt Porter
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=20131212115003.GB20773@beef \
--to=mporter-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=bcm-xK7y4jjYLqYh9ZMKESR00Q@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=k.debski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kishon-l0cyMroinI0@public.gmane.org \
--cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=paulz-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.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).