Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp124610lqa; Fri, 26 Apr 2024 17:15:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUdtB8LFJCGP71qcfj3CMiPnvo6deTZ8j+yIYp75p6SfiIXFGtykmJqYVf62W8An98zZZUhEFxgPh+1UhOlGBjeZI0TlyaBJmFwMon7og== X-Google-Smtp-Source: AGHT+IHMMJ3zmJUfjncSxNfunL7IV3wx76s+JXmwj0JsDYaCqaBVNPSXfr7zq8dLcvZPkzuVunkW X-Received: by 2002:a05:6300:640b:b0:1a7:7306:3677 with SMTP id jr11-20020a056300640b00b001a773063677mr931693pzc.25.1714176955121; Fri, 26 Apr 2024 17:15:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714176955; cv=pass; d=google.com; s=arc-20160816; b=YeBZntr4j/0SuUNtV41n66kGyAEmeOHx//sKXbs93Rfazk4KaMD1uLv/b5a3OcuczX /UkbqHtYueHqB+a6Ym6KdoVlYv9ZfKkHzeBovLBwuxUiuIvZTAE9IicGZh8oaGixs4AI fglkA2DqSZieDUkvY8UVh+x4eWhs/35229LFKZja92fYFcUsC4xbrFlQv93P9rdOHg5H iYrceLAJdhMRfRjjaXEUBE2iJESqRO1pnhLQ/2Q1E+fSRcjMNLaH9xrX9TrjIkb3W+3U /ijAf7RllvMU5jthN4l4okF8SmTFJm1Bot614ZAiok31Ay5+0hefwO48fYdzLO6lEm07 NTeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=G7Wu7HX45DmWrSGYlsp775A2vFtSzeLLbSxZad1dUpk=; fh=OslUMyzB9g/OJ2V+Xy2amHUr+JupSzfdpQUDA8AgZFw=; b=Sojjdk3mRFs6IKasrQJuFWSN9+m6Ettc17I11Hr9K3gYgBvLZkDerQuA9mMy9VB6A/ mPwVEc2wb9dH/7BsokC+3Te9p2jGhjr3OyhVoHEWiwPFxbfjnkRvJ0nnbP5MVIXEnTvW opkMJpkdpfM2VMdgcd2TkL45Ta91oVA4G0v19G6yZCLXtxFH5a84uXLXFONXv5sgW9R9 VF7x3wa5ADYWeWxKxQrQjHLlzbcGT+4QdxiC7CKlAkn38jr6owlNz8KIJTYN+qCv+lMG YK3VAg7CBOk6nPu0m19VwSujjVu6JJKq8CnYT+GL41aPyL/V+pnfuK3iW/cKTakPnu+M 4sSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ex0XjpGU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-160811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p21-20020a056a0026d500b006ecd3b2776asi15646914pfw.367.2024.04.26.17.15.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 17:15:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ex0XjpGU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-160811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C97A0B21AE2 for ; Sat, 27 Apr 2024 00:15:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8F1C25774; Sat, 27 Apr 2024 00:14:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ex0XjpGU" Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B3F68C11; Sat, 27 Apr 2024 00:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714176889; cv=none; b=Y5ezbEOm9OmWm951AculN7MSDRVJJoUUlGP+o8GdVp1QTlKX6otDTVhMq6oVkJ0pNqj43oBy9jZF9W4yb4W1Yq0pDZB3+nVGtONKvYaX8r68uDAI+o0Y+Vk2b0dHbAm7O267w3DKW7Ei4VTO8qTPhIqqEHwp408IN4eiNZkudAo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714176889; c=relaxed/simple; bh=7dkhjZYA2lOL4VQ95Odht1Oz9K64fNVSbaPiDgL9WZY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lExeN/vprzHNO9Jm+WF+JZI9buXNvAi+vFLk/IrXJCEQjj/SYA5nBogUz9hrRC+kbs0pzlEMIdVjGBE5Oa0nXeLD0waBXsQvQls8Y1fhsAU8pgzuLcV3z0exsdzX1Ak7ndbHfiMPnch+CNJKK+ppTj5G2aZuVT95H0Fj+G3yRFc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ex0XjpGU; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-343d2b20c4bso1934778f8f.2; Fri, 26 Apr 2024 17:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714176887; x=1714781687; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G7Wu7HX45DmWrSGYlsp775A2vFtSzeLLbSxZad1dUpk=; b=Ex0XjpGU4cO/RoUbDbUMsNUwbWu0sygqSmjAOn3jKQo1v8nCOR3Zj8EjRbM2Peq11E dal0HP8ryQ0i05lsA08ZS6o2+ZTW7k+k6lm5w7MzTg+lQAB7LfureuuS3mDV7yeXtC6m hwgmkPKWR5xha4hPJBx4ZTubbtW11PXddAtVgedbRkGgryTMNCx29WvFxFU75VtzwmXp 2lsxaZTMSChT6yNWHoDiU3U/RIyPOhcLx2YS1LyVZRQmLu3qako7WPYus41suRqknAVa uE/iJFuVaa1qNpPNAXflTgasVLe3/tkO63UZyx9bNd/lvxuErB0l1GKzIAeHBdDovWrn m5cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714176887; x=1714781687; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G7Wu7HX45DmWrSGYlsp775A2vFtSzeLLbSxZad1dUpk=; b=w9HIBMciDDSHSssgrn1UB1U7+ceATH6uJPo1xV08PdM4GHMscImOHkmLaEBEQXRcdG pd5IfUd9awmgM2bXqZ7W5dousDAobOvLkkl2UquqQp8ZaYuQQ14c9MHKAOPfAq/exy6+ krGN3bSoOxYIt7ig1zYCTojPonsopIfIgU/Z6OjaPalFinkd4VevzHQ7zC0G+NC/x3KX pTYB1+XH7gn2osm9iiQCaXqpuOW+kdbShPtDp2Z3nfej3/AJgthB+7k1CGcCj5KI+BnE fjMvhp4ECfdwXtHgigWGmMIQIswkefOMVkw+h2fh66C1uzFejRNhPBwzE1UWR1ppuamq x4Pg== X-Forwarded-Encrypted: i=1; AJvYcCW91SBtJJSpcDv+wCMrFiQgzgv5bX5hyB+fSeaP1MZ+pTJv/jndj+mGnWsCEtKRwF9ePG88QnhTdj42GG4Eoccm/CbArgyu9GldvOTdMdinkszoAMfZQ5lVQLOH7smtvQgHiD5upcfF6twX X-Gm-Message-State: AOJu0YzixTBBLFJp7g2XApuffkbkVsrguKSJRZf08h8yh7abF8Laf+qD atlXLS7BQij9X90Kxx7OHkyT0QnbiCDK9t8O2CzpL60NkD2lgXC6 X-Received: by 2002:a05:6000:18af:b0:349:f8a1:cd6a with SMTP id b15-20020a05600018af00b00349f8a1cd6amr3288311wri.16.1714176886534; Fri, 26 Apr 2024 17:14:46 -0700 (PDT) Received: from 2116bb4b8996.v.cablecom.net (84-72-156-211.dclient.hispeed.ch. [84.72.156.211]) by smtp.gmail.com with ESMTPSA id e7-20020a5d65c7000000b00349eb6eae3esm23748079wrw.4.2024.04.26.17.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 17:14:46 -0700 (PDT) From: Lothar Rubusch To: herbert@gondor.apana.org.au, davem@davemloft.net Cc: nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, l.rubusch@gmail.com Subject: [PATCH 3/5] crypto: atmel-i2c - rename read function Date: Sat, 27 Apr 2024 00:14:37 +0000 Message-Id: <20240427001439.12726-4-l.rubusch@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240427001439.12726-1-l.rubusch@gmail.com> References: <20240427001439.12726-1-l.rubusch@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Make the memory read function name more specific to the read memory zone. The Atmel SHA204 chips provide config, otp and data zone. The implemented read function in fact only reads some fields in zone config. The function renaming allows for a uniform naming scheme when reading from other memory zones. Signed-off-by: Lothar Rubusch --- drivers/crypto/atmel-i2c.c | 6 +++--- drivers/crypto/atmel-i2c.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/atmel-i2c.c b/drivers/crypto/atmel-i2c.c index 83a9093ef..a0d0d4f2a 100644 --- a/drivers/crypto/atmel-i2c.c +++ b/drivers/crypto/atmel-i2c.c @@ -51,7 +51,7 @@ static void atmel_i2c_checksum(struct atmel_i2c_cmd *cmd) *__crc16 = cpu_to_le16(bitrev16(crc16(0, data, len))); } -void atmel_i2c_init_read_cmd(struct atmel_i2c_cmd *cmd) +void atmel_i2c_init_read_config_cmd(struct atmel_i2c_cmd *cmd) { cmd->word_addr = COMMAND; cmd->opcode = OPCODE_READ; @@ -68,7 +68,7 @@ void atmel_i2c_init_read_cmd(struct atmel_i2c_cmd *cmd) cmd->msecs = MAX_EXEC_TIME_READ; cmd->rxsize = READ_RSP_SIZE; } -EXPORT_SYMBOL(atmel_i2c_init_read_cmd); +EXPORT_SYMBOL(atmel_i2c_init_read_config_cmd); void atmel_i2c_init_random_cmd(struct atmel_i2c_cmd *cmd) { @@ -301,7 +301,7 @@ static int device_sanity_check(struct i2c_client *client) if (!cmd) return -ENOMEM; - atmel_i2c_init_read_cmd(cmd); + atmel_i2c_init_read_config_cmd(cmd); ret = atmel_i2c_send_receive(client, cmd); if (ret) diff --git a/drivers/crypto/atmel-i2c.h b/drivers/crypto/atmel-i2c.h index a442b47a4..275297a82 100644 --- a/drivers/crypto/atmel-i2c.h +++ b/drivers/crypto/atmel-i2c.h @@ -178,7 +178,7 @@ void atmel_i2c_flush_queue(void); int atmel_i2c_send_receive(struct i2c_client *client, struct atmel_i2c_cmd *cmd); -void atmel_i2c_init_read_cmd(struct atmel_i2c_cmd *cmd); +void atmel_i2c_init_read_config_cmd(struct atmel_i2c_cmd *cmd); void atmel_i2c_init_random_cmd(struct atmel_i2c_cmd *cmd); void atmel_i2c_init_genkey_cmd(struct atmel_i2c_cmd *cmd, u16 keyid); int atmel_i2c_init_ecdh_cmd(struct atmel_i2c_cmd *cmd, -- 2.39.2