mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Marek Belisko <marek.belisko@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] staging: ft1000: Fix compilation warning.
Date: Wed, 10 Nov 2010 08:38:14 -0800	[thread overview]
Message-ID: <20101110083814.55e222c4.rdunlap@xenotime.net> (raw)
In-Reply-To: <1289384128-19823-1-git-send-email-marek.belisko@gmail.com>

On Wed, 10 Nov 2010 11:15:26 +0100 Marek Belisko wrote:

> Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
> ---
>  drivers/staging/ft1000/ft1000-usb/ft1000_usb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)


a.  always include the warning or error message that the patch fixes

b.  (quoting from another email yesterday:)

so in your analysis of this compiler warning, was the warning correct & justified,
or was it false?  I.e., is the init to NULL needed?

If it was false, could we just silence the warning by using:

	struct ft1000_info *unitialized_var(pft1000info);

plus #include <linux/compiler.h> ?


> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
> index 99e3339..b7c4602 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
> @@ -64,7 +64,7 @@ static int ft1000_probe(struct usb_interface *interface,
>  	int i, ret = 0, size;
>  
>  	struct ft1000_device *ft1000dev;
> -	struct ft1000_info *pft1000info;
> +	struct ft1000_info *pft1000info = NULL;
>  	const struct firmware *dsp_fw;
>  
>  	ft1000dev = kmalloc(sizeof(struct ft1000_device), GFP_KERNEL);
> -- 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  parent reply	other threads:[~2010-11-10 16:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 10:15 Marek Belisko
2010-11-10 10:15 ` [PATCH 2/3] staging: ft1000: Remove unused char dev inerface Marek Belisko
2010-11-11  0:26   ` Greg KH
2010-11-13 19:05     ` Belisko Marek
2010-11-16 19:36       ` Greg KH
2010-11-18  8:43         ` Belisko Marek
2010-11-20  1:16           ` Greg KH
2010-11-10 10:15 ` [PATCH 3/3] staging: ft1000: Remove unused variables Marek Belisko
2010-11-10 16:38 ` Randy Dunlap [this message]
2010-11-12  9:57   ` [PATCH 1/3] staging: ft1000: Fix compilation warning Belisko Marek
2010-11-12 16:29     ` Randy Dunlap
2010-11-11  0:29 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101110083814.55e222c4.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.belisko@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®