Re: [PATCH 1/1] staging: emxx_udc: fix compile warnings: discarding const qualifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 13, 2014 at 11:42:03AM +0200, Vincenzo Scotti wrote:
> Signed-off-by: Vincenzo Scotti <vinc94@xxxxxxxxx>
> Reported-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
> ---
>  drivers/staging/emxx_udc/emxx_udc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> index ef956df..09d8fb3 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.c
> +++ b/drivers/staging/emxx_udc/emxx_udc.c
> @@ -3235,7 +3235,7 @@ static const char g_epb_name[] = "epb-bulk";
>  static const char g_epc_name[] = "epc-nulk";
>  static const char g_epd_name[] = "epdin-int";
>  
> -static char *gp_ep_name[NUM_ENDPOINTS] = {
> +static const char *gp_ep_name[NUM_ENDPOINTS] = {
>  	g_ep0_name,
>  	g_ep1_name,
>  	g_ep2_name,
> @@ -3256,7 +3256,7 @@ static char *gp_ep_name[NUM_ENDPOINTS] = {
>  static void __init nbu2ss_drv_set_ep_info(
>  	struct nbu2ss_udc	*udc,
>  	struct nbu2ss_ep	*ep,
> -	u8 *name)
> +	char *name)

This should be a const char pointer.  In other words don't  make
something const and then cast away the const the first time it is used.
Hopefully, that doesn't cause too bad of a ripple effect of changes.  If
it does then it probably means the code is buggy anyway...

Please redo and this time without any new casts. ;)

regars,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux