From nobody Mon Feb 9 05:38:30 2026 Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (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 0A85632AAA9 for ; Mon, 22 Dec 2025 10:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766400199; cv=none; b=fH1OUQ+Ym8onv42pYIZxHVWrks2onEScvBtnkLquEzaAs+qdRzNx4jW8G4UEcwiyYYjjbdYVX4r6kPCFaY88sMvWyl5zzBO3DieCBKO28z/Jn3VIngnuNizlxOQuGnZwG/P59huz/s58FpD5SooBRJ14t9eapmSHFT3fg74BMHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766400199; c=relaxed/simple; bh=QGapEZB5vdOb5boVRSwmtgCOFRIoGWnnDtouxyN+ABc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=g9mKidtU921gtMvQ9s6+mm1zOmOF+BiMdVsOh5DvCYlP3m5ttd6HrLVCD0Lo1OXsvCMXexae3uhVthF/uHKbQE8IXDQSpszMdJwNog/KHnOKtWZ1HK2gLiYvkrtoQ7fSfeUUmjuAapu3fsch6/yUhGoO9rDyNKAV1N3hXmleJu8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Xzpj+uem; arc=none smtp.client-ip=91.218.175.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Xzpj+uem" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1766400180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=KZiktEpjalRenDqTShts3L2gcVnxLW3nx9pxv/1q/Fo=; b=Xzpj+uemqrOoSzBYiqXVrDvDBpICGb9StC4f4TD3dh0Ss5u5MivJIhrCPjI5WkgL6IG0cw jVJq5nrHY1RwQ8NFe2Q/+QkmZPHrNz4zWn08yoxiWre2pSfafjxubxtVqdb5rHyivnrVXW UksoSOJPUduV1wjiA14qdDUVtJ7kHtA= From: Thorsten Blum To: Herbert Xu , "David S. Miller" Cc: Thorsten Blum , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: simd - Simplify request size calculation in simd_aead_init Date: Mon, 22 Dec 2025 11:42:53 +0100 Message-ID: <20251222104254.635373-1-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Fold both assignments into a single max() call to simplify the code. Signed-off-by: Thorsten Blum --- crypto/simd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/simd.c b/crypto/simd.c index b07721d1f3f6..2a7549e280ca 100644 --- a/crypto/simd.c +++ b/crypto/simd.c @@ -352,8 +352,8 @@ static int simd_aead_init(struct crypto_aead *tfm) =20 ctx->cryptd_tfm =3D cryptd_tfm; =20 - reqsize =3D crypto_aead_reqsize(cryptd_aead_child(cryptd_tfm)); - reqsize =3D max(reqsize, crypto_aead_reqsize(&cryptd_tfm->base)); + reqsize =3D max(crypto_aead_reqsize(cryptd_aead_child(cryptd_tfm)), + crypto_aead_reqsize(&cryptd_tfm->base)); reqsize +=3D sizeof(struct aead_request); =20 crypto_aead_set_reqsize(tfm, reqsize); --=20 Thorsten Blum GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4