All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Radu Rendec <rrendec@arista.com>
Cc: Wim Van Sebroeck <wim@iguana.be>, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH v2 2/4] watchdog: i6300esb: support multiple devices
Date: Thu, 26 Oct 2017 06:51:07 -0700	[thread overview]
Message-ID: <2edc54c2-f3d9-6b54-7ff9-79365b03946c@roeck-us.net> (raw)
In-Reply-To: <1509017701.29929.10.camel@arista.com>

On 10/26/2017 04:35 AM, Radu Rendec wrote:
> 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;
> }
> 

Just drop that pr_info. There is an info message at the end of the probe
function which is sufficient. Make that dev_info if you didn't already,
and it will report additional instance data automatically.

> 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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2017-10-26 13:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16 18:25 [PATCH 1/3] watchdog: i6300esb: use the watchdog subsystem Radu Rendec
2017-10-16 18:25 ` [PATCH 2/3] watchdog: i6300esb: support multiple devices Radu Rendec
2017-10-22 17:05   ` [2/3] " Guenter Roeck
2017-10-16 18:25 ` [PATCH 3/3] watchdog: i6300esb: do not hardcode heartbeat limits Radu Rendec
2017-10-22 17:09   ` [3/3] " Guenter Roeck
2017-10-25 15:39     ` [PATCH v2 1/4] watchdog: i6300esb: use the watchdog subsystem Radu Rendec
2017-10-25 20:51       ` Guenter Roeck
2017-10-25 15:39     ` [PATCH v2 2/4] watchdog: i6300esb: support multiple devices Radu Rendec
2017-10-25 20:55       ` Guenter Roeck
2017-10-26 11:35         ` Radu Rendec
2017-10-26 13:51           ` Guenter Roeck [this message]
2017-10-26 16:10             ` [PATCH v3 1/4] watchdog: i6300esb: use the watchdog subsystem Radu Rendec
2017-10-27  1:03               ` Guenter Roeck
2017-10-26 16:10             ` [PATCH v3 2/4] watchdog: i6300esb: support multiple devices Radu Rendec
2017-10-27  1:02               ` Guenter Roeck
2017-10-27  1:04               ` Guenter Roeck
2017-10-26 16:10             ` [PATCH v3 3/4] watchdog: i6300esb: do not hardcode heartbeat limits Radu Rendec
2017-10-27  1:04               ` Guenter Roeck
2017-10-26 16:10             ` [PATCH v3 4/4] watchdog: i6300esb: remove info message and version number Radu Rendec
2017-10-27  1:05               ` Guenter Roeck
2017-10-27 10:58                 ` Radu Rendec
2017-10-25 15:39     ` [PATCH v2 3/4] watchdog: i6300esb: do not hardcode heartbeat limits Radu Rendec
2017-10-25 20:56       ` Guenter Roeck
2017-10-25 15:39     ` [PATCH v2 4/4] watchdog: i6300esb: bump version to 0.6 Radu Rendec
2017-10-25 20:57       ` Guenter Roeck
2017-10-22 17:02 ` [1/3] watchdog: i6300esb: use the watchdog subsystem Guenter Roeck

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=2edc54c2-f3d9-6b54-7ff9-79365b03946c@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=rrendec@arista.com \
    --cc=wim@iguana.be \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.