From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Subject: RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver Date: Mon, 08 Jul 2019 14:59:11 +0300 Message-ID: <874l3whh4g.fsf@linux.intel.com> References: <1562324238-16655-1-git-send-email-pawell@cadence.com> <1562324238-16655-6-git-send-email-pawell@cadence.com> <87r274lmqk.fsf@linux.intel.com> <87a7dpm442.fsf@linux.intel.com> <874l3wn5ep.fsf@linux.intel.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Pawel Laszczak , "devicetree@vger.kernel.org" Cc: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "hdegoede@redhat.com" , "heikki.krogerus@linux.intel.com" , "robh+dt@kernel.org" , "rogerq@ti.com" , "linux-kernel@vger.kernel.org" , "jbergsagel@ti.com" , "nsekhar@ti.com" , "nm@ti.com" , Suresh Punnoose , "peter.chen@nxp.com" , Jayshri Dajiram Pawar , Rahul Kumar List-Id: devicetree@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable (please send it as a formal patch from now on) Hi, Pawel Laszczak writes: > The prototype was added , but not all text was past. Sorry for that.=20=20 > > Fixed version: with your changes. > > ///// v2 corrected=20 > commit 4553d48dd0500085d90c8280e28714072279c3dd (HEAD) > Author: Pawel Laszczak > Date: Mon Jul 8 12:53:47 2019 +0200 > > usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_strin= g. > > Patch introduces new function usb_dr_mode_to_string for converting du= al role > mod to string and removes static from usb_dr_mode_to_string definitio= n. > > Both changes have made to avoid duplication of code by cdns3 driver. missing Signed-off-by > diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h > index 69f1b6328532..c156817672c4 100644 > --- a/include/linux/usb/otg.h > +++ b/include/linux/usb/otg.h > @@ -129,4 +129,20 @@ enum usb_dr_mode { > */ > extern enum usb_dr_mode usb_get_dr_mode(struct device *dev); > > +/** > + * usb_get_dr_mode_from_string - Convert string to dual role mode. > + * @str: Pointer to the given string > + * > + * The function gets string and returns the correspondig enum usb_dr_mod= e. > + */ why duplicate the documentation? Perhaps put it only in the header, otherwise we will need to update two locations whenever these functions change. > +extern enum usb_dr_mode usb_get_dr_mode_from_string(const char *str); > + > +/** > + * usb_dr_mode_to_string - Convert dual role mode to string. > + * @dr_mode: Pointer to the given dual role mode > + * > + * The function gets enum usb_dr_mode, and returns the correspondig stri= ng. > + */ > +extern const char *usb_dr_mode_to_string(const enum usb_dr_mode dr_mode); Don't you need a stub for builds when CONFIG_USB_COMMON=3Dn? =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl0jMA8ACgkQzL64meEa mQaUFg//QWlWyc/qxvrzfDBRMXPr5QDNjbUZHa9wXB+i7lbjwfD6zeSDQ/+lBsKD 9acBMn7YWt/2yFkosxGcKfC9f+hsUG+6guZip1R/PzZhewlGN5Sp5U1ewwudX6ou UjBKHgejELNxQw0pt0L++ZKtdFZVVU3RMtqSVtVWV1dDAYjqFX1oc3xD1a4Y8tyC Zi5pp4OelMEAKJ0sFAMxsbGia5NVm9svKw+sNJHusfQebGQ9rFuLT3MVY0+0WQFH 2JeSLT0ov0z5xOYEYTg0yK41VnhCzmCnXjAnYsmq54xrrtguZJu1tI85Fo+G1TsX zMuFy7jjdDjVB6xCpORokR5Z64ZzuIAa2Vp8KxXkc6kCzsKQtx9EFuMXewMqdKHe 6tIUbXJm+/syBd8AXKrChLPmycs6rXyD1UB3Y5Du+546nGMK1RnJXWf4BKCG6tYS KyMJy0ZPTOBV0RaJ+3VgMyoWD4wo5PHIcuGu/laBfUyoigbaLwOOQwkIEHh3LJA2 0Do23Glk5n9HxeB70/dvi3TUbaTdbDsI1rKlLnbKrBbSlXS+F5mnp+7yRkA6kGIc zh+f3CIVxSTRSeG+NGI0CfGGPFwP/BkjyvCja+jhzSvFl0wl+wIK0JNOx/x49NdS 8yzttpCKWZQuKruRQKTUJ/Hwlo54Mry/y+Kt5Rj0tXEK+zBthF0= =cRnm -----END PGP SIGNATURE----- --=-=-=--