public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Baolin Wang <baolin.wang7@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Lee Jones <lee.jones@linaro.org>
Subject: drivers/mfd/sprd-sc27xx-spi.c:59:23: warning: no previous prototype for 'sprd_pmic_detect_charger_type'
Date: Tue, 26 May 2020 12:46:31 +0800	[thread overview]
Message-ID: <202005261229.pAsjBMd4%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2493 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9cb1fd0efd195590b828b9b865421ad345a4a145
commit: 2a7e7274f3d43d2a072cab25c0035dc994903bb9 mfd: sc27xx: Add USB charger type detection support
date:   8 weeks ago
config: h8300-randconfig-r006-20200526 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 2a7e7274f3d43d2a072cab25c0035dc994903bb9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/mfd/sprd-sc27xx-spi.c:59:23: warning: no previous prototype for 'sprd_pmic_detect_charger_type' [-Wmissing-prototypes]
59 | enum usb_charger_type sprd_pmic_detect_charger_type(struct device *dev)
|                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/sprd_pmic_detect_charger_type +59 drivers/mfd/sprd-sc27xx-spi.c

    58	
  > 59	enum usb_charger_type sprd_pmic_detect_charger_type(struct device *dev)
    60	{
    61		struct spi_device *spi = to_spi_device(dev);
    62		struct sprd_pmic *ddata = spi_get_drvdata(spi);
    63		const struct sprd_pmic_data *pdata = ddata->pdata;
    64		enum usb_charger_type type;
    65		u32 val;
    66		int ret;
    67	
    68		ret = regmap_read_poll_timeout(ddata->regmap, pdata->charger_det, val,
    69					       (val & SPRD_PMIC_CHG_DET_DONE),
    70					       SPRD_PMIC_CHG_DET_DELAY_US,
    71					       SPRD_PMIC_CHG_DET_TIMEOUT);
    72		if (ret) {
    73			dev_err(&spi->dev, "failed to detect charger type\n");
    74			return UNKNOWN_TYPE;
    75		}
    76	
    77		switch (val & SPRD_PMIC_CHG_TYPE_MASK) {
    78		case SPRD_PMIC_CDP_TYPE:
    79			type = CDP_TYPE;
    80			break;
    81		case SPRD_PMIC_DCP_TYPE:
    82			type = DCP_TYPE;
    83			break;
    84		case SPRD_PMIC_SDP_TYPE:
    85			type = SDP_TYPE;
    86			break;
    87		default:
    88			type = UNKNOWN_TYPE;
    89			break;
    90		}
    91	
    92		return type;
    93	}
    94	EXPORT_SYMBOL_GPL(sprd_pmic_detect_charger_type);
    95	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33699 bytes --]

                 reply	other threads:[~2020-05-26  5:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202005261229.pAsjBMd4%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=baolin.wang7@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /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