lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d8ca5752-79e0-ddc6-a6ec-01c3e4bba703@synopsys.com>
Date:   Thu, 12 Jan 2017 16:30:58 -0800
From:   John Youn <John.Youn@...opsys.com>
To:     Nicholas Mc Guire <hofrat@...dl.org>,
        John Youn <John.Youn@...opsys.com>,
        Felipe Balbi <balbi@...nel.org>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2] usb: dwc2: host: fix Wmaybe-uninitialized warning

On 1/12/2017 8:32 AM, Nicholas Mc Guire wrote:
> Uninitialized char* causes a sparse build-warning, fix it up by
> initializing it to NULL.
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@...dl.org>
> ---
> 
> V2: add missing change-log as requested by Greg Kroah-Hartman 
>     <gregkh@...uxfoundation.org> 
> 
> Problem reported by sparse
> drivers/usb/dwc2/hcd.c: In function 'dwc2_dump_urb_info':
> ./include/linux/dynamic_debug.h:134:3: warning: 'pipetype' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    __dynamic_dev_dbg(&descriptor, dev, fmt, \
>    ^
> drivers/usb/dwc2/hcd.c:4492:8: note: 'pipetype' was declared here
>   char *pipetype;
>         ^
> Patch was compile tested with: x86_64_defconfig + CONFIG_USB_DWC2=m +
> CONFIG_USB_DWC2_VERBOSE=y
> 
> Patch is against 4.10-rc3 (localversion-next is next-20170112)
> 
>  drivers/usb/dwc2/hcd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 911c3b3..9f66777 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -4489,8 +4489,8 @@ static void dwc2_dump_urb_info(struct usb_hcd *hcd, struct urb *urb,
>  {
>  #ifdef VERBOSE_DEBUG
>  	struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd);
> -	char *pipetype;
> -	char *speed;
> +	char *pipetype = NULL;
> +	char *speed = NULL;
>  
>  	dev_vdbg(hsotg->dev, "%s, urb %p\n", fn_name, urb);
>  	dev_vdbg(hsotg->dev, "  Device address: %d\n",
> 

+Felipe

Acked-by: John Youn <johnyoun@...opsys.com>

John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ