Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1227298ybm; Sat, 30 May 2020 02:34:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyjxMYDoZJMGEqWn3TTPVVT207izDnKdLyTcoB/NGYP2/01Ut2Wuruee/29ESvpu6c70wB X-Received: by 2002:a05:6402:1aca:: with SMTP id ba10mr12840279edb.100.1590831253299; Sat, 30 May 2020 02:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590831253; cv=none; d=google.com; s=arc-20160816; b=gd8JuaBFWIu50JwCWbhaEPRifPfSmclCLtz2WGytLZfsjNCy0qehIvOnvi+WFCTjPL VITeVElTZMW3rvzwcAKFmCYBa2hyZHYMy8qg4IC53w/lV1CHWlsifbv3Z4kjrylvH5Dl CxeI15gw1d8prfWQ7GdyQI+r3cHHKTMPeeb9HINZLyQ7AmDcMCKAU9W3yFf27MMGottT m4GLuBlUW5jUlGy8dlmmo4bEWopulApkzvIQnVvo5L4K/oLjQvZLAhspv+SFIIv+jfVn kKQfe2POroZcN+riVQ2gdBbQzbCt0EHoM66TPG1JM9GbryoXccyyH9xSXcBUdgmzQPWg MEmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=eKAZx4hEQ34h1aXXFGTQIhPUpuRDYZ1er43b7CQQCP4=; b=NYqvtQ7dW/iQyzG9FHA8mHD/Ap/dEQhM4yev7K53Z4cBNY/kPI0vd5KecE1X8vnnCN gpwIyaY/cDKA6HQhCYe8J0Gd9gIPf5S97/Q3VgIIMqoFEI9j6pqiGncLLzhaA0ZjOpQb gEvUqMFdTuzMf04SHniFNA2lbW7D2S/DiGO9pwpBIbUHKJ19BRyoKbTqeoGp5GRNU2a5 AXWbAY2cvsy6/KjwGIELmxc72+evn3hG9gYsYFdTe9RxJ50Q5hSYB6YDYj2uwFyKHVDC mTpkDJDfMqyE+uat+QsaRBjw4jLoRcRuFXLqcGO5O4Nxv5IDA1VEOrHEoOfWy7aVMZUj PR4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si6495380edq.64.2020.05.30.02.33.49; Sat, 30 May 2020 02:34:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728542AbgE3JcB (ORCPT + 99 others); Sat, 30 May 2020 05:32:01 -0400 Received: from sauhun.de ([88.99.104.3]:59768 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727947AbgE3JcA (ORCPT ); Sat, 30 May 2020 05:32:00 -0400 Received: from localhost (p5486c6a9.dip0.t-ipconnect.de [84.134.198.169]) by pokefinder.org (Postfix) with ESMTPSA id CFEEE2C206B; Sat, 30 May 2020 11:31:58 +0200 (CEST) Date: Sat, 30 May 2020 11:31:52 +0200 From: Wolfram Sang To: Serge Semin Cc: devicetree-compiler@vger.kernel.org, Serge Semin , Alexey Malahov , Thomas Bogendoerfer , Jarkko Nikula , Andy Shevchenko , Frank Rowand , Rob Herring , devicetree@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] check: Add 10bit/slave i2c reg flags support Message-ID: <20200530093152.GA1038@ninjato> References: <20200527122525.6929-1-Sergey.Semin@baikalelectronics.ru> <20200527141517.22677-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <20200527141517.22677-1-Sergey.Semin@baikalelectronics.ru> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > + addr = reg & 0x3FFFFFFFU; > + snprintf(unit_addr, sizeof(unit_addr), "%x", addr); Hmm, this hardcoded value will not work if we ever need to add another bit. I hope this will never happen, though. > + if ((reg & (1U << 31)) && addr > 0x3ff) Same here with bit 31. I haven't checked DTC but can't we import the header with the defines into the project? Or is this then a circular dependency? --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl7SKAQACgkQFA3kzBSg KbZlOg//QVOBxervblGxNh6EaaJKJnG8BWawizgJ3J/y+8fLrL5/Jac8F/0I5mBh j4gopVhrEJ45xp8Z8IyTUZyAc+gtYnL5+2ARrXCv5RWhOzHbym2EahgkAt5tJtfE j8ntt3onMPaWTUGoEZOnhMT4qlS5R0cFzcE/hic/TXFKUgs5GNFycK/JTuqdIYWy 0nYLkQw3V+fyXHnBI9pssrx+wmJAlXM+pQzoIDlcmXCNbEPf0Yq5w9TD2svmIkl+ y6MxuryziguQ0YeLEaSVQlxuodi4fdAO0igcOlwmGtUTwCvPozgYN9S8lHNVqXMM kFZ/jrKWdzSjFQwTjz5lc3dybJWMRip9Dbwzp7yLEYVLt4fbqRv4Hl9pFVfWIeOo ahpJ4J8S+zrcLs16uOJv/G5q8/UyfCRI3TEd/gJlnvsh/surrNdbcagc4xqYIZax /U0+EP7GEcFKZ3OE6C8xgSbossurkckTl+khtrSbReaX2iOYMrttOezJ8ttAs23A wo3QdSPlwWJH66/wPmS9SPJITC/IVHYCCCHPBJBA1WqElU7OojMzyLHT7AIKjgHB zFN0f8jlJhgbb3S97RLAAOWMwJyauKAFzzy3KQ9Lv7pZii7vi2d+9UbHsshyV2Pm hcQ0zGzrjwEtIN6zcWZqwVqXyO0aGgfErGCK4IWG7IOEwCzKhBs= =c1F6 -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--