tree:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git 
rtc-next
head:   bcae59d0d45b866d5b9525ea8ece6d671e6767c8
commit: f765e349c3e1f2e676ad4bd61197216b26976022 [2/7] rtc: m41t80: add support 
for fixed clock
config: i386-randconfig-s001-20210524 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/commit/?id=f765e349c3e1f2e676ad4bd61197216b26976022
        git remote add abelloni 
https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git
        git fetch --no-tags abelloni rtc-next
        git checkout f765e349c3e1f2e676ad4bd61197216b26976022
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


sparse warnings: (new ones prefixed by >>)
>> drivers/rtc/rtc-m41t80.c:560:24: sparse: sparse: Using plain integer as NULL 
>> pointer

vim +560 drivers/rtc/rtc-m41t80.c

   542  
   543  static struct clk *m41t80_sqw_register_clk(struct m41t80_data *m41t80)
   544  {
   545          struct i2c_client *client = m41t80->client;
   546          struct device_node *node = client->dev.of_node;
   547          struct device_node *fixed_clock;
   548          struct clk *clk;
   549          struct clk_init_data init;
   550          int ret;
   551  
   552          fixed_clock = of_get_child_by_name(node, "clock");
   553          if (fixed_clock) {
   554                  /*
   555                   * skip registering square wave clock when a fixed
   556                   * clock has been registered. The fixed clock is
   557                   * registered automatically when being referenced.
   558                   */
   559                  of_node_put(fixed_clock);
 > 560                  return 0;
   561          }
   562  
   563          /* First disable the clock */
   564          ret = i2c_smbus_read_byte_data(client, M41T80_REG_ALARM_MON);
   565          if (ret < 0)
   566                  return ERR_PTR(ret);
   567          ret = i2c_smbus_write_byte_data(client, M41T80_REG_ALARM_MON,
   568                                          ret & ~(M41T80_ALMON_SQWE));
   569          if (ret < 0)
   570                  return ERR_PTR(ret);
   571  
   572          init.name = "m41t80-sqw";
   573          init.ops = &m41t80_sqw_ops;
   574          init.flags = 0;
   575          init.parent_names = NULL;
   576          init.num_parents = 0;
   577          m41t80->sqw.init = &init;
   578          m41t80->freq = m41t80_get_freq(m41t80);
   579  
   580          /* optional override of the clockname */
   581          of_property_read_string(node, "clock-output-names", &init.name);
   582  
   583          /* register the clock */
   584          clk = clk_register(&client->dev, &m41t80->sqw);
   585          if (!IS_ERR(clk))
   586                  of_clk_add_provider(node, of_clk_src_simple_get, clk);
   587  
   588          return clk;
   589  }
   590  #endif
   591  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups 
"rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rtc-linux/202105251305.chMVXmR2-lkp%40intel.com.

Attachment: .config.gz
Description: application/gzip

Reply via email to