linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: ferlandm@amotus.ca, a.zummo@towertech.it
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	alexandre.belloni@bootlin.com, linux-rtc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Marc Ferland <ferlandm@amotus.ca>
Subject: Re: [PATCH] rtc: pcf85063: add i2c_device_id name matching support
Date: Fri, 5 Nov 2021 11:04:32 +0800	[thread overview]
Message-ID: <202111051119.UeuF3GiJ-lkp@intel.com> (raw)
In-Reply-To: <20211104134007.1159581-1-ferlandm@amotus.ca>

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

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on v5.15 next-20211104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/ferlandm-amotus-ca/rtc-pcf85063-add-i2c_device_id-name-matching-support/20211104-214400
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: x86_64-randconfig-r034-20211105 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 847a6807332b13f43704327c2d30103ec0347c77)
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
        # https://github.com/0day-ci/linux/commit/daa69a83cd9857be2bd3c58bfeb7f028253e6a4f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review ferlandm-amotus-ca/rtc-pcf85063-add-i2c_device_id-name-matching-support/20211104-214400
        git checkout daa69a83cd9857be2bd3c58bfeb7f028253e6a4f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> drivers/rtc/rtc-pcf85063.c:583:10: warning: cast to smaller integer type 'enum pcf85063_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
                   type = (enum pcf85063_type)of_device_get_match_data(&client->dev);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +583 drivers/rtc/rtc-pcf85063.c

   559	
   560	static int pcf85063_probe(struct i2c_client *client)
   561	{
   562		struct pcf85063 *pcf85063;
   563		unsigned int tmp;
   564		int err;
   565		const struct pcf85063_config *config;
   566		enum pcf85063_type type;
   567		struct nvmem_config nvmem_cfg = {
   568			.name = "pcf85063_nvram",
   569			.reg_read = pcf85063_nvmem_read,
   570			.reg_write = pcf85063_nvmem_write,
   571			.type = NVMEM_TYPE_BATTERY_BACKED,
   572			.size = 1,
   573		};
   574	
   575		dev_dbg(&client->dev, "%s\n", __func__);
   576	
   577		pcf85063 = devm_kzalloc(&client->dev, sizeof(struct pcf85063),
   578					GFP_KERNEL);
   579		if (!pcf85063)
   580			return -ENOMEM;
   581	
   582		if (client->dev.of_node)
 > 583			type = (enum pcf85063_type)of_device_get_match_data(&client->dev);
   584		else
   585			type = i2c_match_id(pcf85063_ids, client)->driver_data;
   586	
   587		config = &pcf85063_cfg[type];
   588	
   589		pcf85063->regmap = devm_regmap_init_i2c(client, &config->regmap);
   590		if (IS_ERR(pcf85063->regmap))
   591			return PTR_ERR(pcf85063->regmap);
   592	
   593		i2c_set_clientdata(client, pcf85063);
   594	
   595		err = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL1, &tmp);
   596		if (err) {
   597			dev_err(&client->dev, "RTC chip is not present\n");
   598			return err;
   599		}
   600	
   601		pcf85063->rtc = devm_rtc_allocate_device(&client->dev);
   602		if (IS_ERR(pcf85063->rtc))
   603			return PTR_ERR(pcf85063->rtc);
   604	
   605		err = pcf85063_load_capacitance(pcf85063, client->dev.of_node,
   606						config->force_cap_7000 ? 7000 : 0);
   607		if (err < 0)
   608			dev_warn(&client->dev, "failed to set xtal load capacitance: %d",
   609				 err);
   610	
   611		pcf85063->rtc->ops = &pcf85063_rtc_ops;
   612		pcf85063->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
   613		pcf85063->rtc->range_max = RTC_TIMESTAMP_END_2099;
   614		pcf85063->rtc->uie_unsupported = 1;
   615		clear_bit(RTC_FEATURE_ALARM, pcf85063->rtc->features);
   616	
   617		if (config->has_alarms && client->irq > 0) {
   618			err = devm_request_threaded_irq(&client->dev, client->irq,
   619							NULL, pcf85063_rtc_handle_irq,
   620							IRQF_TRIGGER_LOW | IRQF_ONESHOT,
   621							"pcf85063", pcf85063);
   622			if (err) {
   623				dev_warn(&pcf85063->rtc->dev,
   624					 "unable to request IRQ, alarms disabled\n");
   625			} else {
   626				set_bit(RTC_FEATURE_ALARM, pcf85063->rtc->features);
   627				device_init_wakeup(&client->dev, true);
   628				err = dev_pm_set_wake_irq(&client->dev, client->irq);
   629				if (err)
   630					dev_err(&pcf85063->rtc->dev,
   631						"failed to enable irq wake\n");
   632			}
   633		}
   634	
   635		nvmem_cfg.priv = pcf85063->regmap;
   636		devm_rtc_nvmem_register(pcf85063->rtc, &nvmem_cfg);
   637	

---
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: 32411 bytes --]

  reply	other threads:[~2021-11-05  3:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 13:40 [PATCH] rtc: pcf85063: add i2c_device_id name matching support ferlandm
2021-11-05  3:04 ` kernel test robot [this message]
2021-11-16 16:47   ` [PATCH v2] " ferlandm
2021-11-30 23:07     ` Alexandre Belloni

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=202111051119.UeuF3GiJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=ferlandm@amotus.ca \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).