public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: 'Dinh Nguyen' <dinguyen@altera.com>,
	'Chris Ball' <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, 'Seungwon Jeon' <tgih.jun@samsung.com>,
	'Jaehoon Chung' <jh80.chung@samsung.com>
Subject: Re: [PATCH 1/2] mmc: dw_mmc-socfpga: Staticize dw_mci_socfpga_probe()
Date: Fri, 2 Aug 2013 11:34:00 +0300	[thread overview]
Message-ID: <20130802083400.GD5102@mwanda> (raw)
In-Reply-To: <000b01ce8f14$d08d4480$71a7cd80$@samsung.com>

On Fri, Aug 02, 2013 at 09:11:19AM +0900, Jingoo Han wrote:
> On Friday, August 02, 2013 1:19 AM, Dinh Nguyen wrote:
> > drivers/mmc/host/dw_mmc-pltfm.c:58:24: warning: incorrect type in
> > argument 1 (different address spaces)
> > drivers/mmc/host/dw_mmc-pltfm.c:58:24:    expected void const *ptr
> > drivers/mmc/host/dw_mmc-pltfm.c:58:24:    got void [noderef]
> > <asn:2>*regs
> > drivers/mmc/host/dw_mmc-pltfm.c:59:36: warning: incorrect type in
> > argument 1 (different address spaces)
> > drivers/mmc/host/dw_mmc-pltfm.c:59:36:    expected void const *ptr
> > drivers/mmc/host/dw_mmc-pltfm.c:59:36:    got void [noderef]
> > <asn:2>*regs
> 
> You mean the following.
> 
> 58 if (IS_ERR(host->regs))
> 59                return PTR_ERR(host->regs);
> 
> >From v3.11-rc1, it does not make sparse warnings,
> because of the commit e7152b9 "err.h: IS_ERR() can accept __user pointers"
> submitted by Dan Carpenter.

You have to upgrade to a later version of Sparse as well.

> 
> 
> > drivers/mmc/host/dw_mmc-pltfm.c:36:5: warning: symbol
> > 'dw_mci_pltfm_register' was not declared. Should it be static?
> > drivers/mmc/host/dw_mmc-pltfm.c:94:1: warning: symbol
> > 'dw_mci_pltfm_pmops' was not declared. Should it be static?
> 
> 'dw_mci_pltfm_register' and 'dw_mci_pltfm_pmops' are exported as below:
> 
> 70: EXPORT_SYMBOL_GPL(dw_mci_pltfm_register);
> 95: EXPORT_SYMBOL_GPL(dw_mci_pltfm_pmops);
> 
> So, I am not sure whether these can be static or not. :(
> Dan, if you know how to handle this, please let me know.

No, don't make these static.  The way to silence this warning is to
include "dw_mmc-pltfm.h".

regards,
dan carpenter


  reply	other threads:[~2013-08-02  8:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01  6:30 [PATCH 1/2] mmc: dw_mmc-socfpga: Staticize dw_mci_socfpga_probe() Jingoo Han
2013-08-01 16:18 ` Dinh Nguyen
2013-08-02  0:11   ` Jingoo Han
2013-08-02  8:34     ` Dan Carpenter [this message]
2013-08-06  1:30       ` Jingoo Han
2013-08-09 13:31 ` Seungwon Jeon

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=20130802083400.GD5102@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=cjb@laptop.org \
    --cc=dinguyen@altera.com \
    --cc=jg1.han@samsung.com \
    --cc=jh80.chung@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=tgih.jun@samsung.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