Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp953151rda; Sun, 22 Oct 2023 18:34:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLraDHL+LxbtFOzDBlcYXMBIH4e+dsTf4yRSbyOxRzBhVDfzhqk8tO8vomJB5PcYoAtlSX X-Received: by 2002:a05:6358:63a1:b0:13a:a85b:d024 with SMTP id k33-20020a05635863a100b0013aa85bd024mr10688707rwh.30.1698024880406; Sun, 22 Oct 2023 18:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698024880; cv=none; d=google.com; s=arc-20160816; b=0bpeoIyo0SSYhPzxaEKF3b5BmwHICraa6dUHwDEVS4Myip2BIU2KEwJFQciptKOlC6 b/MDtGZjRfHC0c7E2IJSn6KSuosvqXkjAyJdM/mUTKmG4U/KJzDWgrzLoBv3MdkVSsuj Xn2VPtkGPXGccNDTn7ob6K01SumccpN8SN5I8yMLOASV6u/Dd7akrEQxTVr4rmand4Kp nEjDs/QR33gMUUk/WQiKsCd//FZzjKFJabnMW5PUF/n9FiZ67sxDt/oUYeXoNuWTrF9v qbgTFk/RvmqBOk5uwfSCswGgvMkNbl8Ie28wB1f8v2ZCl492aCe9joj4px6zI2HX07n0 8sqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc:to :content-language:subject:user-agent:mime-version:date:message-id; bh=i+bxS6wUMf4xxUbder87qFZ+1pV3HsmQuvVxaEq5ITE=; fh=zacDJt7mnL+wTDdXNqH102VfUeJ9SEeHwnqUPumZgHA=; b=VId+MjjU/NVwZU6rdT7UK+5KOoOiQZC9uyPfTMjlnsFk82CXBxkHDYOEJJLgg43o6m opG7+djsHPa+65pyA3qN1q1ZwALQcyKYaTQKbplm3f3lzYQjKbK8RrVTKR73eRHjjsnJ NjBUosYuhmRlJEtGD5cwmmazHTh7b9qMv5eRm6GysBwMzm2KRxpwxtKa0G85f34MsbKo kCIEoJlE1GzTfgDEk60OqOa20A8InPbDmwVrFoorgcjxtdS2XEZLfKpKDbqwFMZFqoOL zG4p9/sNstsBeqLw8f6m9Y9FxECFMWyeRRwTwxgF0zoo1p6jm0wYcw4s/hQoBJW3R1Yw AcSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id q21-20020a638c55000000b005aab3984970si5814244pgn.19.2023.10.22.18.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 18:34:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id BF0428088AA2; Sun, 22 Oct 2023 18:34:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233030AbjJWBeK (ORCPT + 99 others); Sun, 22 Oct 2023 21:34:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232989AbjJWBeI (ORCPT ); Sun, 22 Oct 2023 21:34:08 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 1ED30F1; Sun, 22 Oct 2023 18:34:05 -0700 (PDT) Received: from [172.30.11.106] (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPSA id E57BE6047A8EA; Mon, 23 Oct 2023 09:33:52 +0800 (CST) Message-ID: <7f81d365-0440-de01-8be4-9c8d3ab9d69c@nfschina.com> Date: Mon, 23 Oct 2023 09:33:52 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 2/2] phy: mapphone-mdm6600: fix an error code problem in inv_mpu6050_read_raw Content-Language: en-US To: Jonathan Cameron Cc: jic23@kernel.org, lars@metafoo.de, jean-baptiste.maneyrol@tdk.com, chenhuiz@axis.com, andy.shevchenko@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui In-Reply-To: <20231020165509.00003350@Huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Sun, 22 Oct 2023 18:34:38 -0700 (PDT) On 2023/10/20 23:55, Jonathan Cameron wrote: > What does this have to do with the phy: mapphone-mdm6600? Oh, really sorry for this. My careless mistake :( . > I'm not sure why inv_mpu6050_sensor_show() doesn't return > the actual error code from the regmap_bulk_read() and instead replaces it > with -EINVAL. Given you are tidying up this related issues perhaps change > that as well? > > static int inv_mpu6050_sensor_show(struct inv_mpu6050_state *st, int reg, > int axis, int *val) > { > int ind, result; > __be16 d; > > ind = (axis - IIO_MOD_X) * 2; > result = regmap_bulk_read(st->map, reg + ind, &d, sizeof(d)); > if (result) > return -EINVAL; > //Make this return result; Sure, I will tidy up this, Thanks for your suggestion! Su Hui