Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp983790rda; Sun, 22 Oct 2023 20:29:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKAO/qWLzDkfZStI7S/+4bxoD43UrCpFZP5DpRBpR7SDSNFelLGlMzpvNgKhKd2gSmbx0Z X-Received: by 2002:a17:90b:3c4f:b0:274:99e7:217e with SMTP id pm15-20020a17090b3c4f00b0027499e7217emr5601882pjb.16.1698031782309; Sun, 22 Oct 2023 20:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698031782; cv=none; d=google.com; s=arc-20160816; b=ve+oMtmQlA3WKT+Q5KekO4Y52BgDs3K3fUy6w2UGKfTOXp/wh2HMqNOFVwZ64TI82t YUV2BXE0ENE+KO7QYPIJBhLxxmUGZ+0Mk3gmEvjeOWhA5mF4AF5JUwMwQqPccWgJHDk7 BzeeORM8TrFiOSJX40XflihBChwk/bBoOo+lBrBXQm+3m1QdcZSC9tHXkHOlWl1FYUTC Q/0yAxkb2+syY3Gk4RWR1AqgwZjxgT/R77kWTz/RZaWKeXtSnXbRgMTTit+tsW59DSvg JgQ9Tz3nX+VflEPxfMjwEYxl4KrNLRWUE8SZ/+jlm9YKYKct0WyRA1rSKY0paft61g4M 90vw== 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:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id; bh=WbWk8Ey5/ESJhmyEYTpmaiWWdkac99kQyQ5oI/CWojA=; fh=zacDJt7mnL+wTDdXNqH102VfUeJ9SEeHwnqUPumZgHA=; b=OYRx5UqKx3BkKq8tzmV2DS+II7IKwopmRT5L1KQ45j4OlpOwlO21Xwj0FfaJLlaE3q e5NtVg84DSfNRSnV5PlhctX29xnnuLXj0Yn3yqOX9ARQXUjag6TnHWLdnpDENuby2r06 6xE694uEeKfDH1T/GQmYFc88pFGZRG0MajB1UGCb4tPTDAcJpk6PkuXaeiSRfl8Jc+7M 1F5G67ZzNA4d8Jxm0x4X53NWoRjk345Qo8qq08J+Jn2CGPZE6gEmctOsWc0YuKgmT9Fw sbuG7MU3pDm5aWpiBLA/0bOWfTFfmu2kgSAK7zIT8osEe3U04Dfv2nIIKRJ7QBEXRJIS IHyA== 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:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id gm1-20020a17090b100100b00276df8c5b83si5783268pjb.143.2023.10.22.20.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 20:29:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 5F089805F0A7; Sun, 22 Oct 2023 20:29:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229524AbjJWD3i (ORCPT + 99 others); Sun, 22 Oct 2023 23:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjJWD3g (ORCPT ); Sun, 22 Oct 2023 23:29:36 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 367A5188; Sun, 22 Oct 2023 20:29:34 -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 89E2C6048B9FD; Mon, 23 Oct 2023 11:29:31 +0800 (CST) Message-ID: Date: Mon, 23 Oct 2023 11:29:30 +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 X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui 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 In-Reply-To: <7f81d365-0440-de01-8be4-9c8d3ab9d69c@nfschina.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_PASS autolearn=no 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 (snail.vger.email [0.0.0.0]); Sun, 22 Oct 2023 20:29:41 -0700 (PDT) On 2023/10/23 09:33, Su Hui wrote: > On 2023/10/20 23:55, Jonathan Cameron wrote: >> 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! I'm not sure  whether the caller could handler this  when return 'result' rather than '-EINVAL'. This is not a big problem, maybe we shouldn't modify this code. Su Hui