outreachy.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] staging: vme: Cleanup driver tree old structures
@ 2022-04-21 14:57 Bruno Moreira-Guedes
  2022-04-21 14:58 ` [PATCH v4 1/3] staging: vme: Move vme_user to staging KConfig Bruno Moreira-Guedes
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bruno Moreira-Guedes @ 2022-04-21 14:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Martyn Welch, Manohar Vanga, linux-staging,
	linux-kernel, outreachy, Bruno's Patch Watchbox

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

This patch series modify the vme_user driver's place in
menuconfig (1/3), fixes a missing `depends on` line in a Kconfig file
(2/3), and rearrages the directory tree for the driver allowing a more
straightforward comprehension of its contents (3/3).

The 'vme_user/' driver is the only remaining vme-family driver in the
'staging/' tree, but its structure, entry in menuconfig and building
routines are still attached to the 'vme/' subtree now outside
'staging/'. The present patchset fixes it.

Signed-off-by: Bruno Moreira-Guedes <codeagain@codeagain.dev>
---
CHANGE SUMMARY

  Version:  v1  v2  v3  v4
[PATCH 1/3] *   -   *   -
[PATCH 2/3] -   *   *   -
[PATCH 3/3] -   *   *   *

CHANGELOG
v4:
  * Remove extraneous patch from set (Greg)
  * Improve changelog format (Alison)
  * Update commit message in PATCH 3/3

v3:
  * Update Changelog to cover letter (Alison)
  * Update commit messages and logs (Alison, Greg)
  * Rename patches 2/3 and 3/3

v2:
  * Add new patch to set: 2/3
  * Add new patch to set: 3/3

OBSERVATIONS
As Martyn confirmed the devices are still being manufactured I'll keep
going on with this patch meanwhile.

PATCHES
[PATCH 1/3] staging: vme: Move vme_user to staging KConfig
[PATCH 2/3] staging: vme: Add VME_BUS dependency to Kconfig
[PATCH 3/3] staging: vme: Move 'vme/devices/' to 'vme_user/'
---
Bruno Moreira-Guedes (3):
  staging: vme: Move vme_user to staging KConfig
  staging: vme: Add VME_BUS dependency to Kconfig
  staging: vme: Move 'vme/devices/' to 'vme_user/'

 MAINTAINERS                                          | 2 +-
 drivers/staging/Kconfig                              | 1 +
 drivers/staging/Makefile                             | 2 +-
 drivers/staging/vme/Makefile                         | 2 --
 drivers/staging/{vme/devices => vme_user}/Kconfig    | 2 +-
 drivers/staging/{vme/devices => vme_user}/Makefile   | 0
 drivers/staging/{vme/devices => vme_user}/vme_user.c | 0
 drivers/staging/{vme/devices => vme_user}/vme_user.h | 0
 drivers/vme/Kconfig                                  | 2 --
 9 files changed, 4 insertions(+), 7 deletions(-)
 delete mode 100644 drivers/staging/vme/Makefile
 rename drivers/staging/{vme/devices => vme_user}/Kconfig (93%)
 rename drivers/staging/{vme/devices => vme_user}/Makefile (100%)
 rename drivers/staging/{vme/devices => vme_user}/vme_user.c (100%)
 rename drivers/staging/{vme/devices => vme_user}/vme_user.h (100%)

-- 
2.35.3


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v4 1/3] staging: vme: Move vme_user to staging KConfig
  2022-04-21 14:57 [PATCH v4 0/3] staging: vme: Cleanup driver tree old structures Bruno Moreira-Guedes
@ 2022-04-21 14:58 ` Bruno Moreira-Guedes
  2022-04-21 14:59 ` [PATCH v4 2/3] staging: vme: Add VME_BUS dependency to Kconfig Bruno Moreira-Guedes
  2022-04-21 14:59 ` [PATCH v4 3/3] staging: vme: Move 'vme/devices/' to 'vme_user/' Bruno Moreira-Guedes
  2 siblings, 0 replies; 4+ messages in thread
From: Bruno Moreira-Guedes @ 2022-04-21 14:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Martyn Welch, Manohar Vanga, linux-staging,
	linux-kernel, outreachy, Bruno's Patch Watchbox

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

Currently, the VME_USER driver is in the staging tree Kconfig, unlike
other VME drivers already moved to the main portions of the kernel tree.
Its configuration is, however, nested into the VME_BUS config option,
which might be misleading.

Since the staging tree "[...] is used to hold stand-alone drivers and
filesystem that are not ready to be merged into the main portion of the
Linux kernel tree [...]"(from 
https://lore.kernel.org/all/20090320172502.GA14647@kroah.com/T/),
staging drivers should appear nested into the Main Menu -> Device
Drivers -> Staging Drivers to make sure the user don't pick it without
being fully aware of its staging status as it could be the case in
Menu -> Device Drivers -> VME bridge support (the current location).

With this change menuconfig users will clearly know this is not a driver
in the main portion of the kernel tree and decide whether to build it or
not with that clearly in mind.

This change goes into the same direction of commit
<4b4cdf3979c32fa3d042d150f49449c74d048553> ("STAGING: Move staging
drivers back to staging-specific menu")

Signed-off-by: Bruno Moreira-Guedes <codeagain@codeagain.dev>
---
 drivers/staging/Kconfig | 2 ++
 drivers/vme/Kconfig     | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index fc274737053d..e4dcf411030d 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -87,4 +87,6 @@ source "drivers/staging/fieldbus/Kconfig"
 source "drivers/staging/qlge/Kconfig"
 
 
+source "drivers/staging/vme/devices/Kconfig"
+
 endif # STAGING
diff --git a/drivers/vme/Kconfig b/drivers/vme/Kconfig
index 936392ca3c8c..c13dd9d2a604 100644
--- a/drivers/vme/Kconfig
+++ b/drivers/vme/Kconfig
@@ -15,6 +15,4 @@ source "drivers/vme/bridges/Kconfig"
 
 source "drivers/vme/boards/Kconfig"
 
-source "drivers/staging/vme/devices/Kconfig"
-
 endif # VME
-- 
2.35.3
 

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 2/3] staging: vme: Add VME_BUS dependency to Kconfig
  2022-04-21 14:57 [PATCH v4 0/3] staging: vme: Cleanup driver tree old structures Bruno Moreira-Guedes
  2022-04-21 14:58 ` [PATCH v4 1/3] staging: vme: Move vme_user to staging KConfig Bruno Moreira-Guedes
@ 2022-04-21 14:59 ` Bruno Moreira-Guedes
  2022-04-21 14:59 ` [PATCH v4 3/3] staging: vme: Move 'vme/devices/' to 'vme_user/' Bruno Moreira-Guedes
  2 siblings, 0 replies; 4+ messages in thread
From: Bruno Moreira-Guedes @ 2022-04-21 14:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Martyn Welch, Manohar Vanga, linux-staging,
	linux-kernel, outreachy, Bruno's Patch Watchbox

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

The KConfig file for VME_USER ('drivers/staging/vme/devices/Kconfig')
sourced at "drivers/vme/boards/KConfig" misses a `depends on` line for
VME_BUS, which is unnoticeable for menuconfig users who aren't be able
to select it through this interface without setting the CONFIG_VME_BUS
option because it's nested on VME_BUS menu entry.

A patch to move appropriately this driver to the "Staging" submenu
([PATCH 1/3], originally sent as a single patch submitted at
https://lore.kernel.org/linux-staging/3fbc5325e94b9ae0666a1f5a56a4e5372bfcea1d.camel@codeagain.dev/T/#t),
however, unveiled this missing `depends on` line, since it moved the
`source` line for VME_USER's KConfig to somewhere else, allowing it to
be compiled without the support for VME_BUS. While it compiles fine and
seems to initialize the driver fine (tested both as module and as built-
in), it seems to make no sense having VME_USER without VME_BUS.

This patches addresses it by adding the VME_BUS to the `depends on` line
at "drivers/staging/vme/devices/Kconfig".

Signed-off-by: Bruno Moreira-Guedes <codeagain@codeagain.dev>
---
 drivers/staging/vme/devices/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vme/devices/Kconfig b/drivers/staging/vme/devices/Kconfig
index 5651bb16b28b..e8b4461bf27f 100644
--- a/drivers/staging/vme/devices/Kconfig
+++ b/drivers/staging/vme/devices/Kconfig
@@ -3,7 +3,7 @@ comment "VME Device Drivers"
 
 config VME_USER
 	tristate "VME user space access driver"
-	depends on STAGING
+	depends on STAGING && VME_BUS
 	help
 	  If you say Y here you want to be able to access a limited number of
 	  VME windows in a manner at least semi-compatible with the interface
-- 
2.35.3


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 3/3] staging: vme: Move 'vme/devices/' to 'vme_user/'
  2022-04-21 14:57 [PATCH v4 0/3] staging: vme: Cleanup driver tree old structures Bruno Moreira-Guedes
  2022-04-21 14:58 ` [PATCH v4 1/3] staging: vme: Move vme_user to staging KConfig Bruno Moreira-Guedes
  2022-04-21 14:59 ` [PATCH v4 2/3] staging: vme: Add VME_BUS dependency to Kconfig Bruno Moreira-Guedes
@ 2022-04-21 14:59 ` Bruno Moreira-Guedes
  2 siblings, 0 replies; 4+ messages in thread
From: Bruno Moreira-Guedes @ 2022-04-21 14:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Martyn Welch, Manohar Vanga, linux-staging,
	linux-kernel, outreachy, Bruno's Patch Watchbox

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

In <db3b9e990e75573402cda22faf933760f076c033> ("Staging: VME: move VME 
drivers out of staging") the vme code, board and bridge drivers were
moved out of the staging tree, remaining only the VME user device 
driver.

Since this driver is the only one remaining in staging, such multi-level
structure confuses more than helps. The current structure is as follows:

 - drivers/staging/vme/
                       Makefile
                       devices/
                               Kconfig
                               Makefile
                               vme_user.c
                               vme_user.h

The top-level Makefile has the only function of calling another Makefile
into the devices/ subdirectory. This latter only compiles the vme_user 
driver, since there is no other in the staging tree.

This patch removes the unnecessary Makefile from the 'vme/' dir, move
the contents of 'vme/devices' into the 'vme/' dir, and renames it to
'vme_user/' (the driver name), allowing a straightforward understanding
of this driver's contents. Furthermore, it updates the MAINTAINERS file
to properly reflect the new paths.

Signed-off-by: Bruno Moreira-Guedes <codeagain@codeagain.dev>
---
 MAINTAINERS                                          | 2 +-
 drivers/staging/Kconfig                              | 3 +--
 drivers/staging/Makefile                             | 2 +-
 drivers/staging/vme/Makefile                         | 2 --
 drivers/staging/{vme/devices => vme_user}/Kconfig    | 0
 drivers/staging/{vme/devices => vme_user}/Makefile   | 0
 drivers/staging/{vme/devices => vme_user}/vme_user.c | 0
 drivers/staging/{vme/devices => vme_user}/vme_user.h | 0
 8 files changed, 3 insertions(+), 6 deletions(-)
 delete mode 100644 drivers/staging/vme/Makefile
 rename drivers/staging/{vme/devices => vme_user}/Kconfig (100%)
 rename drivers/staging/{vme/devices => vme_user}/Makefile (100%)
 rename drivers/staging/{vme/devices => vme_user}/vme_user.c (100%)
 rename drivers/staging/{vme/devices => vme_user}/vme_user.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 3ed62dcd144e..efc38961f792 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21010,7 +21010,7 @@ L:	linux-kernel@vger.kernel.org
 S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
 F:	Documentation/driver-api/vme.rst
-F:	drivers/staging/vme/
+F:	drivers/staging/vme_user/
 F:	drivers/vme/
 F:	include/linux/vme*
 
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index e4dcf411030d..e117811ec832 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -86,7 +86,6 @@ source "drivers/staging/fieldbus/Kconfig"
 
 source "drivers/staging/qlge/Kconfig"
 
-
-source "drivers/staging/vme/devices/Kconfig"
+source "drivers/staging/vme_user/Kconfig"
 
 endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 65e317922e3f..db7287de0faf 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -14,7 +14,7 @@ obj-$(CONFIG_OCTEON_ETHERNET)	+= octeon/
 obj-$(CONFIG_OCTEON_USB)	+= octeon-usb/
 obj-$(CONFIG_VT6655)		+= vt6655/
 obj-$(CONFIG_VT6656)		+= vt6656/
-obj-$(CONFIG_VME_BUS)		+= vme/
+obj-$(CONFIG_VME_BUS)		+= vme_user/
 obj-$(CONFIG_IIO)		+= iio/
 obj-$(CONFIG_FB_SM750)		+= sm750fb/
 obj-$(CONFIG_USB_EMXX)		+= emxx_udc/
diff --git a/drivers/staging/vme/Makefile b/drivers/staging/vme/Makefile
deleted file mode 100644
index cf2f686ccffe..000000000000
--- a/drivers/staging/vme/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-obj-y				+= devices/
diff --git a/drivers/staging/vme/devices/Kconfig b/drivers/staging/vme_user/Kconfig
similarity index 100%
rename from drivers/staging/vme/devices/Kconfig
rename to drivers/staging/vme_user/Kconfig
diff --git a/drivers/staging/vme/devices/Makefile b/drivers/staging/vme_user/Makefile
similarity index 100%
rename from drivers/staging/vme/devices/Makefile
rename to drivers/staging/vme_user/Makefile
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme_user/vme_user.c
similarity index 100%
rename from drivers/staging/vme/devices/vme_user.c
rename to drivers/staging/vme_user/vme_user.c
diff --git a/drivers/staging/vme/devices/vme_user.h b/drivers/staging/vme_user/vme_user.h
similarity index 100%
rename from drivers/staging/vme/devices/vme_user.h
rename to drivers/staging/vme_user/vme_user.h
-- 
2.35.3
 

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-21 14:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 14:57 [PATCH v4 0/3] staging: vme: Cleanup driver tree old structures Bruno Moreira-Guedes
2022-04-21 14:58 ` [PATCH v4 1/3] staging: vme: Move vme_user to staging KConfig Bruno Moreira-Guedes
2022-04-21 14:59 ` [PATCH v4 2/3] staging: vme: Add VME_BUS dependency to Kconfig Bruno Moreira-Guedes
2022-04-21 14:59 ` [PATCH v4 3/3] staging: vme: Move 'vme/devices/' to 'vme_user/' Bruno Moreira-Guedes

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).