Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5099434rwd; Tue, 30 May 2023 14:48:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6IB/eAoKjPHXdE+xNy9VBPKMcipTqR49QjHGjiCsCQWckBPNHFZd0Efzer42yFWwolSUaM X-Received: by 2002:a05:6a20:3d82:b0:10f:1d33:d667 with SMTP id s2-20020a056a203d8200b0010f1d33d667mr4322337pzi.5.1685483286120; Tue, 30 May 2023 14:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685483286; cv=none; d=google.com; s=arc-20160816; b=g3R/hhbwu0v7La/1e5T36TSyxqsGZPgCYaYqIU/j2OdnAFJ0efVza896C0GTGwxWyb U0DdwfZDWwfBL0GnloNIDkpWY0IeLoVposfsoHqC3j3sYddMigIKAFwXJSMhILfS3snG o2Gf4GMffGzxLcpjEYm5c1JrOmQrn+NmwYtl92iM/C1AYpVxBR58NbQeo7txYJrmQewo NO+JHVgwSPte6b+ZMkjGZ1gbLbcrcoYgrXZL/Truy3XeAdvVtCkrphcTCA3Bc0KUfmkn 3Vp+YKqW75qt4b8g2ic2ClC1kwb0JTJBjn2tz3RIjdR5CeuEpq9tSdpJLhTojG7uHcyn U1pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5XNlvstAuteX8/xQGx7xe5mWVRBasmdcOFjgr0+j2uU=; b=o2p/mbHvYeiYnHBJbgMTNkPtGSt1qECeyJjYRLDj3xZimfseLb1NCNOs5CNaw4CXOv h8EH7+8NYkDnTrUhu9JAoaKndxgZxeyNCzpu2C9f7IJkPc6gmjpkp0tLfgCcRdYCa9Uz +iVHwpGg0xAVNwR26P+pONjbYrhViRLJxjIqTIlUsGAuc1amo0kn4ehzxo0Qgb00IJxy jzqxCcEtiuuZ04Gr+0L1vRqb5b2clmnlnw1tmwf+/YyGk1WqYNc7a2N9/NWW37+HKo6K rSimU05i6BsUmim59BEo66Eky/fggLgDqgZ1nvA2wWapkdhw539qxO9A3dKbQ3lr6nJ0 e4rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iBLPvGkJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q26-20020aa7843a000000b0064d35b6cdd8si262126pfn.168.2023.05.30.14.47.54; Tue, 30 May 2023 14:48:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iBLPvGkJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233426AbjE3Va5 (ORCPT + 99 others); Tue, 30 May 2023 17:30:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbjE3Vaz (ORCPT ); Tue, 30 May 2023 17:30:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05B4DE8; Tue, 30 May 2023 14:30:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8BB7160B74; Tue, 30 May 2023 21:30:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 869C2C433EF; Tue, 30 May 2023 21:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685482253; bh=PrlL1qfJ4X4PgO5aGdikpfSveOZTNv2Z4rqYo4OiJts=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iBLPvGkJZb7R3XA/E6T8YvG3XN3DGpqP+dWwEAjFyBXDGCduGXbXAq87fVbsr2MLp JCRGsqL8OjIS7OoZJV8H6VAT7RvnFilBArfPFhq2v/H8IECnEiskUYB1tDdwx8Seaq zzjYXil1T7WjAoNC7cVfQTKVQmZMoz42iM4N+mzCxvPPwy48NSWEbUz4NJ6ZJUqXDF rWbjPpjQpkA5/r0r4F8/P1WgC3iPCgGNPbYqM5Mv2u8seoTuyTR9gh72kit3EGIMMX DKOzBWAZNwrqDv73tchVsncDT35LregvMV1mNTFEr3rSan8EnhhEhfRqCBpPkh0HR6 4plYDAsXS+qeA== Date: Tue, 30 May 2023 22:30:46 +0100 From: Mark Brown To: Charles Keepax Cc: lee@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, vkoul@kernel.org, robh+dt@kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, yung-chuan.liao@linux.intel.com, sanyog.r.kale@intel.com, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 5/6] spi: cs42l43: Add SPI controller support Message-ID: <171e2054-e41c-46a5-b478-f699909c5bd7@sirena.org.uk> References: <20230530122112.1314458-1-ckeepax@opensource.cirrus.com> <20230530122112.1314458-6-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LUy+8fUc7Rrtf09J" Content-Disposition: inline In-Reply-To: <20230530122112.1314458-6-ckeepax@opensource.cirrus.com> X-Cookie: I've read SEVEN MILLION books!! X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org --LUy+8fUc7Rrtf09J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 30, 2023 at 01:21:11PM +0100, Charles Keepax wrote: A couple of small things: > +static unsigned int cs42l43_clock_divs[16] = { > + 2, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 > +}; Do we need to specify the size of the array? I just had to count the number of initialisers :( Should probably also be const. > + for (; buf < block - (sizeof(u32) - 1); buf += sizeof(u32)) > + regmap_write(regmap, CS42L43_TX_DATA, *(const u32 *)buf); We're passing a byte stream through a u32 here - are you sure this is endian safe? --LUy+8fUc7Rrtf09J Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmR2awUACgkQJNaLcl1U h9BLMAf7B1to2LkSkIjsJGp1+2cKMbTn+WNW6z2CuH5pGIv8uv6hHT/yakD/DAtD xqM8doMGB7ckoPBvhosXpSmd7TODf4nrrADZEB9yL5ZgAyPl9tgk7ZrNldZUr8bV KBRZASEbj3MNDA4EzBe8oG7jn3vwgF+Yes6wYzvhiUkQFL1alr7u/7IQ4lJlKWTL hnYHrP4S/2ZbZzJO16dLz47zIYMAtERArGEfrKYdQ1rmWazZMGFJ8MwboxkC8ZMQ gR2K6dVAAsncxp3ruAEB520UX7td4j1tm2rcJgyNTbgXbJsn7wVZ882YEXAF24L8 oRslOoGjnPOB9/vkdOYSL79Zyx1Xyg== =Yi++ -----END PGP SIGNATURE----- --LUy+8fUc7Rrtf09J--