From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Subject: Re: [PATCH] USB: move usb debugfs directory creation to the usb common core Date: Wed, 05 Jun 2019 10:28:12 +0300 Message-ID: <871s08ebjn.fsf@linux.intel.com> References: <20190604093258.GB30054@kroah.com> <87tvd5illh.fsf@linux.intel.com> <20190604124349.GA10203@kroah.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: In-Reply-To: <20190604124349.GA10203@kroah.com> Sender: linux-kernel-owner@vger.kernel.org To: Greg Kroah-Hartman Cc: Chunfeng Yun , Matthias Brugger , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org List-Id: devicetree@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Greg Kroah-Hartman writes: >> Greg Kroah-Hartman writes: >> > diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c >> > index 7fcb9f782931..f3d6b1ab80cb 100644 >> > --- a/drivers/usb/core/usb.c >> > +++ b/drivers/usb/core/usb.c >> > @@ -1185,19 +1185,17 @@ static struct notifier_block usb_bus_nb =3D { >> > .notifier_call =3D usb_bus_notify, >> > }; >> >=20=20 >> > -struct dentry *usb_debug_root; >> > -EXPORT_SYMBOL_GPL(usb_debug_root); >> > +static struct dentry *usb_devices_root; >> >=20=20 >> > static void usb_debugfs_init(void) >> > { >> > - usb_debug_root =3D debugfs_create_dir("usb", NULL); >> > - debugfs_create_file("devices", 0444, usb_debug_root, NULL, >> > - &usbfs_devices_fops); >> > + usb_devices_root =3D debugfs_create_file("devices", 0444, usb_debug_= root, >>=20 >> don't we have a race now? Can usbcore ever probe before usb common? > > How can that happen if usb_debug_root is in usb common? The module > loader will not let that happen. Or it shouldn't :) argh, indeed. The very fact that usbcore tries to resolve usb_debug_root already forces a dependency :-p =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlz3bwwACgkQzL64meEa mQYjnQ/9ERfLIDtB7Gh0eaevRNVrN6PGvd94Q4mu7LJ5qDfm/+UbfGucwDeINNVH CggpHymmca0HA3+OsdoUDf5x15oMPauyDulSrIK2Ldbvdupvq7MOsODxm0il0kO2 ItTKb7gdV7k1oULdemrz3ONNTyB6glyAA1ed+6w0bbK88ZEmg1+el8ZHNA2w78Kx UnA5uHAa9P2eJ3fDDOw895EqD/NnZLO0hWVxEN+TvHc/iKI7afjejdwPgjcjF1f2 yVeZXyJcMglpCc5zrzRPLzSBy3ysn99tQFWkuPUiDIaV8f795Zgb0m16YFjUCfZt /u3K71bO3b0rKgSsJgmuMFw8dZaf2Cz54uXvHY3tw2EBtSbQ1aMlRXJZjt2MXRJB zmyejHBzTC0zQVWsJpZZmL+dNXaIcSH/NU12CVzlo5F36vmbQ/lyfiEbvnfh/t7H VnliozWmqZxUI676WvFL/tRVsVLw6TtOLcD4ZRveIX6iUstun++SuKLw/tAj+jex 2O04C/yPRCoerZ7HiWT6kBfcZlQsMua4BhM7jB0mdp3P3ReyqSsnUrRbE8/b1BEv aKm/SCbUdGo09YakAsVT2gRosjH6Aygd9NqsO+uyRCaA/sSvSit6wKNhQsC2apK2 S7C3MnT6a8w1pyZ8kA3Fl3+VYub8N5Z22op6YYVM7FHS+Smtlpw= =88ax -----END PGP SIGNATURE----- --=-=-=--