Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp704006ybz; Wed, 15 Apr 2020 17:06:04 -0700 (PDT) X-Google-Smtp-Source: APiQypK6WPN8sfe9peZoZVgOxIEJDHx5/zP8Za6IijOll10knGxTyqbS+IUiLFg9h4dpkgPy0DQj X-Received: by 2002:aa7:ca55:: with SMTP id j21mr26094902edt.86.1586995563981; Wed, 15 Apr 2020 17:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586995563; cv=none; d=google.com; s=arc-20160816; b=QdrBuxkTZ59FDT54tZE7OTgw5pSEOITs2rlBHHxJKi1Eyw+3NG1I/VOTTNQ33QRFXa cfTc8ijqWIp9U5ZoNjzRcAZxw0nW7wJMkerck+NqgpfOWzUKmL2BQQMPZQCQzoglUULj B5s3WNbFmYzLhell+Yew7oSzw5n2QNVSoeXrNFmuZKeSELB3lH9yEjdDfPK2ktT6ayCi uuN4RLs4aJKDVNT2+m/2aCoAcqjWnD6NoPRXEMrwMOIi74RKrAWnbhfgmTlbUxQ8rLP8 uAgLajtLy/R43pksrq1n0dAl7TgeJUbsv8IUulBKQCI7gVh2BKUGTM1M8FwfbeZV7MDx 3U1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=mGivcgEJ6E876yj00y3QoKcNXlu3JKn22U740NPN6wE=; b=LKua+oGCXBEm59r4ZUpQrsiwOJk5apYH+aaL1B+SRyD++AhMslJrumf7VN6LszMt3A 1u4H0hQtl2OMOal1xjw+vFfiAzbZCdqs+W0IDd9Z8StXQdu3SkIBUJLZta9NlLvG+xSx JjRcd6f7/pXKcWLxg0l+jO7E1J8udB+rF234DqOkek7/KnMK65+6FqAwkd/HJwb1UyA1 Jk+DbaShgNb9NUofjkZXGofAgskinNh9lWmeW7gZ524BCTxgOi8eUGkvViD4llkm1QrO XB3UDm6tHuH9e0dcv1U/+2IX7XderilP9KfUL0n28QWYeh/VvtBZhqvWBVHh0HQk6oiY xfxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IfPy7LVH; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si11371967ejb.482.2020.04.15.17.05.40; Wed, 15 Apr 2020 17:06:03 -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=@gmail.com header.s=20161025 header.b=IfPy7LVH; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2506234AbgDONUS (ORCPT + 99 others); Wed, 15 Apr 2020 09:20:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2506249AbgDONTg (ORCPT ); Wed, 15 Apr 2020 09:19:36 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63626C061A0C; Wed, 15 Apr 2020 06:19:36 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id t11so1475059pgg.2; Wed, 15 Apr 2020 06:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mGivcgEJ6E876yj00y3QoKcNXlu3JKn22U740NPN6wE=; b=IfPy7LVHeMGkWmqorJ6OgR3uVTalPLTzftap1Wuz4dA3PVwCzEi0GBWkixQcOITQ/U /mx6tx5mAtFfpJr5K8A+uCNfaUXZKsPVrGiGnk+amCKDOLSRySJOPXRK+PdWkN6vnuI7 XmQsg5tBqG12SCEdkuYUkvSZz+1etZmwx6pqXbcIZlHOPZS4p3D/fTI2wtCl+Gpl9+X/ AYNFYNeduNCOdLZVzkcJZWRm6poyG/b2bKyQny9VrktjnvNY2LMtsSUn75VwvVcn6OV1 GD7c6FG8Yobax+jXnwLWKMHtvitBw0bxk9pLzmh20zRreyYASNDTT78JGpADNvwrgkJn JVpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mGivcgEJ6E876yj00y3QoKcNXlu3JKn22U740NPN6wE=; b=DALeLHHyR1nc+dGeA+pKYmIj74Qsne5lce6O+SFs0DnLUonsXsf4kC5zqmOFxVmJS6 LY6jBR5yN7QTYszSZq7uVXvONJ0iWzBfEZq3jpEhHf/15Ph7okIRbC58Z5dJLHBAs4si +Jjdeiq3Zl5oNsYfU2LjQ84NZB18Pa1MM4IpsDrgmGEEHO7hLrASqNGHyU0mWUE7AJtB g3HjTswY1EmLDTdk2UEViqucf46RbyvCD2hrw5K3sFaC+iEkeoFsaEqhEHA4Y5kEaMVG 5flaEes0RUMRFTxoVX7Vt0bHMASvyTdHQeshGlSlEdtMzVUTyRpFXTpzUOFVdQwAnjlR yKhQ== X-Gm-Message-State: AGi0PuZ0FoKabSNNUl9C/f3ksu98pYvGi74UR2kwsN67TtqcF2cWX4zf nZgLETlYkB6/58FeNN8LPQRb9ESfJZ1oTw== X-Received: by 2002:a63:1a16:: with SMTP id a22mr20756378pga.264.1586956775700; Wed, 15 Apr 2020 06:19:35 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:6e1c:dc2f:f465:67ce:fbea:c439]) by smtp.gmail.com with ESMTPSA id r9sm13403346pfg.2.2020.04.15.06.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 06:19:34 -0700 (PDT) From: Aishwarya R To: wsa@the-dreams.de Cc: aishwaryarj100@gmail.com, 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: [PATCH] i2c: powermac: Simplify reading the "reg" and "i2c-address" property Date: Wed, 15 Apr 2020 18:49:14 +0530 Message-Id: <20200415131916.23555-1-aishwaryarj100@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200408100354.17782-1-aishwaryarj100@gmail.com> References: <20200408100354.17782-1-aishwaryarj100@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> 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.