Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	"Badal Nilawar" <badal.nilawar@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	linux-hwmon@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4] drm/i915/hwmon: Get rid of devm
Date: Wed, 17 Apr 2024 10:28:48 +0200	[thread overview]
Message-ID: <Zh-IQENH0hHokBbv@ashyti-mobl2.lan> (raw)
In-Reply-To: <20240417051642.788740-1-ashutosh.dixit@intel.com>

Hi Ashutosh,

> @@ -839,16 +837,38 @@ void i915_hwmon_register(struct drm_i915_private *i915)
>  		if (!hwm_gt_is_visible(ddat_gt, hwmon_energy, hwmon_energy_input, 0))
>  			continue;
>  
> -		hwmon_dev = devm_hwmon_device_register_with_info(dev, ddat_gt->name,
> -								 ddat_gt,
> -								 &hwm_gt_chip_info,
> -								 NULL);
> -		if (!IS_ERR(hwmon_dev))
> -			ddat_gt->hwmon_dev = hwmon_dev;
> +		hwmon_dev = hwmon_device_register_with_info(dev, ddat_gt->name,
> +							    ddat_gt,
> +							    &hwm_gt_chip_info,
> +							    NULL);
> +		if (IS_ERR(hwmon_dev))
> +			goto err;

here the logic is changing, though. Before we were not leaving if
hwmon_device_register_with_info() was returning error.

Is this wanted? And why isn't it described in the log?

Thanks,
Andi

> +
> +		ddat_gt->hwmon_dev = hwmon_dev;
>  	}

  parent reply	other threads:[~2024-04-17  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17  5:16 [PATCH v4] drm/i915/hwmon: Get rid of devm Ashutosh Dixit
2024-04-17  8:09 ` ✗ Fi.CI.BAT: failure for drm/i915/hwmon: Get rid of devm (rev5) Patchwork
2024-04-17  8:28 ` Andi Shyti [this message]
2024-04-17 15:01   ` [PATCH v4] drm/i915/hwmon: Get rid of devm Dixit, Ashutosh

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=Zh-IQENH0hHokBbv@ashyti-mobl2.lan \
    --to=andi.shyti@linux.intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /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