Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1256547rdb; Mon, 2 Oct 2023 04:24:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKTZqJyeBdcowVLQXxVTUt9WaeP7v47lBEwVxubc0odkKLm03+D4LOgGec7kigi7sgjQqg X-Received: by 2002:a05:6a00:1a48:b0:690:3b59:cc7a with SMTP id h8-20020a056a001a4800b006903b59cc7amr13336826pfv.23.1696245840305; Mon, 02 Oct 2023 04:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696245840; cv=none; d=google.com; s=arc-20160816; b=RZn7ZkLCtznwO83Et6MvOWWzhKx0nxwcHRHvI3IjiWpW1h3tiZTv0J1kLnycJRDwyD Q9D2vmvnufyZswSTLRykyQ+Ab+bvxIJBwmGR1WGwdYUvVWNwWnM7aS8eQaluhMyEcJ5/ S1icG1tlY0vIM3bh/kr0/FtVSJ2N6/1+k5H7yKN8cTlUB8qbHg8TByaW/a6HuHRNjd2S pPu931VEI+NlcA/ob72m4M05hPW7TneHwa2h7rK6Zv3oXJpx0ejHFmhZ43IKrYrRPLlK 4uy6tw4Vwk9Dyk2G+R+0FHxf9R4p7tipIpakWNo4f4ECLptNnx1OpP9N6bfHxciHKveg bccA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pJesVMP2oUOtC0HN4G+nwR5AfL9VCCTIaKVktCl7jsk=; fh=gp78xjMe6dhq6+gYybxqgYVNtCVntdKe3kNGKXOwgTA=; b=zr4kTWb8Mt+BGy1u7vHo2ldETp3NBBLWAhWJ3s7tjYvRAPyhwYvMRv4AUIvhTd98Tk CYDGnGwx4jnPz4XCIn0TqQyP1Decotv2A0twXRXy9mleT2w7G//X5rs/Ak7SX4WPof8o tams4X5ZcpVZYohDX5jL96EwIoo4TNzos77HhSH1KRFjoWlLE2X5qle3Rlfuzeqy68NL sdxHIQUSpQ/RRee3pDKzDqWPuef28no1avOwL4XuEH7xv8cJ6/1y+xF4hZpIS0zG/FT2 wwCTSfY661jHNN/mb6YLQDht5fuvSDy8OuAp6vA3Q4ogPOyt9MKmSY3hr3uM/sC+/NVB kI5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="g/PtyqUj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id cu4-20020a056a00448400b0068a6f6d9f85si4683462pfb.140.2023.10.02.04.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 04:24:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="g/PtyqUj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B7B50806FB7F; Mon, 2 Oct 2023 02:55:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236258AbjJBJz0 (ORCPT + 99 others); Mon, 2 Oct 2023 05:55:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236112AbjJBJzY (ORCPT ); Mon, 2 Oct 2023 05:55:24 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BC7B8E; Mon, 2 Oct 2023 02:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696240522; x=1727776522; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=fOrOmvdF6LT3+L3Jy/6pyrjx2JfHMcCZvJIukRslaqg=; b=g/PtyqUjQJGgwpVUO4BSTBuy7+c9gWBRGG8ojvT2/xjFHR7KFVT5ZPzE ZnpzzuWbRkA2U32+FHcrbUUaE1WJba4mIRGpNQAmpmpxPSkBvev5WECXJ ODVL0sNxn//dyXzMUvCH3TLJTtvsQ1KoRU845+1FlpvYqdC49gmVye4ii aLpmoxLmEL6MUuAdXcz8G8tSPS8p+ewsjZ8/XInIOOT/dxaMMD5vGo/5L QAz/2yLKR0PAXfgrCnDKDemnpv4GhOfO3QdfZOhHIZ8MQLnRup8n3Dcj1 Na4i1020zm8G/JZQjpZnQfu+uYX0BitLk6k5UtOaAcRlf7s2B6JeO7OgB g==; X-IronPort-AV: E=McAfee;i="6600,9927,10850"; a="413524513" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="413524513" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 02:55:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10850"; a="840935007" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="840935007" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 02:55:20 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC0) (envelope-from ) id 1qnFe1-000000027n8-0Hr2; Mon, 02 Oct 2023 12:55:17 +0300 Date: Mon, 2 Oct 2023 12:55:16 +0300 From: Andy Shevchenko To: Biju Das Cc: Jonathan Cameron , =?iso-8859-1?Q?Andr=E9?= Apitzsch , Jonathan Cameron , Lars-Peter Clausen , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] iio: magnetometer: ak8975: Fix 'Unexpected device' error Message-ID: References: <20231001-ak_magnetometer-v1-1-09bf3b8798a3@apitzsch.eu> <20231002102745.0000540b@Huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 02 Oct 2023 02:55:33 -0700 (PDT) On Mon, Oct 02, 2023 at 09:38:17AM +0000, Biju Das wrote: > > On Mon, Oct 02, 2023 at 10:27:45AM +0100, Jonathan Cameron wrote: > > > On Sun, 1 Oct 2023 18:09:56 +0200 > > > Andr? Apitzsch wrote: > > > > > > Fixes: 4f9ea93afde1 ("iio: magnetometer: ak8975: Convert > > > > enum->pointer for data in the match tables") > > > > ^^^ (1) ... > > > So we need the spacer until someone converts this driver to use > > > pointers instead for both of and ACPI tables. > > > > Isn't it done by (1) which is in your tree? > > How (1) can trigger 'Unexpected device' error?? > It returns match_data, and match_data has correct device type. How? The enum starts from 0 with a AKXXXX and ak_def_array starts from 0 indexing, it's classical off-by-one, you got the driver data for a wrong chip. -- With Best Regards, Andy Shevchenko