lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7a65afda-814b-4ff3-9f12-f07efc97b234@stanley.mountain>
Date: Mon, 12 Aug 2024 09:48:38 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: MD Danish Anwar <danishanwar@...com>
Cc: Jan Kiszka <jan.kiszka@...mens.com>, Andrew Lunn <andrew@...n.ch>,
	Vignesh Raghavendra <vigneshr@...com>,
	Javier Carrasco <javier.carrasco.cruz@...il.com>,
	Diogo Ivo <diogo.ivo@...mens.com>,
	Jacob Keller <jacob.e.keller@...el.com>,
	Simon Horman <horms@...nel.org>,
	Richard Cochran <richardcochran@...il.com>,
	Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, srk@...com,
	Roger Quadros <rogerq@...nel.org>
Subject: Re: [PATCH net-next 5/6] net: ti: icss-iep: Move icss_iep structure

On Mon, Aug 12, 2024 at 11:11:21AM +0530, MD Danish Anwar wrote:
> Hi Dan,
> 
> On 10/08/24 1:40 am, Dan Carpenter wrote:
> > On Thu, Aug 08, 2024 at 04:37:59PM +0530, MD Danish Anwar wrote:
> >> -	struct ptp_clock *ptp_clock;
> >> -	struct mutex ptp_clk_mutex;	/* PHC access serializer */
> >> -	u32 def_inc;
> >> -	s16 slow_cmp_inc;
> > 
> > [ cut ]
> > 
> >> +	struct ptp_clock *ptp_clock;
> >> +	struct mutex ptp_clk_mutex;	/* PHC access serializer */
> >> +	spinlock_t irq_lock; /* CMP IRQ vs icss_iep_ptp_enable access */
> >         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > 
> > The patch adds this new struct member.  When you're moving code around, please
> > just move the code.  Don't fix checkpatch warnings or do any other cleanups.
> > 
> 
> My bad. I didn't notice this new struct member was introduced. I will
> take care of it.
> 
> Also apart from doing the code movement, this patch also does the
> following change. Instead of hardcoding the value 4, the patch uses
> emac->iep->def_inc. Since the iep->def_inc is now accessible from
> drivers/net/ethernet/ti/icssg/icssg_prueth.c
> 
> @@ -384,7 +384,8 @@ static void prueth_iep_settime(void *clockops_data,
> u64 ns)
>  	sc_desc.cyclecounter0_set = cyclecount & GENMASK(31, 0);
>  	sc_desc.cyclecounter1_set = (cyclecount & GENMASK(63, 32)) >> 32;
>  	sc_desc.iepcount_set = ns % cycletime;
> -	sc_desc.CMP0_current = cycletime - 4; //Count from 0 to (cycle time)-4
> +	/* Count from 0 to (cycle time) - emac->iep->def_inc */
> +	sc_desc.CMP0_current = cycletime - emac->iep->def_inc;
> 
>  	memcpy_toio(sc_descp, &sc_desc, sizeof(sc_desc));
> 
> 
> Should I keep the above change as it is or should I split it into a
> separate patch and make this patch strictly for code movement. I kept
> the above change as part of this patch because it is related with the
> code movement. Moving the iep structure from icss_iep.c to icss_iep.h
> makes it accessible to icssg_prueth.c so I thought keeping them together
> will be a better idea.
> 
> Please let me know if this is okay.
> 

Huh, I saw that the comment had changed but I assumed that was because
checkpatch had complained.  I didn't notice that the 4 changed to
emac->iep->def_inc.  That's the kind of change that we do really want to notice.

Yep.  Please, could you split that out into a separate patch.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ