From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 029A721ABAA for ; Mon, 17 Mar 2025 07:43:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742197401; cv=none; b=sK9dLn1BD66R8hA3FzUjLynYMuSjs2yEPAys71DKgX7A9WifjQSGVwgITaYgeaXrA+bNFzyzpeDrtgRwnJzA1988fmJsK3Yzz3ETWJuTTK8GUHshP6o5iIju3tVrBVBfeLmKN45vT+OOZtrb9/4R8GbA9dwkXiRKgEt50GjvIPc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742197401; c=relaxed/simple; bh=OMgTmDwJlDqvv+wZFAmKHQWJK9VTFYWv/a7aGQhFwGg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cwcv4TYJ5zI8exbCVZLAzobuLvG5l8Bo7AcXjJf9fABL8dMKy5IWoxPrkf77J6WQY5Q3M083Q7awxP/BkjbZ2TivACFz5Zeag7QwNJB1xrUNODqe0KXgo14ezJWH62LdCRltNzkTJ9aYKZKZFYRUqo5kwFk8l+uo9ViWlfAXx/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Cffr7e/P; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Cffr7e/P" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742197400; x=1773733400; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=OMgTmDwJlDqvv+wZFAmKHQWJK9VTFYWv/a7aGQhFwGg=; b=Cffr7e/PmRl8uTE5BoNiWI4OpkHh9KIsSB/UDu1VU4qoRC7jCpx9djEW BdLiuMoym7P8KtBSIzPzJTgUMIGO4/hBPsP7ucJgd4Dj0TqJNAoYW1JS4 XGMnUczZPrxHMGtEjws2UCWsEyQiJLdDGPZ1KHqI49w38+wky6mJujkYx 22WkddWGFwX5RsluUR9X4pCzYVoPCBBTXaNWbswTsh0QK4zPo3GaZwHTU j+6Uii8JUY2rv52N4lBOuVPJTPL0gMZQ4YghaZHjrjJhdPtKaIGyoQLo4 cJEifK/A2508fxwzLryoXQDEvQPU2gXUfU3yKE+XLym6riMkzuc6y+nyD Q==; X-CSE-ConnectionGUID: txeOVZ98Q0mzTcP759J3tA== X-CSE-MsgGUID: LDXzFBXmT5KFp8k9qFveKA== X-IronPort-AV: E=McAfee;i="6700,10204,11375"; a="54276516" X-IronPort-AV: E=Sophos;i="6.14,253,1736841600"; d="scan'208";a="54276516" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2025 00:43:20 -0700 X-CSE-ConnectionGUID: tc51x4d0SRiRVm0EHIUIQA== X-CSE-MsgGUID: EIZQCqXlQWeaxPOP0C21+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,253,1736841600"; d="scan'208";a="152787722" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2025 00:43:18 -0700 Date: Mon, 17 Mar 2025 09:43:15 +0200 From: Raag Jadav To: Greg KH 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() Message-ID: References: <20250315133140.1707949-1-raag.jadav@intel.com> <2025031718-ravage-oblong-05e1@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > > --- > > 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