* [PATCH] staging: dgap: Fixed sparse error: same symbol redeclared with different type
@ 2014-03-09 8:57 Masood Mehmood
2014-03-17 21:31 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Masood Mehmood @ 2014-03-09 8:57 UTC (permalink / raw)
To: gregkh; +Cc: lidza.louina, devel, linux-kernel
sparse reported dgap_do_fep_load is redeclared with different type. while
fixing, I noticed __user attribute is used incorrectly in declaration.
There is no need to define __user for firware->data.
Replaced the __user with 'const uchar *' from function dgap_do_fep_load and
did the same for function dgap_do_bios_load.
Signed-off-by: Masood Mehmood <ody.guru@gmail.com>
---
drivers/staging/dgap/dgap.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index d00283a..ab81479 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -210,9 +210,8 @@ static uint dgap_config_get_useintr(struct board_t *bd);
static uint dgap_config_get_altpin(struct board_t *bd);
static int dgap_ms_sleep(ulong ms);
-static void dgap_do_bios_load(struct board_t *brd, uchar __user *ubios,
- int len);
-static void dgap_do_fep_load(struct board_t *brd, uchar __user *ufep, int len);
+static void dgap_do_bios_load(struct board_t *brd, const uchar *ubios, int len);
+static void dgap_do_fep_load(struct board_t *brd, const uchar *ufep, int len);
#ifdef DIGI_CONCENTRATORS_SUPPORTED
static void dgap_do_conc_load(struct board_t *brd, uchar *uaddr, int len);
#endif
@@ -935,7 +934,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
fw_info[card_type].bios_name);
return ret;
}
- dgap_do_bios_load(brd, (char *)fw->data, fw->size);
+ dgap_do_bios_load(brd, fw->data, fw->size);
release_firmware(fw);
/* Wait for BIOS to test board... */
@@ -953,7 +952,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
fw_info[card_type].fep_name);
return ret;
}
- dgap_do_fep_load(brd, (char *)fw->data, fw->size);
+ dgap_do_fep_load(brd, fw->data, fw->size);
release_firmware(fw);
/* Wait for FEP to load on board... */
@@ -4349,7 +4348,7 @@ static int dgap_tty_register_ports(struct board_t *brd)
* Copies the BIOS code from the user to the board,
* and starts the BIOS running.
*/
-static void dgap_do_bios_load(struct board_t *brd, uchar __user *ubios, int len)
+static void dgap_do_bios_load(struct board_t *brd, const uchar *ubios, int len)
{
uchar *addr;
uint offset;
@@ -4425,7 +4424,7 @@ static void dgap_do_wait_for_bios(struct board_t *brd)
* Copies the FEP code from the user to the board,
* and starts the FEP running.
*/
-static void dgap_do_fep_load(struct board_t *brd, uchar *ufep, int len)
+static void dgap_do_fep_load(struct board_t *brd, const uchar *ufep, int len)
{
uchar *addr;
uint offset;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] staging: dgap: Fixed sparse error: same symbol redeclared with different type
@ 2014-03-13 3:55 Masood Mehmood
2014-03-17 21:36 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Masood Mehmood @ 2014-03-13 3:55 UTC (permalink / raw)
To: gregkh; +Cc: eng.linux, lidza.louina, driverdev-devel, devel, linux-kernel
sparse reported dgap_do_fep_load is redeclared with different type. while
fixing, I noticed __user attribute is used incorrectly in declaration.
There is no need to define __user for firware->data.
Replaced the __user with 'const uchar *' from function dgap_do_fep_load and
did the same for function dgap_do_bios_load.
Signed-off-by: Masood Mehmood <ody.guru@gmail.com>
---
drivers/staging/dgap/dgap.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index d00283a..ab81479 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -210,9 +210,8 @@ static uint dgap_config_get_useintr(struct board_t *bd);
static uint dgap_config_get_altpin(struct board_t *bd);
static int dgap_ms_sleep(ulong ms);
-static void dgap_do_bios_load(struct board_t *brd, uchar __user *ubios,
- int len);
-static void dgap_do_fep_load(struct board_t *brd, uchar __user *ufep, int len);
+static void dgap_do_bios_load(struct board_t *brd, const uchar *ubios, int len);
+static void dgap_do_fep_load(struct board_t *brd, const uchar *ufep, int len);
#ifdef DIGI_CONCENTRATORS_SUPPORTED
static void dgap_do_conc_load(struct board_t *brd, uchar *uaddr, int len);
#endif
@@ -935,7 +934,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
fw_info[card_type].bios_name);
return ret;
}
- dgap_do_bios_load(brd, (char *)fw->data, fw->size);
+ dgap_do_bios_load(brd, fw->data, fw->size);
release_firmware(fw);
/* Wait for BIOS to test board... */
@@ -953,7 +952,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
fw_info[card_type].fep_name);
return ret;
}
- dgap_do_fep_load(brd, (char *)fw->data, fw->size);
+ dgap_do_fep_load(brd, fw->data, fw->size);
release_firmware(fw);
/* Wait for FEP to load on board... */
@@ -4349,7 +4348,7 @@ static int dgap_tty_register_ports(struct board_t *brd)
* Copies the BIOS code from the user to the board,
* and starts the BIOS running.
*/
-static void dgap_do_bios_load(struct board_t *brd, uchar __user *ubios, int len)
+static void dgap_do_bios_load(struct board_t *brd, const uchar *ubios, int len)
{
uchar *addr;
uint offset;
@@ -4425,7 +4424,7 @@ static void dgap_do_wait_for_bios(struct board_t *brd)
* Copies the FEP code from the user to the board,
* and starts the FEP running.
*/
-static void dgap_do_fep_load(struct board_t *brd, uchar *ufep, int len)
+static void dgap_do_fep_load(struct board_t *brd, const uchar *ufep, int len)
{
uchar *addr;
uint offset;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] staging: dgap: Fixed sparse error: same symbol redeclared with different type
@ 2014-03-13 10:02 Masood Mehmood
2014-03-18 20:05 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Masood Mehmood @ 2014-03-13 10:02 UTC (permalink / raw)
To: gregkh; +Cc: eng.linux, lidza.louina, driverdev-devel, devel, linux-kernel
sparse reported dgap_do_fep_load is redeclared with different type. while
fixing, I noticed __user attribute is used incorrectly in declaration.
There is no need to define __user for firware->data.
Replaced the __user with 'const uchar *' from function dgap_do_fep_load and
did the same for function dgap_do_bios_load
patch generated against: next-20140317
Signed-off-by: Masood Mehmood <ody.guru@gmail.com>
---
drivers/staging/dgap/dgap.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index bfafe7e..bbacbba 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -210,9 +210,8 @@ static uint dgap_config_get_useintr(struct board_t *bd);
static uint dgap_config_get_altpin(struct board_t *bd);
static int dgap_ms_sleep(ulong ms);
-static void dgap_do_bios_load(struct board_t *brd, uchar __user *ubios,
- int len);
-static void dgap_do_fep_load(struct board_t *brd, uchar __user *ufep, int len);
+static void dgap_do_bios_load(struct board_t *brd, const uchar *ubios, int len);
+static void dgap_do_fep_load(struct board_t *brd, const uchar *ufep, int len);
#ifdef DIGI_CONCENTRATORS_SUPPORTED
static void dgap_do_conc_load(struct board_t *brd, uchar *uaddr, int len);
#endif
@@ -936,7 +935,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
fw_info[card_type].bios_name);
return ret;
}
- dgap_do_bios_load(brd, (char *)fw->data, fw->size);
+ dgap_do_bios_load(brd, fw->data, fw->size);
release_firmware(fw);
/* Wait for BIOS to test board... */
@@ -954,7 +953,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
fw_info[card_type].fep_name);
return ret;
}
- dgap_do_fep_load(brd, (char *)fw->data, fw->size);
+ dgap_do_fep_load(brd, fw->data, fw->size);
release_firmware(fw);
/* Wait for FEP to load on board... */
@@ -4350,7 +4349,7 @@ static int dgap_tty_register_ports(struct board_t *brd)
* Copies the BIOS code from the user to the board,
* and starts the BIOS running.
*/
-static void dgap_do_bios_load(struct board_t *brd, uchar __user *ubios, int len)
+static void dgap_do_bios_load(struct board_t *brd, const uchar *ubios, int len)
{
uchar *addr;
uint offset;
@@ -4426,7 +4425,7 @@ static void dgap_do_wait_for_bios(struct board_t *brd)
* Copies the FEP code from the user to the board,
* and starts the FEP running.
*/
-static void dgap_do_fep_load(struct board_t *brd, uchar *ufep, int len)
+static void dgap_do_fep_load(struct board_t *brd, const uchar *ufep, int len)
{
uchar *addr;
uint offset;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: dgap: Fixed sparse error: same symbol redeclared with different type
2014-03-09 8:57 Masood Mehmood
@ 2014-03-17 21:31 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2014-03-17 21:31 UTC (permalink / raw)
To: Masood Mehmood; +Cc: lidza.louina, devel, linux-kernel
On Sun, Mar 09, 2014 at 12:57:35AM -0800, Masood Mehmood wrote:
> sparse reported dgap_do_fep_load is redeclared with different type. while
> fixing, I noticed __user attribute is used incorrectly in declaration.
> There is no need to define __user for firware->data.
>
> Replaced the __user with 'const uchar *' from function dgap_do_fep_load and
> did the same for function dgap_do_bios_load.
>
> Signed-off-by: Masood Mehmood <ody.guru@gmail.com>
> ---
> drivers/staging/dgap/dgap.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
This patch does not apply to my tree, can you redo it?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: dgap: Fixed sparse error: same symbol redeclared with different type
2014-03-13 3:55 [PATCH] staging: dgap: Fixed sparse error: same symbol redeclared with different type Masood Mehmood
@ 2014-03-17 21:36 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2014-03-17 21:36 UTC (permalink / raw)
To: Masood Mehmood
Cc: eng.linux, lidza.louina, driverdev-devel, devel, linux-kernel
On Wed, Mar 12, 2014 at 08:55:44PM -0700, Masood Mehmood wrote:
> sparse reported dgap_do_fep_load is redeclared with different type. while
> fixing, I noticed __user attribute is used incorrectly in declaration.
> There is no need to define __user for firware->data.
>
> Replaced the __user with 'const uchar *' from function dgap_do_fep_load and
> did the same for function dgap_do_bios_load.
>
> Signed-off-by: Masood Mehmood <ody.guru@gmail.com>
> ---
> drivers/staging/dgap/dgap.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
This patch does not apply :(
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: dgap: Fixed sparse error: same symbol redeclared with different type
2014-03-13 10:02 Masood Mehmood
@ 2014-03-18 20:05 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2014-03-18 20:05 UTC (permalink / raw)
To: Masood Mehmood
Cc: devel, lidza.louina, eng.linux, driverdev-devel, linux-kernel
On Thu, Mar 13, 2014 at 03:02:59AM -0700, Masood Mehmood wrote:
> sparse reported dgap_do_fep_load is redeclared with different type. while
> fixing, I noticed __user attribute is used incorrectly in declaration.
> There is no need to define __user for firware->data.
>
> Replaced the __user with 'const uchar *' from function dgap_do_fep_load and
> did the same for function dgap_do_bios_load
>
> patch generated against: next-20140317
>
> Signed-off-by: Masood Mehmood <ody.guru@gmail.com>
> ---
> drivers/staging/dgap/dgap.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
This patch does not apply to my staging-next branch, sorry. Please redo
it and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-03-18 20:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-13 3:55 [PATCH] staging: dgap: Fixed sparse error: same symbol redeclared with different type Masood Mehmood
2014-03-17 21:36 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2014-03-13 10:02 Masood Mehmood
2014-03-18 20:05 ` Greg KH
2014-03-09 8:57 Masood Mehmood
2014-03-17 21:31 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox