All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <James.Smart@Emulex.Com>
To: akpm@osdl.org
Cc: James.Bottomley@steeleye.com, linux-scsi@vger.kernel.org,
	rdunlap@xenotime.net
Subject: Re: [patch 13/26] lpfc: sparse NULL warnings
Date: Sun, 25 Jun 2006 09:46:26 -0400	[thread overview]
Message-ID: <449E93B2.7060405@emulex.com> (raw)
In-Reply-To: <200606250858.k5P8wpO3021214@shell0.pdx.osdl.net>

ACK

akpm@osdl.org wrote:
> From: Randy Dunlap <rdunlap@xenotime.net>
> 
> Fix sparse warnings: use NULL instead of 0 for pointers:
> drivers/scsi/lpfc/lpfc_els.c:827:56: warning: Using plain integer as NULL pointer
> drivers/scsi/lpfc/lpfc_els.c:2781:18: warning: Using plain integer as NULL pointer
> drivers/scsi/lpfc/lpfc_els.c:2782:18: warning: Using plain integer as NULL pointer
> drivers/scsi/lpfc/lpfc_init.c:951:21: warning: Using plain integer as NULL pointer
> drivers/scsi/lpfc/lpfc_init.c:956:20: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> ---
> 
>  drivers/scsi/lpfc/lpfc_els.c  |    6 +++---
>  drivers/scsi/lpfc/lpfc_init.c |    4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff -puN drivers/scsi/lpfc/lpfc_els.c~lpfc-sparse-null-warnings drivers/scsi/lpfc/lpfc_els.c
> --- a/drivers/scsi/lpfc/lpfc_els.c~lpfc-sparse-null-warnings
> +++ a/drivers/scsi/lpfc/lpfc_els.c
> @@ -821,7 +821,7 @@ lpfc_issue_els_plogi(struct lpfc_hba * p
>  	pring = &psli->ring[LPFC_ELS_RING];	/* ELS ring */
>  
>  	cmdsize = (sizeof (uint32_t) + sizeof (struct serv_parm));
> -	elsiocb = lpfc_prep_els_iocb(phba, 1, cmdsize, retry, 0, did,
> +	elsiocb = lpfc_prep_els_iocb(phba, 1, cmdsize, retry, NULL, did,
>  								ELS_CMD_PLOGI);
>  	if (!elsiocb)
>  		return 1;
> @@ -2791,8 +2791,8 @@ lpfc_els_rsp_rps_acc(struct lpfc_hba * p
>  
>  	ndlp = (struct lpfc_nodelist *) pmb->context2;
>  	xri = (uint16_t) ((unsigned long)(pmb->context1));
> -	pmb->context1 = 0;
> -	pmb->context2 = 0;
> +	pmb->context1 = NULL;
> +	pmb->context2 = NULL;
>  
>  	if (mb->mbxStatus) {
>  		mempool_free( pmb, phba->mbox_mem_pool);
> diff -puN drivers/scsi/lpfc/lpfc_init.c~lpfc-sparse-null-warnings drivers/scsi/lpfc/lpfc_init.c
> --- a/drivers/scsi/lpfc/lpfc_init.c~lpfc-sparse-null-warnings
> +++ a/drivers/scsi/lpfc/lpfc_init.c
> @@ -939,12 +939,12 @@ lpfc_get_hba_model_desc(struct lpfc_hba 
>  					"10-port ", "PCIe"};
>  			break;
>  		default:
> -			m = (typeof(m)){ 0 };
> +			m = (typeof(m)){ NULL };
>  			break;
>  		}
>  		break;
>  	default:
> -		m = (typeof(m)){ 0 };
> +		m = (typeof(m)){ NULL };
>  		break;
>  	}
>  
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2006-06-25 13:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-25  8:58 [patch 13/26] lpfc: sparse NULL warnings akpm
2006-06-25 13:46 ` James Smart [this message]

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=449E93B2.7060405@emulex.com \
    --to=james.smart@emulex.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.