Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1130079ybz; Wed, 22 Apr 2020 14:11:16 -0700 (PDT) X-Google-Smtp-Source: APiQypJyweZAErQygprAnKk2Vs3I58YfYS85FMrxwG/EYHECz+osKjt7eSVNhgWk83dfTqWW6xaI X-Received: by 2002:a17:906:f90e:: with SMTP id lc14mr249753ejb.156.1587589876615; Wed, 22 Apr 2020 14:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587589876; cv=none; d=google.com; s=arc-20160816; b=CquGbx3Ktq6wSN69UE+LlAHQuIP4r+5pmobQuN2k7dDYn8CgX0ckvuMc41CppZgJ5X 5bRxKIzFcBeMEUYyk5y5Y9koJp0iA+UjSiXyEjmDjQmxloIKRUuXXEgkKyy9iu1vDBqy bYvF4G5UEpTIopGIjvoxhnRol+nMMF0xddlwW1OeWQu71XPec36/nKWhd8p7H+Nuxfjm lCwqDSl5M+8w2lMoWx7wkf21F/ym1ShDq5pgKhEeVFSLr+vTH3QcJtQ956TdUgerC0Ro TLV97LuNMO2ZU+WrZBH8/1/Vw3TxsSRYMBy8xzXwlW/1Q8dgnzI6N5+M9zR+1CfzeoiX DSbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=cGGpp/0boXM4fgRdSDqWdoU87OHSgjQHu1ui442p74A=; b=K7sgj+liJJnZydMIzZ6LboV+q6yJ1/Ulz5k68n3HWbSM/wLZ3sqsDCQSlhHjKYCStR Ka3DRnJPctjfyKt374dkbSLq5MakgQj9UZJ3FWv/WuGKKmaRFQlO8HYe9+cut1xXbfjU oJYxJyRKh2OCiNQlw6539XKsKV2X6k++76Is4HbQZjCpnZO1mf6Sb7og0v2Q7HVNa2Vb t21KT7wfa8X85kLHe/yPx4BTHEuzf9kmJyiJ47V3VgbGma2i+YPiDXJW1YHzqtmtTNyx EJRoRMJvguBRukaF6kJmIapU19T0mO1r2+DkHSZ/GWh8pYRc/wtTpJuoPSUCKmxKjutX u/fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=Dxu2Tos7; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=JZjiB4RC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mailbox.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dh5si159212edb.577.2020.04.22.14.10.52; Wed, 22 Apr 2020 14:11:16 -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; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=Dxu2Tos7; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=JZjiB4RC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mailbox.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726430AbgDVVH3 (ORCPT + 99 others); Wed, 22 Apr 2020 17:07:29 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:40076 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbgDVVH3 (ORCPT ); Wed, 22 Apr 2020 17:07:29 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 496tL34ZJyzQlHY; Wed, 22 Apr 2020 23:07:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:subject:subject:from:from :date:date:received; s=mail20150812; t=1587589639; bh=4C1ZcPFlNo MYHc6s+skkSb0gvvRJHnGvtMmmxQe7rNo=; b=Dxu2Tos7jNms31cX2a4dFFfjeA zdXu9yM7UHjoaNHSmiVlvn4yzXK/PY6QsBam2+miWBZcJH/9WzHERi/3ARzXpF1t D9hrDJoiUhLswwV4MgFXwUAj7+5y276AGrbWe/7F88VGXDs9w6CzDZ5Ka/aLS4Cy E7OzDcKr6qoioHX/RHrh/S0vx8MOy90clHG9rqYm1T32g+VDL2vbLoRT/Xo/MwJV Xb8RzuioO0xCtPer7w1nXf1Q3eokbbhkITg/sg9ALCGuE/6hl1lWG5yCIxmhvfiY OREMCNcQ+drl+08+GOrRDW76Vg1bl0tJkg+hRkmzfLqP+4ZuzEd3sba8bgXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1587589641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cGGpp/0boXM4fgRdSDqWdoU87OHSgjQHu1ui442p74A=; b=JZjiB4RCJ/mP9MwbxgiQiMxM5m40yqrcy5yEuMIbVOhSwZ5MvbU7qrYFBDaTOb3yf3L9un Xj3E5+dQ5NlHY30RgibvyOVkX4PK/gjQV4CAYSmDVLZsPURplH3DSNvTWI//FNeLPBZsoJ PoHDoiV7WEeM9xoAiW79HD5sRSCZTDgm3f7ksk0UpgnLXIt0OT0h10MStYA06Gvw01s8wH +TjY3YQJXajEP04g/+HbLXT91B4kqE+HD3OiR7A8nUgVpRLCek0Jl0Mhyyt4qOe7DtAlao qfA5d4fVFfVT+xYFvYhs7mVUfFHrRYIj3QP5lovTXx+AXUTQSX/u3R+UrWHXrQ== X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id 4-OrVoBX8US2; Wed, 22 Apr 2020 23:07:19 +0200 (CEST) Date: Wed, 22 Apr 2020 23:07:14 +0200 From: "Erhard F." To: Wolfram Sang Cc: Aishwarya R , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Greg Kroah-Hartman , Kate Stewart , Richard Fontana , Thomas Gleixner , linux-i2c@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] i2c: powermac: Simplify reading the "reg" and "i2c-address" property Message-ID: <20200422230709.19a81ef9@supah> In-Reply-To: <20200421093712.GA1241@ninjato> References: <20200408100354.17782-1-aishwaryarj100@gmail.com> <20200415131916.23555-1-aishwaryarj100@gmail.com> <20200421093712.GA1241@ninjato> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: C31D01782 X-Rspamd-Score: -5.79 / 15.00 / 15.00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 Apr 2020 11:37:13 +0200 Wolfram Sang wrote: > On Wed, Apr 15, 2020 at 06:49:14PM +0530, Aishwarya R wrote: > > >> Use of_property_read_u32 to read the "reg" and "i2c-address" property > > >> instead of using of_get_property to check the return values. > > >> > > >> Signed-off-by: Aishwarya R > > > > > This is quite a fragile driver. Have you tested it on HW? > > > > This change is not tested with the Hardware. > > But of_property_read_u32 is better here than generic of_get_property. > > This make sure that value read properly independent of system endianess. > > This driver is only used on PPC_BE. And it is *very* fragile. The gain > is not enough for me to accept it without testing. Maybe Erhard (CCed) > is interested. If not, you may find someone on the ppc lists. > I applied the patch on top of kernel 5.6.6 and tested it on a PowerMac G4 3,6 DP and a PowerMac G5 11,2. Both machines run without anything suspicious going on. dmesg | grep i2c looks the same with patch and without patch. Tested-by: Erhard Furtner