From: "Paul Louvel" <paul.louvel@bootlin.com>
To: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"Paul Louvel" <paul.louvel@bootlin.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Herve Codina" <herve.codina@bootlin.com>,
<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 29/29] crypto: talitos - Remove TALITOS_DESC_SIZE macro
Date: Thu, 04 Jun 2026 15:01:55 +0200 [thread overview]
Message-ID: <DJ0A9HT6DUNI.3ROQ6L8CR5ES8@bootlin.com> (raw)
In-Reply-To: <4202c304-4a4e-4b1a-8d40-d96a1ef143fb@kernel.org>
On Thu Jun 4, 2026 at 11:59 AM CEST, Christophe Leroy (CS GROUP) wrote:
>
>
> Le 28/05/2026 à 11:08, Paul Louvel a écrit :
>> Now that struct talitos_desc no longer has the SEC1-only next_desc field
>> (it was moved into sec1_talitos_desc), TALITOS_DESC_SIZE is identical to
>> sizeof(struct talitos_desc) and no longer serves any purpose. Remove it
>> and use sizeof directly at each macro invocation.
>
> It is still there ...
>
> $ git grep TALITOS_DESC_SIZE drivers
> drivers/crypto/talitos/talitos.h:#define TALITOS_DESC_SIZE
> sizeof(struct talitos_desc)
My bad. At least, it is no longer _used_ in the code..
Thanks.
>
>
>>
>> Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
>> ---
>> drivers/crypto/talitos/talitos-sec1.c | 10 +++++-----
>> drivers/crypto/talitos/talitos-sec2.c | 6 +++---
>> 2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/crypto/talitos/talitos-sec1.c b/drivers/crypto/talitos/talitos-sec1.c
>> index e4f482520372..504ce9e23e59 100644
>> --- a/drivers/crypto/talitos/talitos-sec1.c
>> +++ b/drivers/crypto/talitos/talitos-sec1.c
>> @@ -190,7 +190,7 @@ static void sec1_dma_map_request(struct device *dev,
>> while (edesc) {
>>
>> dma_desc = dma_map_single(dev, &edesc->desc.sec1.hdr,
>> - TALITOS_DESC_SIZE, DMA_BIDIRECTIONAL);
>> + sizeof(struct talitos_desc), DMA_BIDIRECTIONAL);
>>
>> if (!prev_edesc) {
>> request->dma_desc = dma_desc;
>> @@ -202,7 +202,7 @@ static void sec1_dma_map_request(struct device *dev,
>> prev_edesc->desc.sec1.next_desc = cpu_to_be32(dma_desc);
>>
>> dma_sync_single_for_device(dev, prev_dma_desc,
>> - TALITOS_DESC_SIZE, DMA_TO_DEVICE);
>> + sizeof(struct talitos_desc), DMA_TO_DEVICE);
>>
>> next:
>> prev_edesc = edesc;
>> @@ -216,12 +216,12 @@ static void sec1_dma_unmap_request(struct device *dev,
>> {
>> struct talitos_edesc *edesc;
>>
>> - dma_unmap_single(dev, request->dma_desc, TALITOS_DESC_SIZE,
>> + dma_unmap_single(dev, request->dma_desc, sizeof(struct talitos_desc),
>> DMA_BIDIRECTIONAL);
>> edesc = container_of(request->desc, struct talitos_edesc, desc);
>> while (edesc->next_desc) {
>> dma_unmap_single(dev, be32_to_cpu(edesc->desc.sec1.next_desc),
>> - TALITOS_DESC_SIZE, DMA_BIDIRECTIONAL);
>> + sizeof(struct talitos_desc), DMA_BIDIRECTIONAL);
>> edesc = edesc->next_desc;
>> }
>> }
>> @@ -239,7 +239,7 @@ static __be32 sec1_get_request_hdr(struct device *dev,
>> edesc = edesc->next_desc;
>> }
>>
>> - dma_sync_single_for_cpu(dev, dma_desc, TALITOS_DESC_SIZE,
>> + dma_sync_single_for_cpu(dev, dma_desc, sizeof(struct talitos_desc),
>> DMA_BIDIRECTIONAL);
>>
>> return edesc->desc.sec1.hdr;
>> diff --git a/drivers/crypto/talitos/talitos-sec2.c b/drivers/crypto/talitos/talitos-sec2.c
>> index 52f783ddc8b6..0df3b22510c7 100644
>> --- a/drivers/crypto/talitos/talitos-sec2.c
>> +++ b/drivers/crypto/talitos/talitos-sec2.c
>> @@ -205,7 +205,7 @@ static void sec2_dma_map_request(struct device *dev,
>> struct talitos_desc *desc)
>> {
>> request->dma_desc =
>> - dma_map_single(dev, desc, TALITOS_DESC_SIZE, DMA_BIDIRECTIONAL);
>> + dma_map_single(dev, desc, sizeof(struct talitos_desc), DMA_BIDIRECTIONAL);
>> }
>>
>> static int sec2_talitos_handle_error(struct device *dev, u32 isr, u32 isr_lo)
>> @@ -346,14 +346,14 @@ static void sec2_init_task(struct device *dev)
>> static void sec2_dma_unmap_request(struct device *dev,
>> struct talitos_request *request)
>> {
>> - dma_unmap_single(dev, request->dma_desc, TALITOS_DESC_SIZE,
>> + dma_unmap_single(dev, request->dma_desc, sizeof(struct talitos_desc),
>> DMA_BIDIRECTIONAL);
>> }
>>
>> static __be32 sec2_get_request_hdr(struct device *dev,
>> struct talitos_request *request)
>> {
>> - dma_sync_single_for_cpu(dev, request->dma_desc, TALITOS_DESC_SIZE,
>> + dma_sync_single_for_cpu(dev, request->dma_desc, sizeof(struct talitos_desc),
>> DMA_BIDIRECTIONAL);
>>
>> return request->desc->sec2.hdr;
>>
--
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-06-04 13:01 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 9:08 [PATCH 00/29] crypto: talitos - Driver cleanup Paul Louvel
2026-05-28 9:08 ` [PATCH 01/29] crypto: talitos/hash - Use CRYPTO_AHASH_BLOCK_ONLY API Paul Louvel
2026-05-29 11:25 ` Christophe Leroy (CS GROUP)
2026-06-01 5:40 ` Christophe Leroy (CS GROUP)
2026-06-01 8:06 ` Paul Louvel
2026-05-28 9:08 ` [PATCH 02/29] crypto: talitos - Move driver into dedicated directory Paul Louvel
2026-05-29 11:25 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 03/29] crypto: talitos - Add missing includes to driver header file Paul Louvel
2026-05-29 11:26 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 04/29] crypto: talitos/hwrng - Move into separate file Paul Louvel
2026-05-29 11:26 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 05/29] crypto: talitos - Prepare crypto implementation file splitting Paul Louvel
2026-05-29 13:21 ` Christophe Leroy (CS GROUP)
2026-05-29 16:24 ` David Laight
2026-06-01 8:49 ` Paul Louvel
2026-06-01 10:16 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 06/29] crypto: talitos - Introduce registration helper Paul Louvel
2026-06-01 5:45 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 07/29] crypto: talitos/hash - Move into separate file Paul Louvel
2026-06-01 11:47 ` Christophe Leroy (CS GROUP)
2026-06-04 12:31 ` Paul Louvel
2026-05-28 9:08 ` [PATCH 08/29] crypto: talitos/skcipher " Paul Louvel
2026-06-01 11:47 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 09/29] crypto: talitos/aead " Paul Louvel
2026-06-01 11:48 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 10/29] crypto: talitos - Remove alg settings in talitos_register_common() Paul Louvel
2026-06-01 11:53 ` Christophe Leroy (CS GROUP)
2026-06-04 12:38 ` Paul Louvel
2026-05-28 9:08 ` [PATCH 11/29] crypto: talitos - Remove unused priority field in struct talitos_alg_template Paul Louvel
2026-06-01 11:54 ` Christophe Leroy (CS GROUP)
2026-06-04 12:39 ` Paul Louvel
2026-05-28 9:08 ` [PATCH 12/29] crypto: talitos/hash - Convert to init_tfm/exit_tfm type-specific API Paul Louvel
2026-06-01 11:57 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 13/29] crypto: talitos/skcipher - Convert to init/exit " Paul Louvel
2026-06-01 11:58 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 14/29] crypto: talitos/aead " Paul Louvel
2026-06-01 11:59 ` Christophe Leroy (CS GROUP)
2026-06-04 12:44 ` Paul Louvel
2026-05-28 9:08 ` [PATCH 15/29] crypto: talitos/hash - Use macro for algorithm definitions Paul Louvel
2026-06-01 12:02 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 16/29] crypto: talitos/skcipher " Paul Louvel
2026-06-01 12:02 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 17/29] crypto: talitos/aead " Paul Louvel
2026-06-01 12:12 ` Christophe Leroy (CS GROUP)
2026-06-10 14:41 ` Paul Louvel
2026-05-28 9:08 ` [PATCH 18/29] crypto: talitos - Split SEC1/SEC2 code into separate function variants Paul Louvel
2026-06-01 5:51 ` Christophe Leroy (CS GROUP)
2026-06-01 12:32 ` Christophe Leroy (CS GROUP)
2026-06-04 12:46 ` Paul Louvel
2026-05-28 9:08 ` [PATCH 19/29] crypto: talitos - Introduce struct talitos_ops Paul Louvel
2026-05-28 9:08 ` [PATCH 20/29] crypto: talitos - Replace SEC1/SEC2 conditionals with ops dispatch Paul Louvel
2026-06-04 9:37 ` Christophe Leroy (CS GROUP)
2026-06-04 13:05 ` Paul Louvel
2026-06-04 15:26 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 21/29] crypto: talitos - Export common channel and error handling routines Paul Louvel
2026-05-28 9:08 ` [PATCH 22/29] crypto: talitos - Move SEC1 ops into talitos-sec1.c Paul Louvel
2026-05-28 9:08 ` [PATCH 23/29] crypto: talitos - Move SEC2 ops into talitos-sec2.c Paul Louvel
2026-05-28 9:08 ` [PATCH 24/29] crypto: talitos - Introduce per-SEC-version pointer helper ops Paul Louvel
2026-06-04 9:48 ` Christophe Leroy (CS GROUP)
2026-05-28 9:08 ` [PATCH 25/29] crypto: talitos - Dispatch pointer helpers through ptr_ops Paul Louvel
2026-05-28 9:08 ` [PATCH 26/29] crypto: talitos - Remove now-unused global pointer helpers Paul Louvel
2026-05-28 9:08 ` [PATCH 27/29] crypto: talitos - Introduce per-SEC-version descriptor structures and ops Paul Louvel
2026-06-04 9:57 ` Christophe Leroy (CS GROUP)
2026-06-04 13:01 ` Paul Louvel
2026-05-28 9:08 ` [PATCH 28/29] crypto: talitos - Clean up includes in core driver file Paul Louvel
2026-05-28 9:08 ` [PATCH 29/29] crypto: talitos - Remove TALITOS_DESC_SIZE macro Paul Louvel
2026-06-04 9:59 ` Christophe Leroy (CS GROUP)
2026-06-04 13:01 ` Paul Louvel [this message]
2026-06-01 6:15 ` [PATCH 00/29] crypto: talitos - Driver cleanup Christophe Leroy (CS GROUP)
2026-06-01 9:17 ` Paul Louvel
2026-06-01 10:27 ` Christophe Leroy (CS GROUP)
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=DJ0A9HT6DUNI.3ROQ6L8CR5ES8@bootlin.com \
--to=paul.louvel@bootlin.com \
--cc=chleroy@kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=herve.codina@bootlin.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.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
Powered by JetHome