lkml.org 
[lkml]   [2020]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-04-28 14:25    [W:0.072 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site