From: Raag Jadav <raag.jadav@intel.com>
To: "Usyskin, Alexander" <alexander.usyskin@intel.com>
Cc: "Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"De Marchi, Lucas" <lucas.demarchi@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Tvrtko Ursulin" <tursulin@ursulin.net>,
"Poosa, Karthik" <karthik.poosa@intel.com>,
"Abliyev, Reuven" <reuven.abliyev@intel.com>,
"Weil, Oren jer" <oren.jer.weil@intel.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Tomas Winkler" <tomasw@gmail.com>
Subject: Re: [PATCH v9 02/12] mtd: add driver for intel graphics non-volatile memory device
Date: Thu, 15 May 2025 15:13:33 +0300 [thread overview]
Message-ID: <aCXabQt_nhiTa1pF@black.fi.intel.com> (raw)
In-Reply-To: <CY5PR11MB636656BB76C04BD77F0ADB25ED90A@CY5PR11MB6366.namprd11.prod.outlook.com>
On Thu, May 15, 2025 at 03:41:08PM +0530, Usyskin, Alexander wrote:
> > On Thu, Apr 24, 2025 at 04:25:26PM +0300, Alexander Usyskin wrote:
> > > Add auxiliary driver for intel discrete graphics
> > > non-volatile memory device.
...
> > > + for (n = 0, i = 0; i < INTEL_DG_NVM_REGIONS; i++) {
> > > + if (!invm->regions[i].name)
> > > + continue;
> > > +
> > > + name = kasprintf(GFP_KERNEL, "%s.%s",
> > > + dev_name(&aux_dev->dev), invm-
> > >regions[i].name);
> > > + if (!name)
> > > + continue;
> > > + nvm->regions[n].name = name;
> > > + nvm->regions[n].id = i;
> > > + n++;
> > > + }
> > > + nvm->nregions = n; /* in case where kasprintf fail */
> >
> > Considering kasprintf failure, should we move forward if n == 0?
> Not sure if adding exit path here adds something positive to driver
> other than complexity.
With an error path already in place it shouldn't be too complex, but upto you.
...
> > > +static void intel_dg_mtd_remove(struct auxiliary_device *aux_dev)
> > > +{
> > > + struct intel_dg_nvm *nvm = dev_get_drvdata(&aux_dev->dev);
> > > +
> > > + if (!nvm)
> > > + return;
> >
> > Are we expecting this?
> >
> > > + dev_set_drvdata(&aux_dev->dev, NULL);
> >
> > Do we need this?
> Is there guaranty by auxiliary device that after release nothing is called?
Any reports/link to read about such issues? My understanding is that driver
->remove() callbacks are bus lock held and there won't be an active instance
to be called after unbind.
Raag
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2025-05-15 12:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 13:25 [PATCH v9 00/12] mtd: add driver for Intel discrete graphics Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 01/12] mtd: core: always create master device Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 02/12] mtd: add driver for intel graphics non-volatile memory device Alexander Usyskin
2025-04-29 9:31 ` Raag Jadav
2025-05-15 10:11 ` Usyskin, Alexander
2025-05-15 12:13 ` Raag Jadav [this message]
2025-04-24 13:25 ` [PATCH v9 03/12] mtd: intel-dg: implement region enumeration Alexander Usyskin
2025-04-29 9:44 ` Raag Jadav
2025-05-15 11:23 ` Usyskin, Alexander
2025-05-15 12:19 ` Raag Jadav
2025-05-15 13:07 ` Usyskin, Alexander
2025-04-24 13:25 ` [PATCH v9 04/12] mtd: intel-dg: implement access functions Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 05/12] mtd: intel-dg: register with mtd Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 06/12] mtd: intel-dg: align 64bit read and write Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 07/12] mtd: intel-dg: wake card on operations Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 08/12] drm/i915/nvm: add nvm device for discrete graphics Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 09/12] drm/i915/nvm: add support for access mode Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 10/12] drm/xe/nvm: add on-die non-volatile memory device Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 11/12] drm/xe/nvm: add support for access mode Alexander Usyskin
2025-04-24 13:25 ` [PATCH v9 12/12] drm/xe/nvm: add support for non-posted erase Alexander Usyskin
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=aCXabQt_nhiTa1pF@black.fi.intel.com \
--to=raag.jadav@intel.com \
--cc=airlied@gmail.com \
--cc=alexander.usyskin@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=karthik.poosa@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=miquel.raynal@bootlin.com \
--cc=mripard@kernel.org \
--cc=oren.jer.weil@intel.com \
--cc=reuven.abliyev@intel.com \
--cc=richard@nod.at \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tomasw@gmail.com \
--cc=tursulin@ursulin.net \
--cc=tzimmermann@suse.de \
--cc=vigneshr@ti.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