Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3193733rwb; Thu, 29 Sep 2022 23:14:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KzJI2oIU7RGi6B48UJ+zbeXiauv7jLbAJtYZo2RpVTNlBog2xIPY4//VkAKTNfgOHLUFd X-Received: by 2002:a17:90b:194a:b0:202:e6eb:4b62 with SMTP id nk10-20020a17090b194a00b00202e6eb4b62mr20855703pjb.33.1664518488280; Thu, 29 Sep 2022 23:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664518488; cv=none; d=google.com; s=arc-20160816; b=Ya1MQ3kuRahaGWDEbLJi3GaOK7n//e1JGK8UAepcqAo06JMVj7wuzEaKjxTDOUj9Mq z6qUWN6+CPHFNkP6iFDMDJeXY3OYbXEp0UKo2d1RtgCy9s3xAahUVH0yfqAZsu5s05Zo 55Hv5YaolHp9IeB0ZAsvx5zmB5kJJizq/SaM6thsJCv/jOln3xlV5xyHqHygzT/MiVIt SISlGlTpyKsfU8hwqtJJBUhB8/KxMBvXuICOJkZT1BAVpworln8Bcgbr3CetP0WxXhCj n/oMQrt/2Rf9Y1ehcrZNLtVCExvPAlaPjkClSQoVOvjcfY7qV/teVCgMliS9SkYnxXX0 nG7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date; bh=no+O73RSZ08Tm8vA9+deR8UMcGdclDO+a01IhevnxEE=; b=PwmHe+c4SVFYTGsAW2cctaEGUMEJVS7txD5GohaYRVRFDWeKRifXyS7RNGizge6LFt ujA0hhoRw8MS5HcByphXVXVaDk/yel2CYAN9fhjipZJGzP9vzR4+/1LqSJN2bazEhDS0 WSnb4yBY8Odd5sTFq2JZ0hxqtTaS2ZNmsgAB8Z46GR+joWV6yMtDu112DYPo6NhQ+Zds lgKBHSP5WSrzuPucpdO9QXzfbsPvm+5WE3EiUYdeUy+8auLnvjkVboJ6XWdsHcs+4mtJ ZoEOWtbiL4U5iXcY5v4d0m07TivB7W9Z1sLKQftMPV8YVtYtXc+hUGLHRAIbED4DvyaQ /wew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a056a00099100b00537a0e16156si1665899pfg.197.2022.09.29.23.14.30; Thu, 29 Sep 2022 23:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbiI3GKI (ORCPT + 99 others); Fri, 30 Sep 2022 02:10:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230113AbiI3GJ6 (ORCPT ); Fri, 30 Sep 2022 02:09:58 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30BF75FC4 for ; Thu, 29 Sep 2022 23:09:40 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1oe9DK-00A52C-J3; Fri, 30 Sep 2022 16:09:35 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 30 Sep 2022 14:09:34 +0800 Date: Fri, 30 Sep 2022 14:09:34 +0800 From: Herbert Xu To: Linux Crypto Mailing List , Linus Walleij , Imre Kaloz , Krzysztof Halasa Subject: crypto: ixp4xx - Fix sparse warnings Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This fixes a number of trivial sparse warnings in ixp4xx. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index c2845857e3dd..8459a2c78423 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -421,7 +421,7 @@ static void one_packet(dma_addr_t phys) break; case CTL_FLAG_GEN_REVAES: ctx = crypto_tfm_ctx(crypt->data.tfm); - *(u32 *)ctx->decrypt.npe_ctx &= cpu_to_be32(~CIPH_ENCR); + *(__be32 *)ctx->decrypt.npe_ctx &= cpu_to_be32(~CIPH_ENCR); if (atomic_dec_and_test(&ctx->configuring)) complete(&ctx->completion); break; @@ -721,7 +721,7 @@ static int register_chain_var(struct crypto_tfm *tfm, u8 xpad, u32 target, crypt->init_len = init_len; crypt->ctl_flags |= CTL_FLAG_GEN_ICV; - buf->next = 0; + buf->next = NULL; buf->buf_len = HMAC_PAD_BLOCKLEN; buf->pkt_len = 0; buf->phys_addr = pad_phys; @@ -752,7 +752,7 @@ static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned int authsize #ifndef __ARMEB__ cfgword ^= 0xAA000000; /* change the "byte swap" flags */ #endif - *(u32 *)cinfo = cpu_to_be32(cfgword); + *(__be32 *)cinfo = cpu_to_be32(cfgword); cinfo += sizeof(cfgword); /* write ICV to cryptinfo */ @@ -789,7 +789,7 @@ static int gen_rev_aes_key(struct crypto_tfm *tfm) if (!crypt) return -EAGAIN; - *(u32 *)dir->npe_ctx |= cpu_to_be32(CIPH_ENCR); + *(__be32 *)dir->npe_ctx |= cpu_to_be32(CIPH_ENCR); crypt->data.tfm = tfm; crypt->crypt_offs = 0; @@ -847,7 +847,7 @@ static int setup_cipher(struct crypto_tfm *tfm, int encrypt, const u8 *key, return err; } /* write cfg word to cryptinfo */ - *(u32 *)cinfo = cpu_to_be32(cipher_cfg); + *(__be32 *)cinfo = cpu_to_be32(cipher_cfg); cinfo += sizeof(cipher_cfg); /* write cipher key to cryptinfo */ -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt