lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 13 Sep 2022 12:09:55 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Jagath Jog J <jagathjog1996@...il.com>,
        alexandre.belloni@...tlin.com, a.zummo@...ertech.it,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org
Cc:     lkp@...el.com, kbuild-all@...ts.01.org, linux-rtc@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        jagathjog1996@...il.com
Subject: Re: [PATCH v1 2/2] rtc: maxim: Add Maxim max31329 real time clock.

Hi Jagath,

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jagath-Jog-J/rtc-add-Maxim-max31329-real-time-clock/20220904-124909
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: m68k-randconfig-m031-20220909
compiler: m68k-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>

smatch warnings:
drivers/rtc/rtc-max31329.c:276 max31329_irq_handler() error: uninitialized symbol 'events'.

vim +/events +276 drivers/rtc/rtc-max31329.c

f26f983311b011 Jagath Jog J 2022-09-04  250  static irqreturn_t max31329_irq_handler(int irq, void *dev_id)
f26f983311b011 Jagath Jog J 2022-09-04  251  {
f26f983311b011 Jagath Jog J 2022-09-04  252  	struct device *dev = dev_id;
f26f983311b011 Jagath Jog J 2022-09-04  253  	struct max31329_data *max31329 = dev_get_drvdata(dev);
f26f983311b011 Jagath Jog J 2022-09-04  254  	unsigned int flags, controls;
f26f983311b011 Jagath Jog J 2022-09-04  255  	unsigned long events;

Needs to be initialized to zero.

f26f983311b011 Jagath Jog J 2022-09-04  256  	int ret;
f26f983311b011 Jagath Jog J 2022-09-04  257  
f26f983311b011 Jagath Jog J 2022-09-04  258  	ret = regmap_read(max31329->regmap, MAX31329_INT_EN_REG, &controls);
f26f983311b011 Jagath Jog J 2022-09-04  259  	if (ret) {
f26f983311b011 Jagath Jog J 2022-09-04  260  		dev_warn(dev, "Read IRQ control register error %d\n", ret);
f26f983311b011 Jagath Jog J 2022-09-04  261  		return IRQ_NONE;
f26f983311b011 Jagath Jog J 2022-09-04  262  	}
f26f983311b011 Jagath Jog J 2022-09-04  263  
f26f983311b011 Jagath Jog J 2022-09-04  264  	ret = regmap_read(max31329->regmap, MAX31329_STATUS_REG, &flags);
f26f983311b011 Jagath Jog J 2022-09-04  265  	if (ret) {
f26f983311b011 Jagath Jog J 2022-09-04  266  		dev_warn(dev, "Read IRQ flags register error %d\n", ret);
f26f983311b011 Jagath Jog J 2022-09-04  267  		return IRQ_NONE;
f26f983311b011 Jagath Jog J 2022-09-04  268  	}
f26f983311b011 Jagath Jog J 2022-09-04  269  
f26f983311b011 Jagath Jog J 2022-09-04  270  	if (flags & MAX31329_STATUS_A1F) {
f26f983311b011 Jagath Jog J 2022-09-04  271  		flags &= ~MAX31329_STATUS_A1F;
f26f983311b011 Jagath Jog J 2022-09-04  272  		controls &= ~MAX31329_INT_EN_A1IE;
f26f983311b011 Jagath Jog J 2022-09-04  273  		events = RTC_AF | RTC_IRQF;
f26f983311b011 Jagath Jog J 2022-09-04  274  	}
f26f983311b011 Jagath Jog J 2022-09-04  275  
f26f983311b011 Jagath Jog J 2022-09-04 @276  	if (events) {
f26f983311b011 Jagath Jog J 2022-09-04  277  		rtc_update_irq(max31329->rtc, 1, events);
f26f983311b011 Jagath Jog J 2022-09-04  278  		regmap_write(max31329->regmap, MAX31329_STATUS_REG, flags);
f26f983311b011 Jagath Jog J 2022-09-04  279  		regmap_write(max31329->regmap, MAX31329_INT_EN_REG, controls);
f26f983311b011 Jagath Jog J 2022-09-04  280  		return IRQ_HANDLED;
f26f983311b011 Jagath Jog J 2022-09-04  281  	}
f26f983311b011 Jagath Jog J 2022-09-04  282  
f26f983311b011 Jagath Jog J 2022-09-04  283  	return IRQ_NONE;
f26f983311b011 Jagath Jog J 2022-09-04  284  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ