[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200428122444.GA1244536@kroah.com>
Date: Tue, 28 Apr 2020 14:24:44 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Sidong Yang <realwakka@...il.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Manish Chopra <manishc@...vell.com>,
GR-Linux-NIC-Dev@...vell.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: qlge: change prefix to qlge_*
On Sun, Apr 26, 2020 at 05:41:20PM +0900, Sidong Yang wrote:
> In terms of namespace, The driver uses either qlge_, ql_ or nothing.
> also there is macro using QL_. This can make crash with other qlogic
> drivers. Rename everything to use the qlge_ or QLGE_ prefix.
How can it crash anything?
I can see changing global functions to a common namespace like this, but
you are changing a _lot_ of things here:
> ---
> drivers/staging/qlge/qlge.h | 488 +++++------
> drivers/staging/qlge/qlge_dbg.c | 638 +++++++-------
> drivers/staging/qlge/qlge_ethtool.c | 484 +++++------
> drivers/staging/qlge/qlge_main.c | 1200 +++++++++++++--------------
> drivers/staging/qlge/qlge_mpi.c | 386 ++++-----
> 5 files changed, 1598 insertions(+), 1598 deletions(-)
>
> diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h
> index fc8c5ca8935d..a8da06c978ff 100644
> --- a/drivers/staging/qlge/qlge.h
> +++ b/drivers/staging/qlge/qlge.h
> @@ -955,7 +955,7 @@ enum {
> MB_CMD_GET_PORT_CFG = 0x00000123,
> MB_CMD_GET_LINK_STS = 0x00000124,
> MB_CMD_SET_LED_CFG = 0x00000125, /* Set LED Configuration Register */
> - QL_LED_BLINK = 0x03e803e8,
> + QLGE_LED_BLINK = 0x03e803e8,
> MB_CMD_GET_LED_CFG = 0x00000126, /* Get LED Configuration Register */
> MB_CMD_SET_MGMNT_TFK_CTL = 0x00000160, /* Set Mgmnt Traffic Control */
> MB_SET_MPI_TFK_STOP = (1 << 0),
> @@ -986,14 +986,14 @@ enum {
> MB_CMD_STS_PARAM_ERR = 0x00004006, /* Parameter Error. */
> };
>
> -struct mbox_params {
> +struct qlge_mbox_params {
> u32 mbox_in[MAILBOX_COUNT];
> u32 mbox_out[MAILBOX_COUNT];
> int in_count;
> int out_count;
> };
Why change local structure names that are local to the specific driver?
That "namespace" can not escape out of the driver, so lots of these
changes are unneeded.
I will gladly take a patch that fixes up the global symbols, but that's
all that needs to be done here, right?
thanks,
greg k-h
Powered by blists - more mailing lists