Re: [PATCH v2 2/4] watchdog: i6300esb: support multiple devices

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

 



On Wed, 2017-10-25 at 13:55 -0700, Guenter Roeck wrote:
> On Wed, Oct 25, 2017 at 04:39:12PM +0100, Radu Rendec wrote:
> > -/* We can only use 1 card due to the /dev/watchdog restriction */
> > +/* Probed devices counter; used only for printing the initial info message */
> >  static int cards_found;
> 
> Now unnecessary.

[snip]

> >  static int esb_probe(struct pci_dev *pdev,
> >  		const struct pci_device_id *ent)
> >  {
> > +	struct esb_dev *edev;
> >  	int ret;
> >  
> >  	cards_found++;
> 
> Now unnecessary.

This variable is still used for printing the module "greeting" message
only when the first device is probed. The code snippet is below, but
unfortunately the diff context doesn't include the condition that tests
cards_found (the line was originally there, I didn't touch it).

> > @@ -309,26 +313,33 @@ static int esb_probe(struct pci_dev *pdev,
> >  		pr_info("Intel 6300ESB WatchDog Timer Driver v%s\n",
> >  			ESB_VERSION);
> >  

So we should either keep the variable or drop the "greeting" message
altogether. Perhaps it makes more sense if we use it as a bool (rather
than a counter)? Something like:

if (!cards_found) {
	pr_info(...);
	cards_found = 1;
}

I fixed the other issues and I will submit a new version of the patch
series as soon as I get your input on this one. 

Thanks,
Radu

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux