netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org, linux-net-drivers@solarflare.com,
	lm-sensors@lm-sensors.org
Subject: Re: [PATCH] sfc: Convert to use hwmon_device_register_with_groups
Date: Wed, 27 Nov 2013 18:51:33 -0800	[thread overview]
Message-ID: <5296AFB5.6080104@roeck-us.net> (raw)
In-Reply-To: <1385604693.1586.76.camel@bwh-desktop.uk.level5networks.com>

On 11/27/2013 06:11 PM, Ben Hutchings wrote:
> On Tue, 2013-11-26 at 19:33 -0800, Guenter Roeck wrote:
>> Simplify the code. Avoid race conditions caused by attributes
>> being created after hwmon device registration. Implicitly
>> (through hwmon API) add mandatory 'name' sysfs attribute.
>>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>> Compile tested only.
> [...]
>
> Very close, but you missed this bit:
>
> --- a/drivers/net/ethernet/sfc/mcdi_mon.c
> +++ b/drivers/net/ethernet/sfc/mcdi_mon.c
> @@ -142,7 +142,7 @@ static int efx_mcdi_mon_update(struct efx_nic *efx)
>   static int efx_mcdi_mon_get_entry(struct device *dev, unsigned int index,
>   				  efx_dword_t *entry)
>   {
> -	struct efx_nic *efx = dev_get_drvdata(dev);
> +	struct efx_nic *efx = dev_get_drvdata(dev->parent);
>   	struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx);
>   	int rc;
>
> ---
>
> With that addition, it works for me, and you can add my Reviewed-by.
>

Thanks a lot!

Guenter

  reply	other threads:[~2013-11-28  2:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27  3:33 [PATCH] sfc: Convert to use hwmon_device_register_with_groups Guenter Roeck
2013-11-28  2:11 ` Ben Hutchings
2013-11-28  2:51   ` Guenter Roeck [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-11-27  3:30 Guenter Roeck
2013-11-27  3:34 ` 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=5296AFB5.6080104@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=bhutchings@solarflare.com \
    --cc=linux-net-drivers@solarflare.com \
    --cc=lm-sensors@lm-sensors.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).