Re: [PATCH v1 2/2] rtc: maxim: Add Maxim max31329 real time clock.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

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  }




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux