linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Johan Hovold <johan@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Subject: Re: [PATCH] usb: get rid of 'choice' for legacy gadget drivers
Date: Mon, 16 Mar 2020 09:05:12 +0200	[thread overview]
Message-ID: <875zf42313.fsf@kernel.org> (raw)
In-Reply-To: <20200315154948.26569-1-masahiroy@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1535 bytes --]


Hi,

Masahiro Yamada <masahiroy@kernel.org> writes:
> drivers/usb/gadget/legacy/Kconfig creates a 'choice' inside another
> 'choice'.
>
> The outer choice: line 17 "USB Gadget precomposed configurations"
> The inner choice: line 484 "EHCI Debug Device mode"
>
> I wondered why the whole legacy gadget drivers reside in such a big
> choice block.
>
> This dates back to 2003, "[PATCH] USB: fix for multiple definition of
> `usb_gadget_get_string'". [1]
>
> At that time, the global function, usb_gadget_get_string(), was linked
> into multiple drivers. That was why only one driver was able to become
> built-in at the same time.
>
> Later, commit a84d9e5361bc ("usb: gadget: start with libcomposite")
> moved usb_gadget_get_string() to a separate module, libcomposite.ko
> instead of including usbstring.c from multiple modules.
>
> More and more refactoring was done, and after commit 1bcce939478f
> ("usb: gadget: multi: convert to new interface of f_mass_storage"),
> you can link multiple gadget drivers into vmlinux without causing
> multiple definition error.
>
> This is the only user of the nested choice structure ever. Removing
> this mess will make some Kconfig cleanups possible.
>
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=fee4cf49a81381e072c063571d1aadbb29207408
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Greg, if you want to pick this for v5.7, please go ahead:

Acked-by: Felipe Balbi <balbi@kernel.org>

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2020-03-16  7:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-15 15:49 [PATCH] usb: get rid of 'choice' for legacy gadget drivers Masahiro Yamada
2020-03-16  7:05 ` Felipe Balbi [this message]
2020-03-16  7:19   ` Greg Kroah-Hartman

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=875zf42313.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mchehab+samsung@kernel.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).