Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4637808rwb; Tue, 8 Aug 2023 11:18:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkpWAzXsc5k6ac4rmS0JJhpNSPI+oHk/W8YSr1q7i4x3BEkA0FrNDErXdfOgHKUNyDZBMW X-Received: by 2002:a17:902:ec87:b0:1b8:28f6:20e6 with SMTP id x7-20020a170902ec8700b001b828f620e6mr528233plg.34.1691518714162; Tue, 08 Aug 2023 11:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691518714; cv=none; d=google.com; s=arc-20160816; b=WYgbTF8ebuSdIIzrhJBiaDkcjvJCj2LIm8pPicOMECzOCEtjoHzBsweT759GJyciB3 NAO3Dq4xepH6GaNB0L9e32hw8RaiCzsmuOhj9mDLgE3h8GAGju1musiLm1Wvmf96fJtM nQP2Le0qnA2PjFlL3q/IybgNKM4tO5RWAUVKCsX2zOF6Ltwqe6EHhBX3whqnqLX37tL+ D2+XNw1X3AJiETZwxAbr2xgslvE6YS3qUAPvHxLaqqjw2T9b41nkRJm78lBwo3ZEWx1O 6yJ0/eXd2AlFzVk5tJ8uIkmuh0dxP1NGMl34DEd43c+zW+vxTtCxmQqtjVquzEebzSiL 141w== 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=t7PyoU8AYWJIwvZWdit4Ps/WdiBR7sDlId44lw9ADY8=; fh=J6J/SLTg2wtA6Uaf6Hn4CC7sR73z4UpGCSfJpuh7cAg=; b=PODBJy7UAJGjdSylK33wrL9zNdJidFVZbyp8l3+v+kkwjkaf6XVIhfpR6rGFxxOSyK aj5BwGSN15Tuat7L3ob0Rn6FzaVkxseuTkKGKnG1s44I/vCRzGIPJqXzJxfHpsyEP3Y6 Sq1OAzZqEtLXttByxU5fFziB2tAsvOIK34+6GasubdGpBVyfl8JXC8kIG9a2RJwt6YMn BhdeilQPvaAMNyQw7m3DvEutJ/c/4oIApn9j9Be0mdNRjVqExm6QCF99rr1lj6B1BSeL pOQOazMVLUAj+6EVaRhAqH2HIdggDsAdlTGr5QXRP8h7jWDvxqYbADsCWAl0dvqhiyIz 5z3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NFworbM+; 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 b11-20020a170903228b00b001b9d1813011si5838275plh.455.2023.08.08.11.18.22; Tue, 08 Aug 2023 11:18:34 -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=NFworbM+; 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 S235142AbjHHR4X (ORCPT + 99 others); Tue, 8 Aug 2023 13:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231946AbjHHRzu (ORCPT ); Tue, 8 Aug 2023 13:55:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6345D298B0; Tue, 8 Aug 2023 09:25:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B63DB6252F; Tue, 8 Aug 2023 12:46:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18551C433C7; Tue, 8 Aug 2023 12:46:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691498773; bh=t7PyoU8AYWJIwvZWdit4Ps/WdiBR7sDlId44lw9ADY8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NFworbM+/yJt/EfmhyEMhA9+l2c/miHLb6HaHL9AfsivHW54QG4o5rJ+xtfmhbmfl KSTCPC7+X6XZkhnqMsjuxz/FcklTSQBgOvrrz6nH9Emi+soxo9GbAX8IireViO+rbu epS9AgI4OIh71xEaz1oeMC4LR333iDxuULQEL1x6TUNO/ey/eqnu7vjRxvsgHbMEAX zssnpf5nOVNsK9IhpJdaD/IXyqPGgtn0wLLCFOL4NBm+waWjfAuIx9GnDYIHvrELPV 8lbgSu5vKdvg0NY25hEONWmZh6/ZFACWHZtic8o2IsF2uOCFoOrpxGkybit3viqKpy YQYl0oS1JoHBg== Date: Tue, 8 Aug 2023 13:46:08 +0100 From: Mark Brown To: Kunihiko Hayashi Cc: Serge Semin , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] spi: dw: Set default value if reg-io-width isn't specified Message-ID: <1505ec01-186d-451a-9164-d42796954c01@sirena.org.uk> References: <20230807001621.196776-1-hayashi.kunihiko@socionext.com> <213763b3-5a8b-3a88-54f1-024325f7fe80@socionext.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TJalYs/MizfFRmvC" Content-Disposition: inline In-Reply-To: <213763b3-5a8b-3a88-54f1-024325f7fe80@socionext.com> X-Cookie: You need not be present to win. X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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-kernel@vger.kernel.org --TJalYs/MizfFRmvC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 08, 2023 at 09:00:18AM +0900, Kunihiko Hayashi wrote: > On 2023/08/08 7:57, Serge Semin wrote: > > On Mon, Aug 07, 2023 at 09:16:21AM +0900, Kunihiko Hayashi wrote: > > > According to the dt-bindings, the default value of reg-io-width is 4. > > > However, the value becomes zero when reg-io-width isn't specified. > > This semantic is implied by the dw_read_io_reg() and dw_write_io_reg() > > methods. It doesn't seem like that much necessary duplicating it in the > > property parse procedure, if not to say - redundant. > I see. Currently since the variable reg_io_width has no other references > other than dw_{read, write}_io_reg(), it means the default value is taken > if this is zero. > So, I think we should be careful when actually using the value of > this variable. It does feel like a sensible robustness improvement, even if it's not fixing a specific issue now it might save us from future issues. --TJalYs/MizfFRmvC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmTSORAACgkQJNaLcl1U h9AB8wf/ddcf2la7li0vRgQn1O0T32/K+4cecju7caiwiFf/8icP1QlQpElqHyQw nEIpn+pzs8QWVREykUqKt6WWLI+KhtIDrUuSSs3NoIFkQ7yk9Gacfr4Y/SLP0JCf uwMaSRVdapPl2ou5KcfyI0MK/Cc1BlMjwNPFb4POpub+0qdJRp8ImCeKfy7wzKSr Tx0d7tv/IxzjD3ScGT6ydIm6BTFLJg2g6WXgeJMZQLmX3Kqv1J0Th376pxMNpqST EoXlOy5DlAHs3X21KnUeThzEYd8NhCdhi1WYK/02LPG21geKPnYYgsOf3KBbh5nG Zx0Ufq9+SoGZEJRJ99eR97Uy09USVQ== =2aGO -----END PGP SIGNATURE----- --TJalYs/MizfFRmvC--