From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D6AFC433F5 for ; Fri, 15 Apr 2022 01:21:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348399AbiDOBXt (ORCPT ); Thu, 14 Apr 2022 21:23:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343588AbiDOBXr (ORCPT ); Thu, 14 Apr 2022 21:23:47 -0400 Received: from mail.meizu.com (edge05.meizu.com [157.122.146.251]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DC802A738; Thu, 14 Apr 2022 18:21:20 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail12.meizu.com (172.16.1.108) with Microsoft SMTP Server (TLS) id 14.3.487.0; Fri, 15 Apr 2022 09:21:19 +0800 Received: from [172.16.137.70] (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Fri, 15 Apr 2022 09:21:18 +0800 Message-ID: <413b9d1c-922e-43cf-b864-52b73622a53d@meizu.com> Date: Fri, 15 Apr 2022 09:21:17 +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] iio: gp2ap020a00f: Fix signedness bug To: Andy Shevchenko CC: Jonathan Cameron , Lars-Peter Clausen , linux-iio , Linux Kernel Mailing List References: <1649933135-14236-1-git-send-email-baihaowen@meizu.com> From: baihaowen In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 4/14/22 9:47 PM, Andy Shevchenko 写道: > On Thu, Apr 14, 2022 at 2:19 PM Haowen Bai wrote: >> function gp2ap020a00f_get_thresh_reg() is unsigned but returning -EINVAL >> errcode, and thresh_reg_l is unsigned but receiving -EINVAL errcode. so >> we have to change u8 -> s8. > s8 is not enough to hold an (arbitrary) error code. To be on the safe > side you need to use int. > Thank you for your suggestion. -- Haowen Bai