From patchwork Thu Oct 10 19:45:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 834284 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (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 4C96B1CF5C3; Thu, 10 Oct 2024 19:45:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728589524; cv=none; b=Te5l2AZemWsF4ZXs+JD2hqQ7o7x0vzwYw2qaBD2GU9eOgrlRwj+b7sAUU7TSqtcpKut152S03kUP71zA4o+1Rzb74Fg61SB9hKnRMCysrjW0MJpfGZ+gxz2Rou+a8hNXug8NgP58M+yXTyPZyUTFEVR0TY7oWgz1kvDowCeGabo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728589524; c=relaxed/simple; bh=8tEpKzuJJod0wz3ZcPjN+AayChvMMlQKA3FkFqFp7Jc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W0W8JNvNv++VjHo7jJFTG/gmJrvxqBBixVxV4nidgzCkheH6Y9nzlBfsqbzeztM8ZfIf9/In7Dld5ZgtagieRFbZTAlHBTHvWBaeRW2DCUdoiG4bfLDVVTNpYneDZUqXxzmNwxmUMzJUaR/Ztt/zF87E4CVvQnUEMJ/hY5K4Drw= 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=MzRc4Jgi; arc=none smtp.client-ip=209.85.215.173 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MzRc4Jgi" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7e6ed072cdaso950824a12.0; Thu, 10 Oct 2024 12:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728589522; x=1729194322; 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=q/vVq5169u7i4biYWRH+U02krdapDJFUv5/71gKhc60=; b=MzRc4Jgifk3kUgx6mtSHn7J7IQJtZ/wD7VEDSCFG5zj8/2tyOV2qGUOFPGHH+jTWfl g67o7UXCnDPpDobKKgy5CEkWuWDrUcQ+4pHH2g8fM5RNyOrQjPodPfwpzeAzA5d/OjtL Am3czQuFiMNM1FvLM0SdTrYFNtou427MQfJzoHbPPkHq2K0gi/i+Z0oCVifXLgtfW2Jx kFNRwc/Nw7mg40UWb2fet5db7PS5FcW/WqdnnwOfstj7wvlHItoo7y4OB9swXi46JFb3 nVftVm6UzKBHyoDS4lLHMOLDJ7jzmDlOD8PKf5lyBz4e3UgQ5adtbR0f7D7kKRIJZTIR PWjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728589522; x=1729194322; 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=q/vVq5169u7i4biYWRH+U02krdapDJFUv5/71gKhc60=; b=Fuw08d0xSWDsWuyI8/wtGUmS2niImBGVdO7XVy0UHqkl9AtaRoiZauBIJESk1V2Hij Sc53kJDLhyvCw+4hJrPckU+eBuBdnYzLnIKLTZButASW9bBhzmZwWPp3J5XoASKZNj1j lQJ0mFlW8Le2MjAutMEei4XNfcAoP4jnODORVOKtq3xNQX1ozrPvhho2NkWY0Q5oEQlJ stbIpMwa+dC637jb50DT1hUB2gNAf0xUqIOJoGp+y1tWl62hN0vFDRG6Cgu9UQPnm9BF 2VjKZe80XqTENgstFFDYiekxKMeis2B/2Sz42CEHM64kiBpXMQahqZuhXFKd7lst0br8 vyew== X-Forwarded-Encrypted: i=1; AJvYcCUOybhJHd4GewSa3ddG1aZsmyA0UGBI/kefQpgiYBIAu1RbTEWEB25Schm+45M4bvqMxI6csGrXZ0DlKss=@vger.kernel.org X-Gm-Message-State: AOJu0YwwIyuDbvE+1tkqk38GPvFAxqSSzL87lhJDsAAXieH/ZJ0yLTGt 9qlxvtitOW672/rpSphwf/KjIIBquFr8fvu5AjjHHm2c7nFQ81/DeCETN/v+ X-Google-Smtp-Source: AGHT+IFkP32W5FTePBxbjmQ6asSjg+DfGIyQ+ZyXqTnfkEwDw0+8Ev+wAy1piA16dz4RUdZcSOnBNw== X-Received: by 2002:a05:6a21:1190:b0:1d8:a18e:177d with SMTP id adf61e73a8af0-1d8bceef578mr176044637.4.1728589520893; Thu, 10 Oct 2024 12:45:20 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ea448fe50csm1374762a12.29.2024.10.10.12.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 12:45:20 -0700 (PDT) From: Rosen Penev To: linux-crypto@vger.kernel.org Cc: Boris Brezillon , Arnaud Ebalard , Srujana Challa , Herbert Xu , "David S. Miller" , Rosen Penev , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv2 1/5] crypto: cesa: add COMPILE_TEST Date: Thu, 10 Oct 2024 12:45:13 -0700 Message-ID: <20241010194517.18635-2-rosenp@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241010194517.18635-1-rosenp@gmail.com> References: <20241010194517.18635-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This can build on x86. Allows more CI coverage. Signed-off-by: Rosen Penev --- drivers/crypto/marvell/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/marvell/Kconfig b/drivers/crypto/marvell/Kconfig index 78217577aa54..4c25a78ab3ed 100644 --- a/drivers/crypto/marvell/Kconfig +++ b/drivers/crypto/marvell/Kconfig @@ -7,7 +7,7 @@ config CRYPTO_DEV_MARVELL config CRYPTO_DEV_MARVELL_CESA tristate "Marvell's Cryptographic Engine driver" - depends on PLAT_ORION || ARCH_MVEBU + depends on PLAT_ORION || ARCH_MVEBU || COMPILE_TEST select CRYPTO_LIB_AES select CRYPTO_LIB_DES select CRYPTO_SKCIPHER From patchwork Thu Oct 10 19:45:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 834283 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (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 B3FBB1E47CE; Thu, 10 Oct 2024 19:45:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728589526; cv=none; b=d46FhFviASvdST5kdgt6UUwJM07ZZRGQPhBkmBOho3RUghUyFhtsgnacgmViszz6qL0K5U9KiG5tmghCSZmXSg2jtlizxdHuQhbqQ/xCnxvY7D11BU2SMsq8JpFxuG3Fw/I+D7GW/x0xfE68rVJ1VrM9GPwt59yMFHnPPfsTnUk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728589526; c=relaxed/simple; bh=v2wQYF9MfkRR/XoJQpT+R25t14mcfTyXt6lelenjPVE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EmjAhOmalVtNV4bnmtHZB7X8mTya3s2Y9YN/vS71L65Dycln2r1BD0Xv7VC/Lbno2P77aH9cJzXJ5WRKCv7isbSAHJyoAfht5sXa1Mh5MkPsA67MeGPbryXQnphz08msnjNqzY7Qs4g/m4xoO3eri7Y6wykA8GceIC1/q6vQFcE= 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=kNNSo06h; arc=none smtp.client-ip=209.85.215.173 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kNNSo06h" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7db54269325so1091762a12.2; Thu, 10 Oct 2024 12:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728589524; x=1729194324; 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=AHFPYc/2pWWDgXQYD+cnOLFqpwx1O8WplMBHy/xRbmY=; b=kNNSo06hc+iBmJARFm3ZiDNJRJHxxxYdwHRMqVSfNVFq+wQgaGptLeQL8EsCrhEE7i Hz07NdOWnZRe5FhqQOJWOQ3ZjUbGmqnS+VCOgsX6NZJlZRTGr7DdXSn483CONvlszz6S UIesIIMGkIRRGqar/LIpMbUO3LzJYxYW+1JwMTKeiZazoU3kxxzOgpxZZ/+qWos/akf0 bIjd2jS+31Jm+tFKzgyEGB3m54JfYoJPdy6aFdkSDSi/IggZLkiNmyWXgCu16x6W3d2D xaAsuFuhkHeT/iwri/cC7nFOxUxa7VZUAGVBJacgh0uyqu68PhVEoGPxHKLnl9P/+a6v 1JxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728589524; x=1729194324; 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=AHFPYc/2pWWDgXQYD+cnOLFqpwx1O8WplMBHy/xRbmY=; b=lAp9DdRDBK1Atepb5L7NQoQ9ayuQDAzZySIYJ3m5/2ZWYlPr+1zbEdE5iN6PiFxmss e9xo+xP24OFg7q9IDvoOuDSDzcftoRhrTyJFBtW58xGI1fuh+7hVNwYUw/SeTFZMayAn 1cIQhk5Jtx+ZmuIHznuro+K/0tkDqTZob1K7kp/jDxYoom0ya5w37D/uc+qNP6mb1Bq8 sMbIC4SG1PTpxIHHuUHh9sXj3kjLz+9gGQQ+0BFeFBIzJYJTpN8s54vD7007PAsQLnz6 wT9MQrYy3BgxG9IGghsMG75nCDfs9ttwIx08LP5ai9CWV0M09J+eC10S3fos6J/jX6Qp yLhQ== X-Forwarded-Encrypted: i=1; AJvYcCUw/yj47f8cmBSCe6X/xJaXdERWAwJaOVwZzfwVY+d52cLJqyW+hGuNXoNBuHZcM5dNBRCZWckfpbttoOY=@vger.kernel.org X-Gm-Message-State: AOJu0Yw0YSU4NMQFoIwKN+UgCS88iCqp/AxkfoxENG/1Flv4vrIIIMfM xCZEzuEBs9aPu71c671tT5Gd3s2WzRJV8EzQnjK108UZXWLyQX+RnOkLqwOL X-Google-Smtp-Source: AGHT+IEHDCRqtAVf5XduzxtBkZ47GOrAxKwWorGFM60H6Hy1D/4x5ZJC28d+E2rsGb3XRmGjIHLRrQ== X-Received: by 2002:a05:6a21:393:b0:1d3:45c1:ad1a with SMTP id adf61e73a8af0-1d8bcfada46mr149320637.39.1728589523594; Thu, 10 Oct 2024 12:45:23 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ea448fe50csm1374762a12.29.2024.10.10.12.45.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 12:45:23 -0700 (PDT) From: Rosen Penev To: linux-crypto@vger.kernel.org Cc: Boris Brezillon , Arnaud Ebalard , Srujana Challa , Herbert Xu , "David S. Miller" , Rosen Penev , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv2 3/5] crypto: cesa: remove irq_set_affinity_hint Date: Thu, 10 Oct 2024 12:45:15 -0700 Message-ID: <20241010194517.18635-4-rosenp@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241010194517.18635-1-rosenp@gmail.com> References: <20241010194517.18635-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This is unnecessary as the irqs are devm managed. Signed-off-by: Rosen Penev --- drivers/crypto/marvell/cesa/cesa.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/marvell/cesa/cesa.c b/drivers/crypto/marvell/cesa/cesa.c index 74a1d1ad67d3..21e13f4a1f48 100644 --- a/drivers/crypto/marvell/cesa/cesa.c +++ b/drivers/crypto/marvell/cesa/cesa.c @@ -566,11 +566,8 @@ static int mv_cesa_probe(struct platform_device *pdev) return 0; err_cleanup: - for (i = 0; i < caps->nengines; i++) { + for (i = 0; i < caps->nengines; i++) mv_cesa_put_sram(pdev, i); - if (cesa->engines[i].irq > 0) - irq_set_affinity_hint(cesa->engines[i].irq, NULL); - } return ret; } @@ -582,10 +579,8 @@ static void mv_cesa_remove(struct platform_device *pdev) mv_cesa_remove_algs(cesa); - for (i = 0; i < cesa->caps->nengines; i++) { + for (i = 0; i < cesa->caps->nengines; i++) mv_cesa_put_sram(pdev, i); - irq_set_affinity_hint(cesa->engines[i].irq, NULL); - } } static const struct platform_device_id mv_cesa_plat_id_table[] = { From patchwork Thu Oct 10 19:45:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 834282 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 3B5131E572D; Thu, 10 Oct 2024 19:45:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728589529; cv=none; b=rLts7WgEuyQc6olFSyPptuzQPFIbtD64zgQZc+I7x/t2A9l6VhsLfLTrlPaAclCfdNs1NaKT8J8uxaeDHnwv0ajeoGsf9GXlK8PqF8A17TjQYd4OULTKc2wT183RAmgLIsj1wyPvqnxsm4uJ+qlcneDbLKBfXDFh+eOgGyLjpvI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728589529; c=relaxed/simple; bh=Z/AKn3jdK5QJr21NEh6M/axjNX6uEKUZyzNVe8ZBoCA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XDEIYNOdmH5Ut7hBiFwVpOGY2bwI1ApiRGTJrAfZIdIbsmwZIV/h7g3RVBFplDJJvCk4XmnR/d6ggkFPNPqbWTDhFGKA7CSXMD/+zf1rPUgWJhg2zaiR7WhWMMg5dtwpKfkklyCg82zGPjJ1SDR+DkRTr3HTMC8GGtvhbr1Dcek= 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=OzD9dJEq; arc=none smtp.client-ip=209.85.210.179 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OzD9dJEq" Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-71e038f3835so1274507b3a.0; Thu, 10 Oct 2024 12:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728589526; x=1729194326; 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=+3EI4XTDmYBqzGsZ4sox7/pa5h3v/nZZ5pZc9pzFM5I=; b=OzD9dJEqCKwLN184uh9UGd+Ratf/TbPdmh4oo2vButKohat7orITGKpyvDzCquzh4q FsRRAFrPB3n9yyMosz1BQW8I0H7Bqt1VsNkMuzvWp0DipcMd7cEUj07zHKwtLnL94kS+ W2ijaVRlMdvFqbCe/8O/DBhFe9Lkym4NNPnIH+tc4iZZfWTsTSxCcbd1QSGiCOKsWstt Rkq10uqaUxFgk6byR+iNBXU9iEelfMpHo6H4Jvglu+6QQ/TZt3APe4cMYc86NYUvQSIV tDrh/gz3IV8meGca4Uipx4eqUZGnp1+WP00DNCOGhq8qgyi1kT/O9hzn+c8mQaIJ+Sy2 f4Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728589526; x=1729194326; 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=+3EI4XTDmYBqzGsZ4sox7/pa5h3v/nZZ5pZc9pzFM5I=; b=G4HOYW36XZ1mQ0guE8oxzuNaF1Zw05HU8cBrWPcHJQ/Bw2gfFvfFNc2Tb+8diQamJY ypOwRA7IcMMydOAxPIkOOIhW39qpY1bYJ5SDUL7tE/b3jS18XkqbXqgpy4WA2V0R5wrr YfPKY83TDRkp+hqOYLaiy063AojL88gPoXP0Mc8FWmpDo2ZIDatOmDKhoohoYebPGU6I d6RWGyYjAQMklGEVU6I0Ovpxzlh12HYJBhkMkdZ0AoOhEIEwGuMBMdYdK5rxgbInBwhj E3FfLRLYgQPw0ClWvLsGiAfhLXiTssNFH4CI7q7yVwcJ8TdNT+8rNdynMmDC2kbyk497 zlrQ== X-Forwarded-Encrypted: i=1; AJvYcCX8WpcwfRn++aSnH1zMVE40GwmSh6rSoifR2IJx+Thgav8j4w0JLobolohw/jnqhqaP3FyAekxgDcjnYyw=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0RYrYw19/isXrHL4Qa/rJFQYg+YgS5eJu+6l2cK2HNQEKMeWI EbQYEYmdhhMt+iUnoVLzduyoP6NONiyJCSx2TwWdTkWORPRmU/dpirteUqO4 X-Google-Smtp-Source: AGHT+IHJuZRDWcftnPRua4fr9uRoKs7TTb6YTz0GeS+hpwkLoxjCCAZmkRNuK3lfqm3lBYPdzs0xWQ== X-Received: by 2002:a05:6a21:4006:b0:1c8:a5ba:d2ba with SMTP id adf61e73a8af0-1d8bcf356admr168084637.22.1728589526287; Thu, 10 Oct 2024 12:45:26 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ea448fe50csm1374762a12.29.2024.10.10.12.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 12:45:26 -0700 (PDT) From: Rosen Penev To: linux-crypto@vger.kernel.org Cc: Boris Brezillon , Arnaud Ebalard , Srujana Challa , Herbert Xu , "David S. Miller" , Rosen Penev , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv2 5/5] crypto: cesa: use devm_platform_get_and_ioremap_resource Date: Thu, 10 Oct 2024 12:45:17 -0700 Message-ID: <20241010194517.18635-6-rosenp@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241010194517.18635-1-rosenp@gmail.com> References: <20241010194517.18635-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Removes separate steps. Requires index instead of name. Signed-off-by: Rosen Penev --- drivers/crypto/marvell/cesa/cesa.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/crypto/marvell/cesa/cesa.c b/drivers/crypto/marvell/cesa/cesa.c index a65f328b7094..ef4b1c2336bb 100644 --- a/drivers/crypto/marvell/cesa/cesa.c +++ b/drivers/crypto/marvell/cesa/cesa.c @@ -375,7 +375,6 @@ static int mv_cesa_get_sram(struct platform_device *pdev, int idx) { struct mv_cesa_dev *cesa = platform_get_drvdata(pdev); struct mv_cesa_engine *engine = &cesa->engines[idx]; - const char *res_name = "sram"; struct resource *res; engine->pool = of_gen_pool_get(cesa->dev->of_node, @@ -391,19 +390,7 @@ static int mv_cesa_get_sram(struct platform_device *pdev, int idx) return -ENOMEM; } - if (cesa->caps->nengines > 1) { - if (!idx) - res_name = "sram0"; - else - res_name = "sram1"; - } - - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - res_name); - if (!res || resource_size(res) < cesa->sram_size) - return -EINVAL; - - engine->sram = devm_ioremap_resource(cesa->dev, res); + engine->sram = devm_platform_get_and_ioremap_resource(pdev, idx, &res); if (IS_ERR(engine->sram)) return PTR_ERR(engine->sram);