mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: MD Danish Anwar <danishanwar@ti.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>, Andrew Lunn <andrew@lunn.ch>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	Diogo Ivo <diogo.ivo@siemens.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Simon Horman <horms@kernel.org>,
	Richard Cochran <richardcochran@gmail.com>,
	Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <srk@ti.com>,
	Roger Quadros <rogerq@kernel.org>
Subject: Re: [PATCH net-next 5/6] net: ti: icss-iep: Move icss_iep structure
Date: Mon, 12 Aug 2024 11:11:21 +0530	[thread overview]
Message-ID: <3397a020-195c-4ca3-a524-520171db794b@ti.com> (raw)
In-Reply-To: <6eb3c922-a8c6-4df4-a9ee-ba879e323385@stanley.mountain>

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.

>> +	u32 def_inc;
>> +	s16 slow_cmp_inc;
>> +	u32 slow_cmp_count;
> 
> regards,
> dan carpenter

-- 
Thanks and Regards,
Danish

  reply	other threads:[~2024-08-12  5:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 11:07 [PATCH net-next 0/6] Introduce HSR offload support for ICSSG MD Danish Anwar
2024-08-08 11:07 ` [PATCH net-next 1/6] net: ti: icssg-prueth: Enable IEP1 MD Danish Anwar
2024-08-08 11:07 ` [PATCH net-next 2/6] net: ti: icssg-prueth: Add support for HSR frame forward offload MD Danish Anwar
2024-08-08 11:07 ` [PATCH net-next 3/6] net: ti: icssg-prueth: Enable HSR Tx Packet duplication offload MD Danish Anwar
2024-08-08 11:07 ` [PATCH net-next 4/6] net: ti: icssg-prueth: Add multicast filtering support in HSR mode MD Danish Anwar
2024-08-08 11:07 ` [PATCH net-next 5/6] net: ti: icss-iep: Move icss_iep structure MD Danish Anwar
2024-08-09 20:10   ` Dan Carpenter
2024-08-12  5:41     ` MD Danish Anwar [this message]
2024-08-12  6:48       ` Dan Carpenter
2024-08-08 11:08 ` [PATCH net-next 6/6] net: ti: icssg-prueth: Enable HSR Tx Tag and Rx Tag offload MD Danish Anwar

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=3397a020-195c-4ca3-a524-520171db794b@ti.com \
    --to=danishanwar@ti.com \
    --cc=andrew@lunn.ch \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=diogo.ivo@siemens.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jan.kiszka@siemens.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=rogerq@kernel.org \
    --cc=srk@ti.com \
    --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

all inboxes | Powered by JetHome®