All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: giometti@enneenne.com, andriy.shevchenko@linux.intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] pps: generators: tio: fix platform_set_drvdata()
Date: Mon, 17 Mar 2025 09:43:15 +0200	[thread overview]
Message-ID: <Z9fSkxv_-mJnnXo4@black.fi.intel.com> (raw)
In-Reply-To: <2025031718-ravage-oblong-05e1@gregkh>

On Mon, Mar 17, 2025 at 08:32:29AM +0100, Greg KH wrote:
> On Sat, Mar 15, 2025 at 07:01:40PM +0530, Raag Jadav wrote:
> > Set driver_data correctly and fix illegal memory access on driver reload.
> > 
> > Fixes: c89755d1111f ("pps: generators: Add PPS Generator TIO Driver")
> > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> > ---
> >  drivers/pps/generators/pps_gen_tio.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pps/generators/pps_gen_tio.c b/drivers/pps/generators/pps_gen_tio.c
> > index 6c46b46c66cd..6e4a383957d9 100644
> > --- a/drivers/pps/generators/pps_gen_tio.c
> > +++ b/drivers/pps/generators/pps_gen_tio.c
> > @@ -230,7 +230,7 @@ static int pps_gen_tio_probe(struct platform_device *pdev)
> >  	hrtimer_init(&tio->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
> >  	tio->timer.function = hrtimer_callback;
> >  	spin_lock_init(&tio->lock);
> > -	platform_set_drvdata(pdev, &tio);
> > +	platform_set_drvdata(pdev, tio);
> 
> What does reload have to do with this?  Either the data pointer is set
> to the expected type or not, so that it can work properly, which has
> nothing to do with when the device is unbound and then rebound (which is
> what I think you mean by reload?)

->remove() is the only user of driver_data here.

> So I think your changelog needs a lot of work here, as it's not really
> explaining what is happening properly.

Sure, will update.

Raag

      reply	other threads:[~2025-03-17  7:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-15 13:31 [PATCH v1] pps: generators: tio: fix platform_set_drvdata() Raag Jadav
2025-03-16 15:24 ` Rodolfo Giometti
2025-03-17  7:26 ` Andy Shevchenko
2025-03-17  7:40   ` Raag Jadav
2025-03-17  7:47     ` Andy Shevchenko
2025-03-17  7:32 ` Greg KH
2025-03-17  7:43   ` Raag Jadav [this message]

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=Z9fSkxv_-mJnnXo4@black.fi.intel.com \
    --to=raag.jadav@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=giometti@enneenne.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@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 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.