Re: [patch v2 1/2] drivers/platform/x86: move module mlx-platform from arch/x86 to drivers/platform/x86

From: Andy Shevchenko
Date: Thu Oct 27 2016 - 14:07:02 EST


Better, but...

When resending patch series, resend as a series. Otherwise sent them
independently if it's the case.

Remove 'drivers/' part from the subject and make it closer to ~70
characters all together.

You have quite a few people in Cc list, try to leave only TWIMC categore
of them, e.g. maintainers of both subsystems, mailing lists (LKML and
x86@ I think would be enough).

On Thu, 2016-10-27 at 19:53 +0000, Vadim Pasternak wrote:
> Move module mlx-platform.c from arch/x86/platform/mellanox/ to
> drivers/platform/x86/.
>

This doesn't answer to the question 'Why?'. First you have to express
your intention and motivation behind, and after put "What is done".

> Remove folder arch/x86/platform/mellanox/ and

This is not done by the patch, it a side-effect of Git VCS.

> update relevant Makefile
> and Kconfig.


>
> Signed-off-by: Vadim Pasternak <vadimp@xxxxxxxxxxxx>


> v1->v2:
> ÂComments pointed out by Andy:
> Â - Use -M -C -n option in git format-patch;

This should go exactly after '---' line.


> ---
> ÂMAINTAINERSÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ2 +-
> Âarch/x86/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ| 12 ---
> ---------
> Âarch/x86/platform/mellanox/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ1 -
> Âdrivers/platform/x86/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ| 14
> +++++++++++++-
> Âdrivers/platform/x86/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ1 +
> Â.../mellanox => drivers/platform/x86}/mlx-platform.cÂÂÂÂÂÂÂ|ÂÂ2 +-
> Â6 files changed, 16 insertions(+), 16 deletions(-)
> Âdelete mode 100644 arch/x86/platform/mellanox/Makefile
> Ârename {arch/x86/platform/mellanox => drivers/platform/x86}/mlx-
> platform.c (99%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 3e30399..960f364f 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -7879,7 +7879,7 @@ MELLANOX PLATFORM DRIVER
> ÂM:ÂÂÂÂÂÂVadim Pasternak <vadimp@xxxxxxxxxxxx>
> ÂL:ÂÂÂÂÂÂplatform-driver-x86@xxxxxxxxxxxxxxx
> ÂS:ÂÂÂÂÂÂSupported
> -F:ÂÂÂÂÂÂarch/x86/platform/mellanox/mlx-platform.c
> +F:ÂÂÂÂÂÂdrivers/platform/x86/mlx-platform.c
> Â
> ÂMELLANOX MLX CPLD HOTPLUG DRIVER
> ÂM: Vadim Pasternak <vadimp@xxxxxxxxxxxx>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index bada636..ccd5ff7 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -550,18 +550,6 @@ config X86_INTEL_QUARK
> Â ÂÂSay Y here if you have a Quark based system such as the
> Arduino
> Â ÂÂcompatible Intel Galileo.
> Â
> -config MLX_PLATFORM
> - tristate "Mellanox Technologies platform support"
> - depends on X86_64
> - depends on X86_EXTENDED_PLATFORM
> - ---help---
> - ÂÂThis option enables system support for the Mellanox
> Technologies
> - ÂÂplatform.
> -
> - ÂÂSay Y here if you are building a kernel for Mellanox
> system.
> -
> - ÂÂOtherwise, say N.
> -
> Âconfig X86_INTEL_LPSS
> Â bool "Intel Low Power Subsystem Support"
> Â depends on X86 && ACPI
> diff --git a/arch/x86/platform/mellanox/Makefile
> b/arch/x86/platform/mellanox/Makefile
> deleted file mode 100644
> index f43c931..0000000
> --- a/arch/x86/platform/mellanox/Makefile
> +++ /dev/null
> @@ -1 +0,0 @@
> -obj-$(CONFIG_MLX_PLATFORM) += mlx-platform.o
> diff --git a/drivers/platform/x86/Kconfig
> b/drivers/platform/x86/Kconfig
> index 1853769..78ed245 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -1028,10 +1028,22 @@ config INTEL_TELEMETRY
> Â ÂÂdirectly via debugfs files. Various tools may use
> Â ÂÂthis interface for SoC state monitoring.
> Â
> +config MLX_PLATFORM
> + tristate "Mellanox Technologies platform support"
> + depends on X86_64
> + ---help---
> + ÂÂThis option enables system support for the Mellanox
> Technologies
> + ÂÂplatform. The Mellanox systems provide data center
> networking
> + ÂÂsolutions based on Virtual Protocol Interconnect (VPI)
> technology
> + ÂÂenable seamless connectivity to 56/100Gb/s InfiniBand or
> 10/40/56GbE
> + ÂÂconnection.
> +
> + ÂÂIf you have a Mellanox system, say Y or M here.
> +
> Âconfig MLX_CPLD_PLATFORM
> Â tristate "Mellanox platform hotplug driver support"
> Â default n

> - depends on MLX_PLATFORM
> + select MLX_PLATFORM

This change is not explained in commit message. Why are you doing it?

> Â select HWMON
> Â select I2C
> Â ---help---
> diff --git a/drivers/platform/x86/Makefile
> b/drivers/platform/x86/Makefile
> index 1f06b63..2d6a587 100644
> --- a/drivers/platform/x86/Makefile
> +++ b/drivers/platform/x86/Makefile
> @@ -71,4 +71,5 @@ obj-$(CONFIG_INTEL_TELEMETRY) +=
> intel_telemetry_core.o \
> Â ÂÂÂintel_telemetry_pltdrv.o \
> Â ÂÂÂintel_telemetry_debugfs.o
> Âobj-$(CONFIG_INTEL_PMC_CORE)ÂÂÂÂ+= intel_pmc_core.o
> +obj-$(CONFIG_MLX_PLATFORM) += mlx-platform.o
> Âobj-$(CONFIG_MLX_CPLD_PLATFORM) += mlxcpld-hotplug.o
> diff --git a/arch/x86/platform/mellanox/mlx-platform.c
> b/drivers/platform/x86/mlx-platform.c
> similarity index 99%
> rename from arch/x86/platform/mellanox/mlx-platform.c
> rename to drivers/platform/x86/mlx-platform.c
> index 7dcfcca..86a1356 100644
> --- a/arch/x86/platform/mellanox/mlx-platform.c
> +++ b/drivers/platform/x86/mlx-platform.c
> @@ -1,5 +1,5 @@
> Â/*
> - * arch/x86/platform/mellanox/mlx-platform.c
> + * drivers/platform/x86/mlx-platform.c

There is a common practice nowadays not to put filenames in the top of
the files. You see the point here? Each time someone would like to move
or rename file...

Take a chance to remove it.

> Â * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
> Â * Copyright (c) 2016 Vadim Pasternak <vadimp@xxxxxxxxxxxx>
> Â *

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy